Subject: Re: crossbuild fails when objdir on NFS
To: Simon J. Gerraty <sjg@crufty.net>
From: sgimips NetBSD list <sgimips@mrynet.com>
List: tech-toolchain
Date: 05/03/2004 02:35:52
On Sun, May 2, 2004 at  9:31pm, Simon J. Gerraty wrote:
> Subject: Re: crossbuild fails when objdir on NFS

Hi Simon,

Thanks for the response.

Actually, after much ado again, I've come to realise that the problem isn't
NFS but the FreeBSD alpha.

As it turns out, NetBSD's toolchain absolutely WON'T build under FreeBSD
on FreeBSD's amd64 architecture.  The typical error is (on the "toolchain"
part of the build):

checking for .preinit_array/.init_array/.fini_array support... no
checking if mkdir takes one argument... no
checking for main in -lunwind... no
*** Configuration amd64-unknown-freebsd5.2 not supported
Configure in /tiny/obj/hp300-main/tools/gcc/build/gcc failed, exiting.

As mentioned, this is under the
	dependall ===> gcc
part of the toolchain build.  This particular log snipped is from a cross-
build of hp300, but I have checked hp300, vax, sparc64, sparc, sgimips and
amd64 (yes, same arch) cross compiles.

I had mistakenly confused a previous unrelated error as being an "alpha"
issue.

So, as it stands, FreeBSD's AMD64 architecture absolutely won't build
NetBSD's toolchain for cross-compiling.

So far, FreeBSD's other platforms that I have (alpha and i386) are just
fine cross-building NetBSD architectures.  I have verified that they
build all of the following over the weekend:

	hp300, sgimips, sparc, sparc64, vax and i386.

I would have cross-built more, but I don't have any other platforms to
install and verify the builds on :-)

Thanks very much for the response.   It took some time to ensure I had
the right information for my final response, but other than NetBSD's
GNU toolchain not building for FreeBSD amd64, everything is great after
all.

Cheers,
-scott

> >I'm attempting to cross compile NetBSD ports under FreeBSD 5.2.1 alpha
> >architecture.
> 
> >I can successfully cross-build ports fine when MAKEOBJDIR is set to a
> >native filesystem.   But when I have MAKEOBJDIR pointing to an NFS
> >mounted filesystem, the builds fail during gcc configuration--a tail of
> >the log is below.
> 
> Just a data point.  I work at an essentially freebsd shop, and for
> a _long_ time, we simply didn't allow builds involving NFS due to
> problems like this*.  We've found though that freebsd 4.8 works ok
> as a client - using a netapp as server, so NFS based builds are 
> allowed again now.
> 
> --sjg
> 
> * freebsd 2.8 would occasionally manage to fill a block of nuls in 
> the middle of files read from server.  Depending on the file this would 
> result in a build failure - or worse, successful build and weird crash
> when running.
> freebsd 4.2 worked much better, but the build would always fail 
> on the same ld command.
> freebsd 4.8 worked ok - at least when server was a netapp.
>-- End of excerpt from Simon J. Gerraty