[uClibc]uclibc debs

Erik Andersen andersen at lineo.com
Tue Jul 3 02:38:56 UTC 2001


On Mon Jul 02, 2001 at 03:21:49PM -0700, David Schleef wrote:
> 
> It really all depends if you want to be able to put the uC-track
> libraries in /lib and /usr/lib on a standard glibc system.  I
> was under the impression that this was a goal, but perhaps it
> shouldn't be.  Comparing to libc5, sharing directories is
> specifically not supported.

It turns out, we can have our cake and eat it too...

I think I just figured out the _real_ problem.  Until now, for each uClibc
library, we have had _two_ symlinks: libc.so.0 _and_ libc.so as symlinks to
libuClibc-0.9.5.so, libm.so.0 _and_ libm.so as symlinks to libm-0.9.5.so
symlink, etc.  It turns out this is just plain wrong and results in messed up
dependancies.

After carefully watching what glibc + gcc + ld do, it turns out we instead need
just the <name>.so.0 symlink, and instead of the <name>.so symlink, we instead
need to create GNU linker script files (one for each of our library) that look
something like:

    /* libc.so: GNU ld script for uClibc's shared libc library*/
    INPUT ( <PREFIX>/lib/libc.so.0 )   

which causes ld to force the app in question to end up linked vs libc.so.0.
And to make this work, we just need to sprinkle these magic little files into
DEVEL_PREFIX/usr/lib and everything will suddenly start working out properly.
Considering how painful it was to figure this out, the solution ends up being
surprisingly simple to implement.  I'll check in a fix shortly,

 -Erik

--
Erik B. Andersen   email:  andersen at lineo.com
--This message was written using 73% post-consumer electrons--





More information about the uClibc mailing list