From owner-freebsd-current@FreeBSD.ORG Fri Nov 11 21:13:41 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E2BFD16A420 for ; Fri, 11 Nov 2005 21:13:40 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id B874D43D6D for ; Fri, 11 Nov 2005 21:13:36 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from localhost (rocky.ip.net.ua [82.193.96.2]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id jABLDTfd014896; Fri, 11 Nov 2005 23:13:29 +0200 (EET) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua ([82.193.96.10]) by localhost (rocky.ipnet [82.193.96.2]) (amavisd-new, port 10024) with LMTP id 93324-01-4; Fri, 11 Nov 2005 23:13:28 +0200 (EET) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id jABLD7Cb014862 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 11 Nov 2005 23:13:07 +0200 (EET) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.13.4/8.13.4) id jABLDE2V002453; Fri, 11 Nov 2005 23:13:14 +0200 (EET) (envelope-from ru) Date: Fri, 11 Nov 2005 23:13:13 +0200 From: Ruslan Ermilov To: Nate Eldredge Message-ID: <20051111211313.GL87446@ip.net.ua> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RVlUGXxwBj5SDcM9" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Virus-Scanned: by amavisd-new at ip.net.ua Cc: freebsd-current@freebsd.org Subject: Re: Cross-compiling CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Nov 2005 21:13:41 -0000 --RVlUGXxwBj5SDcM9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 11, 2005 at 12:59:45PM -0800, Nate Eldredge wrote: > Hi all, >=20 > I have a test machine "tester" on which I am tracking CURRENT. However= =20 > the machine is old and slow and takes a long time to compile the source.= =20 > I want to do the compilation on another machine "builder" which is faster= =2E=20 > However "builder" is a production machine running 5.4-RELEASE, with its= =20 > own copy of the 5.4 source, and I want to leave that as it is. To furthe= r=20 > complicate matters "tester" is i386 while "builder" is amd64, so I must= =20 > cross compile by setting TARGET_ARCH=3Di386. >=20 > I have run into various snags while doing this and I was just wondering i= f=20 > there is a "right" way to do this, or if anyone has any useful advice. I= =20 > have read the section of the handbook on "Tracking for Multiple Machines"= =20 > but it assumes the test and build machines are homogeneous, which is not= =20 > my situation. >=20 > The first problem is that "tester" has various compilation options set in= =20 > its /etc/make.conf which disagree with those of "builder". I worked=20 > around this by setting the undocumented __MAKE_CONF to point to tester's= =20 > make.conf when compiling on builder. Is this right? >=20 > After this "builder" is able to compile the whole tree, but there are=20 > problems trying to install it on "tester" due to path names. Currently o= n=20 > "builder" the source resides in /foo/src and is compiled into /bar/obj (b= y=20 > setting MAKEOBJDIRPREFIX to /bar/obj). These are NFS mounted on=20 > tester:/usr/src and tester:/usr/obj. But when I run "make install" in=20 > tester:/usr/src, it looks for the binaries in /usr/obj/usr/src/* whereas= =20 > they really appear in /usr/obj/i386/foo/src/*. I could correct this with= =20 > symlinks, or by creating and mounting on tester:/foo/src and=20 > tester:/bar/obj so that the paths agree, but this is sort of annoying.=20 > Any better ways? >=20 > Lastly, I would rather have src/ and obj/ mounted read-only on tester.=20 > (The filesystem on builder where they are located already has some other= =20 > things NFS-exported readonly, and as you probably know FreeBSD won't allo= w=20 > you to export directories from the same fs with different options.) Is= =20 > this going to work, or do these have to be writable for install to=20 > succeed? >=20 The only way it can work is to do everything on builder, including installing bits on tester. I do this by NFS-mounting /, /var and /usr partitions from tester on builder's /mnt, and doing install (kernel+world) with the same options as build*, and specifying DESTDIR=3D/mnt. Make sure to "chflags -R 0" on tester before doing this for the first time. I also use top-level "distrib-dirs" and "distribution" targets with TARGET_ARCH to populate /mnt/var/tmp/`date +%Y%m%d` directory, to update /etc etc. I have no idea if mergemaster(8) works with TARGET_ARCH and/or DESTDIR. Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --RVlUGXxwBj5SDcM9 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDdQlpqRfpzJluFF4RAoIRAJ0SKeN+o5wb8tQld8t0jTpvqNGIkACdHA+r Q6GJFVgGl+xpqFJ0tljnoFg= =RQqm -----END PGP SIGNATURE----- --RVlUGXxwBj5SDcM9--