Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Feb 2005 09:07:16 -0800
From:      "David O'Brien" <obrien@freebsd.org>
To:        freebsd-amd64@freebsd.org
Subject:   Re: Cross compiling for i386
Message-ID:  <20050215170716.GB38158@dragon.nuxi.com>
In-Reply-To: <20050215141155.GA29160@gattaca.yadt.co.uk>
References:  <20050215141155.GA29160@gattaca.yadt.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Feb 15, 2005 at 02:11:55PM +0000, David Taylor wrote:
> I also have an i386 workstation, which is significantly slower at building
> world.  I tried to cross-build the world on the amd64 box, then install it
> over an NFS mount.

To date we've never guaranteed that a cross-arch built world is usable.
We only officially support cross-arch compiles for compile testing.  There
are other things in the tree that aren't size & endian-clean that prevent
usable cross-arch release builds.

Many (?most?) of the result from a cross-arch 'make buildworld' are
usable on the target arch; but small nuances cause the total of the
result to not really be usable.

> Eventually, I managed to persuade it to build and
> install, but it's not really a process I'd like to repeat every time I
> update...
> 
> I managed to eventually complete a single build/install world cycle by doing
> something like:
> 
> <amd64 box>$ cd /usr/src; make buildworld TARGET_ARCH=i386
> <i386 box> $ mount <amd64>:/usr/src /usr/src
> <i386 box> $ mount <amd64>:/usr/obj /usr/obj
> <i386 box> $ make installworld

I would mount /usr/src read-only.  Probably /usr/obj also; just to make
sure you don't end up writing into these directories on the i386 machine.

> This however had a few problems.  Running installworld caused the i386 box
> to attempt to write to /usr/src, due to newvers.sh, so I needed to mount
> /usr/src rw.

Please submit a PR for this, with sufficient logs to see what was going on.
/usr/src should be considered read-only by 'make installworld'; else it
is a bug.

> Also the built objects appeared to be in /usr/obj/i386, whilst
> installworld was looking at /usr/obj.

See above, we don't support cross-arch built installs.
Given the closeness of x86 and amd64 I can understand the desire to make
this work as you're wanting.  But there is still so much to be done to
polish FreeBSD/AMD64 in these corner cases.  The Linux 32-bit support is
still very rough, as you mentioned earlier the FreeBSD 32-bit support is
rough.  I personally don't think either should have been exposed in 5.x
until they were to the point of easy-of-use and polish users are
demanding in this mailing list.

> Is this supposed to be possible/supported?  And does anyone have any ideas
> how to make it work more automatically?

My suggestion is to dual-boot your AMD Athlon 64 3500+ to do builds.

-- 
-- David  (obrien@FreeBSD.org)



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