[Clfs-support] /sbin/init: error while loading shared libraries: libm.so.6

Joe Ciccone jciccone at gmail.com
Tue Oct 6 04:59:49 PDT 2009


Vered Zvi wrote:
> Hello,
>  
> I used CLFS 1.1.0 for builidng a cross tool chain for x86 embedded target.
>  
> I did all the steps listed in Part I,II,III
>  
> Then I built linux 2.6.29 using this toolchain and also a busybox file
> system using this toolchain.
> When linux boots it finds /lib/ld-linux.so.2 but then it writes:
>  
> /sbin/init: error while loading shared libraries: libm.so.6: cannot
> open shared object file: No such file or directory
>  
> libm.so.6 is there. I'm sure. It is linked to libm-2.7.so
>  
> I ran "ldd libm.so.6" and got:
something tells me that your search paths are messed up.
>  
> [root at sbca35 lib]# ldd libm.so.6
>         /home/zvivered/GNU/CLFS/cross-tools/lib/ld-linux.so.2 (0x0039b000)
>         libc.so.6 => /home/zvivered/GNU/CLFS/cross-tools/lib/libc.so.6
> (0x00667000)
first of all, you can't use ldd on cross-compiled binaries, because that
path is only right if you want to run the binaries on your host system.
use readelf.
>  
> The paths are were the libraries were created.
>  
> Can this cause the problem ?
This is why you can't trust ldd.
>  
> Thanks.

I don't know why your libc is installed in cross-tools. You can't just
mix host and target binaries like that.



More information about the Clfs-support mailing list