Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Nov 2005 23:13:13 +0200
From:      Ruslan Ermilov <ru@freebsd.org>
To:        Nate Eldredge <nge@cs.hmc.edu>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Cross-compiling CURRENT
Message-ID:  <20051111211313.GL87446@ip.net.ua>
In-Reply-To: <Pine.GSO.4.63.0511111234001.12375@turing>
References:  <Pine.GSO.4.63.0511111234001.12375@turing>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051111211313.GL87446>