Wheels, reinventing. (Was Re: [uClibc] Understanding what the build wrapper does...)

Erik Andersen andersen at codepoet.org
Thu Sep 11 21:12:38 UTC 2003


On Thu Sep 11, 2003 at 03:25:55PM -0400, Rob Landley wrote:
> On Thursday 11 September 2003 07:10, Erik Andersen wrote:
> 
> > > BUT: to do it, I had to create a symlink in the mounted root_fs:
> > > cd $DIR/lib
> > > ln -s libc.so.0 libc.so
> > >
> > > I don't know why I needed to do this, I just know that this is what ld
> > > was looking for when I told it "--library-path $DIR/lib -lc".  It
> > > wouldn't look at the "libc.so.0" version, it wanted "libc.so"
> >
> > The symlinks are needed to allow shared libraries to be
> > easily upgraded in-place.
> >
> > > Am I missing something?  Should that symlink already have been there?  Is
> > > my copy of ld broken or something?  (Red Hat 9 stock compiler toybox...)
> >
> > The uClibc 'make install' command (and all the variants on that
> > theme such as 'make install_runtime') do in fact install such a
> > symlink....  Perhaps you just copied things rather than using
> > i.e. 'make install_runtime'?
> 
> No, I pointed the compiler at the loopback mounted root_fs which I downloaded, 
> and said "here are your libraries".  I had to create a symlink in the 
> downloaded root_fs.  The downloaded root_fs, which I didn't build, did not 
> have that symlink.
> 
> That's what I was asking about.

Ahh ok.

> I noticed that you modify the compiler and linker tools to make them 
> automatically link against uclibc instead of glibc.  I suspect that the 
> modified versions look for uclibc directory (or libc.so.0 or something) 
> rather than libc.so, hence root_fs can compile against them without the 
> symlink...

Right.  The uClibc toolchains will install libc.so into
$(TARGET_DIR)/usr/lib/ and puts libc.so.0 and libuClibc-0.9.21.so
into $(TARGET_DIR)/lib/.  If you look around, you will find that
most linux distributions arrange things similarly.

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--



More information about the uClibc mailing list