[uClibc] Understanding uClibc build environment

Jon Nalley jnalley at jamcon.com
Thu Sep 11 17:05:47 UTC 2003


Hello All,

Please forgive my ignorance, but I was hoping someone could help me
understand the requirements for building apps using uClibc.  My goal is
to build several applications for use in an i386 ramdisk.

I read in the uClibc FAQ:
"The easiest way is to use the compiler wrapper built by uClibc. 
Instead of using your usual compiler or cross compiler, you can use
i386-uclibc-gcc, (or whatever is appropriate for your target
architecture) and your applications will auto-magically link against
uClibc."

So after building uClibc (w/ DEVEL_PREFIX=/usr/local/uclibc) and
running:
 
make install

I cd to the source dir of the app I want to build and run:

(export PATH=/usr/local/uclibc/usr/bin:$PATH; ./configure)

I get the following:

checking whether the C compiler works... configure: error: cannot run C
compiled programs.
If you meant to cross compile, use '--host'.

If I comment out the section in the configure script for this test
everything builds fine...  I have built several other apps (busybox
etc.) without running into any snags...

I "think" I understand what is happening - when the configure script
builds the test C program it is linking against uClibc and then when it
trys to actually run the program it can't find the uClibc library...

I also downloaded the uClibc buildroot, and that works fine, since
everything is using uClibc all the time..

So, is the buildroot scenario the only way to get this to work
without modifying configure scripts etc. of the packages I am trying to
build? 

The only reason I am hesitant to use the buildroot for everything, is
that I am trying to make the process of building the ramdisk as
lightweight as possible, and making other developers setup the buildroot
is slightly more painful than distributing a build system for the
ramdisk that includes uClibc (but not gcc etc.).

Thanks,

Jon Nalley




More information about the uClibc mailing list