From owner-freebsd-stable@FreeBSD.ORG Sat Nov 19 10:43:48 2005 Return-Path: X-Original-To: stable@freebsd.org Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B34E916A420 for ; Sat, 19 Nov 2005 10:43:48 +0000 (GMT) (envelope-from ltning@anduin.net) Received: from anduin.net (anduin.net [212.12.46.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0942343D68 for ; Sat, 19 Nov 2005 10:43:45 +0000 (GMT) (envelope-from ltning@anduin.net) Received: from ranger.anduin.net ([81.0.162.52] helo=[192.168.1.110]) by anduin.net with esmtpa (Exim 4.50 (FreeBSD)) id 1EdQC8-000LW7-6f for stable@freebsd.org; Sat, 19 Nov 2005 11:43:44 +0100 Mime-Version: 1.0 (Apple Message framework v746.2) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: stable@freebsd.org From: =?ISO-8859-1?Q?Eirik_=D8verby?= Date: Sat, 19 Nov 2005 11:43:13 +0100 X-Mailer: Apple Mail (2.746.2) Cc: Subject: Centralized building 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: Sat, 19 Nov 2005 10:43:48 -0000 Hi all! I've spent about a week trying to accomplish a rather simple task: To build kernel and world once for each architecture we have, and distribute this precompiled src and obj tree via NFS to all the systems that need updating. I have combined this with a locally maintained CVS tree, in order to assure coherent releases being installed on all our systems. However, I am seeing some peculiar issues that I simply don't manage to get around. Scenario: I've got one server running 6.0-STABLE-i386. On this host I've created a jail for building. We have both i386 and amd64 platforms in- house, so I've created a script that build for both: make TARGET_ARCH=i386 MAKEOBJDIRPREFIX=/usr/obj.i386 buildworld make TARGET_ARCH=amd64 MAKEOBJDIRPREFIX=/usr/obj.amd64 buildworld And the same for buildkernel. Starting out trying to upgrade the amd64 hosts, I export the two obj directories via NFS, and mount them as /usr/obj on the amd64 hosts that need upgrading. This was, at least, my initial approach. I then found out that the /usr/src tree in the build jail is somehow tainted by the build (and by the options I specified), so I need to export that as well (which, I am afraid, means I have to maintain two different build jails). Therefore I also export /usr/src and mount it on the target hosts. I then realized that I need to use the same objdir on the target hosts as in the build jail, so I try mounting to /usr/obj. on the target hosts. This allows me to get somewhat further. Installworld now progresses for a while, until it bombs out with the following error: ===> sys/boot/i386/boot2 (install) dd if=/dev/zero of=boot2.ldr bs=276 count=1 dd: not found *** Error code 127 When looking for dd, I find it in the host PATH, and also in the obj dir: [root@build] /usr/obj.amd64# find . -name dd -type f ./amd64/usr/src/bin/dd/dd At this point, I get rid of the MAKEOBJDIRPREFIX option and rebuild everything with just TARGET_ARCH, only exporting /usr/obj from the build jail. I notice that when using TARGET_ARCH with something else than the architecture the build is running on (i.e. amd64 on an i386 host), the resulting build is NOT to be found in /usr/obj, but in / usr/obj/amd64. Thus I need to specify MAKEOBJDIRPREFIX=/usr/obj/amd64 on the target host for installworld to get anything done at all. I'm still getting the dd: not found error, and I do believe I've tried every combination and variation I can think of. Clocks are in sync between all the systems, so that is not the problem. Is the build system partially broken in 6.0? Have I missed something? Do I actually need an amd64 host to be able to build for amd64 systems, or are there other ways to accomplish what I'm trying to do? Should I prehaps try doing centralized binary upgrades instead? Any help would be appreciated. With best regards, /Eirik