From owner-freebsd-arch@FreeBSD.ORG Wed Oct 27 08:36:58 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A005B106564A for ; Wed, 27 Oct 2010 08:36:58 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id D4EFC8FC0C for ; Wed, 27 Oct 2010 08:36:57 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 2556D45E82; Wed, 27 Oct 2010 10:09:00 +0200 (CEST) Received: from localhost (chello089073192049.chello.pl [89.73.192.49]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 8840D456B1; Wed, 27 Oct 2010 10:08:52 +0200 (CEST) Date: Wed, 27 Oct 2010 10:08:17 +0200 From: Pawel Jakub Dawidek To: Jeremy Chadwick Message-ID: <20101027080817.GC1848@garage.freebsd.pl> References: <20101027074401.GA18014@icarus.home.lan> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ctP54qlpMx3WjD+/" Content-Disposition: inline In-Reply-To: <20101027074401.GA18014@icarus.home.lan> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT amd64 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: freebsd-stable@freebsd.org, freebsd-arch@freebsd.org Subject: Re: Can't build boot blocks after new GPT attributes added X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Oct 2010 08:36:58 -0000 --ctP54qlpMx3WjD+/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 27, 2010 at 12:44:02AM -0700, Jeremy Chadwick wrote: > The below commit has broken the ability to build system boot blocks > (including pxeldr) the "historic way"[1]: >=20 > http://freshbsd.org/2010/10/17/20/10/00 >=20 > The breakage on RELENG_8 (dated as of a few minutes ago): >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > # rm -fr /usr/obj/* > # cd /sys/boot > # make clean > [...] > # make > [...] > cc -DBOOTPROG=3D\"gptboot\" -Os -fno-guess-branch-probability -fomit-f= rame-pointer -fno-unit-at-a-time -mno-align-long-strings -mrtd -mno-mmx= -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -DGPT -DUFS1_AND_UFS2 -DSIOPRT= =3D0x3f8 -DSIOFMT=3D0x3 -DSIOSPD=3D9600 -I/usr/src/sys/boot/i386/gptboot= /../../common -I/usr/src/sys/boot/i386/gptboot/../common -I/usr/src/sys/b= oot/i386/gptboot/../btx/lib -I. -I/usr/src/sys/boot/i386/gptboot/../boot2 = -Wall -Waggregate-return -Wbad-function-cast -Wcast-align -Wmissing-decla= rations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wshadow -Ws= trict-prototypes -Wwrite-strings -Winline --param max-inline-insns-single= =3D100 -ffreestanding -mpreferred-stack-boundary=3D2 -mno-mmx -mno-3dnow -= mno-sse -mno-sse2 -mno-sse3 -m32 -march=3Di386 -std=3Dgnu99 -c /usr/src/s= ys/boot/i386/gptboot/../../common/gpt.c > /usr/src/sys/boot/i386/gptboot/../../common/gpt.c: In function 'gptfind': > /usr/src/sys/boot/i386/gptboot/../../common/gpt.c:128: error: 'GPT_ENT_AT= TR_BOOTME' undeclared (first use in this function) > /usr/src/sys/boot/i386/gptboot/../../common/gpt.c:128: error: (Each undec= lared identifier is reported only once > /usr/src/sys/boot/i386/gptboot/../../common/gpt.c:128: error: for each fu= nction it appears in.) > /usr/src/sys/boot/i386/gptboot/../../common/gpt.c:130: error: 'GPT_ENT_AT= TR_BOOTONCE' undeclared (first use in this function) > /usr/src/sys/boot/i386/gptboot/../../common/gpt.c: In function 'gptbootfa= iled': > /usr/src/sys/boot/i386/gptboot/../../common/gpt.c:217: error: 'GPT_ENT_AT= TR_BOOTONCE' undeclared (first use in this function) > /usr/src/sys/boot/i386/gptboot/../../common/gpt.c:222: error: 'GPT_ENT_AT= TR_BOOTFAILED' undeclared (first use in this function) > /usr/src/sys/boot/i386/gptboot/../../common/gpt.c: In function 'gptbootco= nv': > /usr/src/sys/boot/i386/gptboot/../../common/gpt.c:249: error: 'GPT_ENT_AT= TR_BOOTME' undeclared (first use in this function) > /usr/src/sys/boot/i386/gptboot/../../common/gpt.c:250: error: 'GPT_ENT_AT= TR_BOOTONCE' undeclared (first use in this function) > /usr/src/sys/boot/i386/gptboot/../../common/gpt.c:251: error: 'GPT_ENT_AT= TR_BOOTFAILED' undeclared (first use in this function) > *** Error code 1 >=20 > Stop in /usr/src/sys/boot/i386/gptboot. > *** Error code 1 >=20 > Stop in /usr/src/sys/boot/i386. > *** Error code 1 >=20 > Stop in /usr/src/sys/boot. > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 > Please advise. If there is a new/correct method, then I'd like to know > what it is, in addition to the Handbook needing to be updated. >=20 > [1]: http://www.freebsd.org/doc/handbook/serialconsole-setup.html > (See Section 26.6.5.2) Well, your problem is that gptboot.c is including gpt.h not from your source tree, but from /usr/include/sys/, which has an old version of this header file. This can be easly fixed by extending CFLAGS in one of the Makefiles (which is already done in HEAD), but I'm afraid this procedure is incorrect (and never was correct). Apart from including wrong files it also links to wrong libraries, etc. The proper way is to: # cd /usr/src # make buildenv # cd sys/boot # make clean && make && make install --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --ctP54qlpMx3WjD+/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkzH3fAACgkQForvXbEpPzTRwACghgKgz6hNhG7JEBj98vZxoSTR xsUAnj5j+suzPxx6bP2kgYKD6KFPbN9X =OtoJ -----END PGP SIGNATURE----- --ctP54qlpMx3WjD+/--