Cross-compiling CURRENT

From: Nate Eldredge <nge_at_cs.hmc.edu>
Date: Fri, 11 Nov 2005 12:59:45 -0800 (PST)
Hi all,

I have a test machine "tester" on which I am tracking CURRENT.  However 
the machine is old and slow and takes a long time to compile the source. 
I want to do the compilation on another machine "builder" which is faster. 
However "builder" is a production machine running 5.4-RELEASE, with its 
own copy of the 5.4 source, and I want to leave that as it is.  To further 
complicate matters "tester" is i386 while "builder" is amd64, so I must 
cross compile by setting TARGET_ARCH=i386.

I have run into various snags while doing this and I was just wondering if 
there is a "right" way to do this, or if anyone has any useful advice.  I 
have read the section of the handbook on "Tracking for Multiple Machines" 
but it assumes the test and build machines are homogeneous, which is not 
my situation.

The first problem is that "tester" has various compilation options set in 
its /etc/make.conf which disagree with those of "builder".  I worked 
around this by setting the undocumented __MAKE_CONF to point to tester's 
make.conf when compiling on builder.  Is this right?

After this "builder" is able to compile the whole tree, but there are 
problems trying to install it on "tester" due to path names.  Currently on 
"builder" the source resides in /foo/src and is compiled into /bar/obj (by 
setting MAKEOBJDIRPREFIX to /bar/obj).  These are NFS mounted on 
tester:/usr/src and tester:/usr/obj.  But when I run "make install" in 
tester:/usr/src, it looks for the binaries in /usr/obj/usr/src/* whereas 
they really appear in /usr/obj/i386/foo/src/*.  I could correct this with 
symlinks, or by creating and mounting on tester:/foo/src and 
tester:/bar/obj so that the paths agree, but this is sort of annoying. 
Any better ways?

Lastly, I would rather have src/ and obj/ mounted read-only on tester. 
(The filesystem on builder where they are located already has some other 
things NFS-exported readonly, and as you probably know FreeBSD won't allow 
you to export directories from the same fs with different options.)  Is 
this going to work, or do these have to be writable for install to 
succeed?

Thanks in advance for any suggestions.

-- 
Nate Eldredge
nge_at_cs.hmc.edu
Received on Fri Nov 11 2005 - 19:59:46 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:47 UTC