From owner-freebsd-stable@FreeBSD.ORG Wed Nov 16 01:32:14 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3FA4106566B for ; Wed, 16 Nov 2011 01:32:14 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta06.emeryville.ca.mail.comcast.net (qmta06.emeryville.ca.mail.comcast.net [76.96.30.56]) by mx1.freebsd.org (Postfix) with ESMTP id BAED78FC18 for ; Wed, 16 Nov 2011 01:32:14 +0000 (UTC) Received: from omta06.emeryville.ca.mail.comcast.net ([76.96.30.51]) by qmta06.emeryville.ca.mail.comcast.net with comcast id xcz51h00216AWCUA6dY7fz; Wed, 16 Nov 2011 01:32:07 +0000 Received: from koitsu.dyndns.org ([67.180.84.87]) by omta06.emeryville.ca.mail.comcast.net with comcast id xdXp1h0081t3BNj8SdXtP6; Wed, 16 Nov 2011 01:31:53 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id B2777102C1D; Tue, 15 Nov 2011 17:32:09 -0800 (PST) Date: Tue, 15 Nov 2011 17:32:09 -0800 From: Jeremy Chadwick To: Glen Barber Message-ID: <20111116013209.GA8414@icarus.home.lan> References: <20111116002944.GC24626@glenbarber.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111116002944.GC24626@glenbarber.us> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-stable@freebsd.org, Chuck Tuffli Subject: Re: Possible to build 9-stable kernel on 8.2? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Nov 2011 01:32:15 -0000 On Tue, Nov 15, 2011 at 07:29:44PM -0500, Glen Barber wrote: > Hi, > > On Tue, Nov 15, 2011 at 11:45:02AM -0800, Chuck Tuffli wrote: > > Is it possible to do a buildkernel of 9-stable (r227536) on a stock > > 8.2 system? Most of it seems to work, but the linker fails towards the > > end with > > > > ... > > MAKE=make sh /usr/home/ctuffli/dev/releng_9/src/sys/conf/newvers.sh GENERIC > > /usr/local/bin/svnversion > > cc -c -O2 -frename-registers -pipe -fno-strict-aliasing -std=c99 -g > > -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes > > -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef > > -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs > > -fdiagnostics-show-option -nostdinc -I. > > -I/usr/home/ctuffli/dev/releng_9/src/sys > > -I/usr/home/ctuffli/dev/releng_9/src/sys/contrib/altq -D_KERNEL > > -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common > > -finline-limit=8000 --param inline-unit-growth=100 --param > > large-function-growth=1000 -fno-omit-frame-pointer -mno-sse > > -mcmodel=kernel -mno-red-zone -mno-mmx -msoft-float > > -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector > > -Werror vers.c > > linking kernel.debug > > ld:/usr/home/ctuffli/dev/releng_9/src/sys/conf/ldscript.amd64:9: syntax error > > *** Error code 1 > > > > Stop in /usr/home/ctuffli/dev/releng_9/obj/usr/home/ctuffli/dev/releng_9/src/sys/GENERIC. > > *** Error code 1 > > > > Stop in /usr/home/ctuffli/dev/releng_9/src. > > *** Error code 1 > > > > Stop in /usr/home/ctuffli/dev/releng_9/src. > > You'll need to do 'buildworld' first. Not to mention, one should always do buildworld first. The absolute correct procedure is outlined in /usr/src/Makefile: # 1. `cd /usr/src' (or to the directory containing your source tree). # 2. `make buildworld' # 3. `make buildkernel KERNCONF=YOUR_KERNEL_HERE' (default is GENERIC). # 4. `make installkernel KERNCONF=YOUR_KERNEL_HERE' (default is GENERIC). # [steps 3. & 4. can be combined by using the "kernel" target] # 5. `reboot' (in single user mode: boot -s from the loader prompt). # 6. `mergemaster -p' # 7. `make installworld' # 8. `make delete-old' # 9. `mergemaster' (you may wish to use -i, along with -U or -F). # 10. `reboot' # 11. `make delete-old-libs' (in case no 3rd party program uses them anymore) People (not you Glen :-) ) need to realise that doing buildworld actually builds the necessary "build toolchain" used for the buildkernel portion (the results are in /usr/obj). Failure to do that results in the buildkernel bits using the already-installed-on-the-system compiler/build toolchain (e.g. the stuff in /usr), which may not be compatible with the version of the kernel source you're trying to build. Hope this makes sense to readers. Two "extra steps" which I do: - Before step 1, I do rm -fr /usr/obj/* - Before step 7, I do rm -fr /usr/share/man/* Step 1 is a precaution, and step 7 ensures that no old/leftover compressed man pages (from old versions of software) are retained. If needed/asked, Doug Barton can talk a bit more about the latter. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, US | | Making life hard for others since 1977. PGP 4BD6C0CB |