[pocket-linux] Chapter 3. The dreaded libc.so.6

Bart bart at ipmaster.be
Thu Oct 28 06:01:39 CDT 2004


Hi,

Try on your root disk to copy the libc.so.6 file into /lib.  The line
	>   libc.so.6 => /lib/tls/libc.so.6 (0x42000000)
tells you that that application (in your case bash) needs libc.so.6 and that 
this file actually is placed in /lib/tls. But if you  move libc.so.6 to /lib 
directory the application will work.

And maybe that's  your problem. I remember that some paths like /lib, /bin, 
etc are by default included as part of the PATH variable. But probably not 
/lib/tls.

On the other side, you tried this, so I am not sure...
	> So, in my [compressed] rootdisk I created the aditional directory
	> /lib/tls and added a symlink there, pointing to the file in /lib, but
	> still no go.
	> (/lib/tls/libc.so.6 -> /lib/libc.so.6)


Another thing I remember is that you cannot always just copy the libraries 
from your build machine to your host machine.
So can you tell me the specs on which machine you build your code, and the 
specs of the one on which you test it.
I had the same problems building on a AMD 1GHZ and testing on a PI 100 Mhz.
The libraries on the MAD where compiled for i686 and not for an i386.
But I am not 100% sure if I got the an error message, or nothing at all.

Finally, use the images for the chapter and uncompress it to your HD. Replace 
the original bash with yours, make the rootdisk again, and try it.

Greetz
Bettes

On Thursday 28 October 2004 07:16, Miguel Servin wrote:
> I followed the directions for the chapter 2 (Build a statically-linked
> bash) but using  compressed image in the rootdisk, from chapter 3.
>
> As was predicted, the statically-linked bash (3.00) worked wonderfully
> when loaded from the compressed image in the rootdisk.
>
> The problem arises when I compile bash without the --enable-static-link
> option.
>
> The output from 'ldd bash' when compiled using './configure
> --enable-minimal-config' and then 'make' is:
>   libdl.so.2 => /lib/libdl.so.2 (0x40026000)
>   libc.so.6 => /lib/tls/libc.so.6 (0x42000000)
>   /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
>
> (note the reference to /lib/tls/libc.so.6, instead of the 'default'
> /lib/libc.so.6)
>
> So, in my [compressed] rootdisk I created the aditional directory
> /lib/tls and added a symlink there, pointing to the file in /lib, but
> still no go.
> (/lib/tls/libc.so.6 -> /lib/libc.so.6)
>
> The kernel boots, loads the compressed image into the ramdisk, tries
> to execute /bin/sh and dies because the binary can't find libc.so.6 :(
>
> Is there a way (maybe involving ld.so.conf and ldconfig, I don't
> know...) to specify the compiler NOT to use the libraries in /lib/tls
> when building bash, but just the ones in /lib?
>
> Thank you.
>
> On Wed, 27 Oct 2004 19:29:39 -0500, Miguel Angel Servin Velazquez
>
> <miguel.servin.velazquez at banorte.com> wrote:
> > Hi Eric. Thanks for your reply. :)
> >
> > So you're telling me to compile bash with it's libraries linked
> > statically and use it with the compressed image in the root disk, Right?
> >
> > I will do it, but I almost can tell it's going to work well.
> >
> > The problem I see is not the compressed image not loading well, but
> > instead the dynamically-linked bash not finding the libraries it needs.
> > BUT... I can be wrong, so I will try it tonight when I get home. :D
> >
> > I'll keep you posted.
> > _________
> > El Servas
>
> _______________________________________________
> Pocket-Linux mailing list
> Pocket-Linux at ufo.chicago.il.us
> http://ufo.chicago.il.us/cgi-bin/mailman/listinfo/pocket-linux





More information about the Pocket-Linux mailing list