Incompatibility of uClibc and glibc.

Carmelo Amoroso carmelo73 at
Wed Sep 27 09:35:29 UTC 2006

Arvind Kumar wrote:
> Hi!
> I have made toolchain for  Power PC linux.
> But when I am executing the host cross compiled program on target. It is 
> not executing.
> Target has all the toochain build with uClibc.
You mean target uses uClibc (and not glibc)

> While I have toolchain on host  build with glibc.  
Do you mean you have a cross compiler configured with glibc?
Well, you need a cross compiler configured with uClibc, so your
cross-built program will look for the uClibc dynamic linker 
(  and the uClibc DSO ( correctly.

If you program has been built with a glibc-cross compiler, it will
search the glibc dynamic linker ( and the glibc DSO 
( at least.

Statically link program is working fine.
As expected
> I also created necessary links on target, but did not get anything useful.
> Is uClibc and libc are not compatible.

Well, they could co-exist on the same target, but installed on different 
path; you need to use the correct cross compiler and play with
--dynamic-linker gcc option. For sure you cannot mix libraries from the 
two toolchain.

Remember that the uClibc will search your dependencies DSO in the 
same path of the first... it is very usefull for your purpose...

Assuming that you have all glibc toolchain on /lib and all uClibc 
toolchain on /uClibc-lib onto your target, you may cross-compile your 
app for uClibc as follows:

<cross-uclibc-gcc> -Wl,--dynamic-linker,/lib/uClibc-lib/ 
-o <your_app_executable> <your_app_source>

It works fine for me.
Hoping to be usefull


> Any clue will be appricited.
> With Best Regards,
> Arvind
> ------------------------------------------------------------------------
> _______________________________________________
> uClibc mailing list
> uClibc at

More information about the uClibc mailing list