From owner-freebsd-arch@FreeBSD.ORG Wed Oct 27 13:49:01 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 86D6F1065695 for ; Wed, 27 Oct 2010 13:49:01 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA11.westchester.pa.mail.comcast.net (qmta11.westchester.pa.mail.comcast.net [76.96.59.211]) by mx1.freebsd.org (Postfix) with ESMTP id 324068FC25 for ; Wed, 27 Oct 2010 13:49:00 +0000 (UTC) Received: from omta23.westchester.pa.mail.comcast.net ([76.96.62.74]) by QMTA11.westchester.pa.mail.comcast.net with comcast id Pmdg1f0041c6gX85Bpp1UY; Wed, 27 Oct 2010 13:49:01 +0000 Received: from koitsu.dyndns.org ([98.248.41.155]) by omta23.westchester.pa.mail.comcast.net with comcast id Ppoz1f00G3LrwQ23jpp0rQ; Wed, 27 Oct 2010 13:49:01 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 62AD79B425; Wed, 27 Oct 2010 06:48:58 -0700 (PDT) Date: Wed, 27 Oct 2010 06:48:58 -0700 From: Jeremy Chadwick To: John Baldwin Message-ID: <20101027134858.GA14454@icarus.home.lan> References: <20101027074401.GA18014@icarus.home.lan> <201010270927.04145.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201010270927.04145.jhb@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: pjd@freebsd.org, 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 13:49:01 -0000 On Wed, Oct 27, 2010 at 09:27:03AM -0400, John Baldwin wrote: > On Wednesday, October 27, 2010 3:44:02 am Jeremy Chadwick wrote: > > The below commit has broken the ability to build system boot blocks > > (including pxeldr) the "historic way"[1]: > > > > http://freshbsd.org/2010/10/17/20/10/00 > > > > The breakage on RELENG_8 (dated as of a few minutes ago): > > > > ======================================== > > # rm -fr /usr/obj/* > > # cd /sys/boot > > # make clean > > This only works if your source tree is in sync with your installed world. > Adding a hack to the Makefile is wrong. The buildenv approach pjd@ suggested > will work for the case that your source tree does not match your installed > world. But this doesn't appear to be the case here: $ uname -a FreeBSD icarus.home.lan 8.1-STABLE FreeBSD 8.1-STABLE #0: Sat Oct 16 07:10:54 PDT 2010 root@icarus.home.lan:/usr/obj/usr/src/sys/X7SBA_RELENG_8_amd64 amd64 $ sudo -i icarus# rm -fr /usr/obj/* rm: No match. icarus# cd /usr/src icarus# make buildenv Entering world for amd64:amd64 # make clean && make [...] cc -DBOOTPROG=\"gptboot\" -Os -fno-guess-branch-probability -fomit-frame-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=0x3f8 -DSIOFMT=0x3 -DSIOSPD=9600 -I/usr/src/sys/boot/i386/gptboot/../../common -I/usr/src/sys/boot/i386/gptboot/../common -I/usr/src/sys/boot/i386/gptboot/../btx/lib -I. -I/usr/src/sys/boot/i386/gptboot/../boot2 -Wall -Waggregate-return -Wbad-function-cast -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings -Winline --param max-inline-insns-single=100 -ffreestanding -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -m32 -march=i386 -std=gnu99 -c /usr/src/sys/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_ATTR_BOOTME' undeclared (first use in this function) /usr/src/sys/boot/i386/gptboot/../../common/gpt.c:128: error: (Each undeclared identifier is reported only once /usr/src/sys/boot/i386/gptboot/../../common/gpt.c:128: error: for each function it appears in.) /usr/src/sys/boot/i386/gptboot/../../common/gpt.c:130: error: 'GPT_ENT_ATTR_BOOTONCE' undeclared (first use in this function) /usr/src/sys/boot/i386/gptboot/../../common/gpt.c: In function 'gptbootfailed': /usr/src/sys/boot/i386/gptboot/../../common/gpt.c:217: error: 'GPT_ENT_ATTR_BOOTONCE' undeclared (first use in this function) /usr/src/sys/boot/i386/gptboot/../../common/gpt.c:222: error: 'GPT_ENT_ATTR_BOOTFAILED' undeclared (first use in this function) /usr/src/sys/boot/i386/gptboot/../../common/gpt.c: In function 'gptbootconv': /usr/src/sys/boot/i386/gptboot/../../common/gpt.c:249: error: 'GPT_ENT_ATTR_BOOTME' undeclared (first use in this function) /usr/src/sys/boot/i386/gptboot/../../common/gpt.c:250: error: 'GPT_ENT_ATTR_BOOTONCE' undeclared (first use in this function) /usr/src/sys/boot/i386/gptboot/../../common/gpt.c:251: error: 'GPT_ENT_ATTR_BOOTFAILED' undeclared (first use in this function) *** Error code 1 Stop in /usr/src/sys/boot/i386/gptboot. *** Error code 1 Stop in /usr/src/sys/boot/i386. *** Error code 1 Stop in /usr/src/sys/boot. # ls -l /usr/src/sys/boot/i386/gptboot/../../common/gpt.c -rw-r--r-- 1 root wheel 10927 Oct 17 13:10 /usr/src/sys/boot/i386/gptboot/../../common/gpt.c Any ideas? > Maybe you could add text to the handbook to say this, but it is already > implicitly assumed in the handbook section you are referring to since it > assumes you can safely compile a new kernel, etc. The handbook section is > meant as more of a tutorial on how to enable a serial console on a fresh box. > Once you are experienced enough to start using buildworld, etc. I don't think > it is unreasonable to require users to understand that having a source tree > different from the installed world requires extra steps. I don't think it's unreasonable either, it's just not well-documented or well-established. For example, this is the first time I've heard of "buildenv", not to mention the other pieces mentioned in build(7). That doesn't mean FreeBSD is at fault, it just means there's been changes to things which are hard to keep up to date on. > If we were to document those every time it would clutter documentation > making it harder for someone who is new to FreeBSD to simply setup a > serial console on a box that they just installed. Understood. -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |