[uClinux-dev] asterisk with uClinux error

Jamie Lokier jamie at shareable.org
Fri May 7 05:27:04 EDT 2010

Lennart Sorensen wrote:
> On Thu, May 06, 2010 at 06:00:13PM +0100, Jamie Lokier wrote:
> > The above error should not occur if ./configure is called correctly
> > for cross-compilation.  config.log will explain what it's doing before
> > it complains.
> For a few autoconf tests it does and there is no way to avoid it.

The specific error message in the bug report starting this thread is
not "a few autoconf tests", it is a specific test.

> In the case of gcc 4.3 it is a well known bug that somehow none of the
> developers have ever cared to go and fix.
> > > autoconf is simply evil when you are trying to cross compile.  A terrible
> > > horrible mess.
> > 
> > Yes, but on the other hand, it often works better than the
> > non-autoconf source tarballs in my experience :-)
> Well so far the best things I have dealt with use Kbuild.  So busybox,
> linux kernel, uclibc, etc.  No problems with cross compiling ever.

uclibc and the kernel are very special: They target specific targets
or they will not compile at all.

A minor change of GCC version is enough to break uclibc.  (I've had to
patch uclibc a few times to handle GCC versions that didn't match what
the uclibc maintainer was using at the time.)  Hardly "no problems".

busybox: Try building it on a different target, like say Cygwin or HPUX.
Good luck with that.

You're only seeing those packages cross-compile well, for particular
Linux targets, because cross-compiling is explicitly cared about by
the authors.  It's not due to kbuild; it's because the authors make
the effort to support and continually test cross-compiling.

> That can happen in autoconf too.  Autoconf is only as smart as the person
> writing the tests and the code to deal with the test results.

Indeed.  It could be helped by distros turning on cross-compile mode
even for native compiles, raising author awareness, but it isn't.
Gentoo has a cross-compiling mode, but half of its packages break when
you try, so it's not used.  They can be fixed one by one, but it can
take months patching up hundreds of packages one by one.

The uClinux dist cross compiles, but that has to maintain its own
branch of lots of packages.

-- Jamie

More information about the uClinux-dev mailing list