[yocto] [prelink-cross] error while loading shared libraries: ld-linux.so.3

Florian Boehmak florian at fnbk.cc
Tue Jun 16 15:56:59 PDT 2015


> The error indicates that it found a library required called
'ld-linux.so.3', but
> could not find that in the "path".  (The path generally being the sysroot
path
> passed to the rtld.)

I tried to move the files to their location in sysroot:

arm-2012.03/arm-none-linux-gnueabi/libc/usr/local/include/world.h
arm-2012.03/arm-none-linux-gnueabi/libc/usr/local/lib/libworld.so
arm-2012.03/arm-none-linux-gnueabi/libc/usr/local/bin/hello
arm-2012.03/arm-none-linux-gnueabi/libc/etc/prelink.conf


> What command did you use to run the prelinker?  And does your sysroot
contain
> the /lib/ld-linux.so.3?

prelink command:

PATH=/usr/local/sbin prelink --verbose
--root=arm-2012.03/arm-none-linux-gnueabi/libc
--cache-file=/etc/cache/prelink.cache --config-file=/etc/prelink.conf
--ld-library-path="/usr/local/lib;/lib;/usr/lib;" -h /usr/local/bin/hello


error message:

prelink: /lib/libdl-2.15.so is not present in any config file directories,
nor was specified on command line
prelink: /lib/libc-2.15.so is not present in any config file directories,
nor was specified on command line
prelink: /lib/libgcc_s.so.1 is not present in any config file directories,
nor was specified on command line
prelink: /lib/ld-2.15.so is not present in any config file directories, nor
was specified on command line
Laying out 1 libraries in virtual address space 41000000-50000000
Assigned virtual address space slots for libraries:
/usr/local/lib/libworld.so
41000000-410086d0
prelink: Could not prelink /usr/lib/bin/localedef because its dependency
/lib/libc.so.6 could not be prelinked
prelink: Could not prelink /usr/lib/bin/POSIX_V6_ILP32_OFFBIG because its
dependency /lib/libc.so.6 could not be prelinked
prelink: Could not prelink /usr/lib/bin/zdump because its dependency
/lib/libc.so.6 could not be prelinked
prelink: Could not prelink /usr/lib/bin/POSIX_V7_ILP32_OFF32 because its
dependency /lib/libc.so.6 could not be prelinked
prelink: Could not prelink /usr/local/lib/libworld.so because its
dependency /lib/libgcc_s.so.1 could not be prelinked
prelink: Could not prelink /usr/local/bin/hello because its dependency
/usr/local/lib/libworld.so could not be prelinked
prelink: Could not prelink /usr/lib/bin/pldd because its dependency
/lib/libc.so.6 could not be prelinked
prelink: Could not prelink /usr/lib/bin/zic because its dependency
/lib/libc.so.6 could not be prelinked
prelink: Could not prelink /usr/lib/bin/sprof because its dependency
/lib/libdl.so.2 could not be prelinked
prelink: Could not prelink /usr/lib/bin/POSIX_V6_ILP32_OFF32 because its
dependency /lib/libc.so.6 could not be prelinked
prelink: Could not prelink /usr/lib/bin/gdbserver because its dependency
/lib/libdl.so.2 could not be prelinked
prelink: Could not prelink /usr/lib/bin/XBS5_ILP32_OFFBIG because its
dependency /lib/libc.so.6 could not be prelinked
prelink: Could not prelink /usr/lib/bin/XBS5_ILP32_OFF32 because its
dependency /lib/libc.so.6 could not be prelinked
prelink: Could not prelink /usr/lib/bin/makedb because its dependency
/lib/libc.so.6 could not be prelinked
prelink: Could not prelink /usr/lib/bin/pcprofiledump because its
dependency /lib/libc.so.6 could not be prelinked
prelink: Could not prelink /usr/lib/bin/iconv because its dependency
/lib/libc.so.6 could not be prelinked
prelink: Could not prelink /usr/lib/bin/locale because its dependency
/lib/libc.so.6 could not be prelinked
prelink: Could not prelink /usr/lib/bin/gencat because its dependency
/lib/libc.so.6 could not be prelinked
prelink: Could not prelink /usr/lib/bin/POSIX_V7_ILP32_OFFBIG because its
dependency /lib/libc.so.6 could not be prelinked
prelink: Could not prelink /usr/lib/bin/rpcgen because its dependency
/lib/libc.so.6 could not be prelinked
prelink: Could not prelink /usr/lib/bin/getent because its dependency
/lib/libc.so.6 could not be prelinked
prelink: Could not prelink /usr/lib/bin/getconf because its dependency
/lib/libc.so.6 could not be prelinked
prelink: Could not prelink /usr/lib/bin/iconvconfig because its dependency
/lib/libc.so.6 could not be prelinked


prelink.conf

-l /lib
-h /lib
-l /usr/lib
-h /usr/lib
-l /usr/local/lib
-h /usr/local/lib


Now there is no error message from rtld and libworld.so seems to be found.
But what's the problem with the folling libraries?

libdl-2.15.so
libc-2.15.so
libgcc_s.so.1
ld-2.15.so


I can see them in this folder arm-2012.03/arm-none-linux-gnueabi/libc/lib:

-rwxr-xr-x 1 developer users  177212 10. Jun 18:43 ld-2.15.so
lrwxrwxrwx 1 developer users      10 10. Jun 18:43 ld-linux.so.3 ->
ld-2.15.so
-rwxr-xr-x 1 developer users 1777390 10. Jun 18:43 libc-2.15.so
lrwxrwxrwx 1 developer users      12 10. Jun 18:43 libc.so.6 -> libc-2.15.so
-rwxr-xr-x 1 developer users   26841 10. Jun 18:43 libdl-2.15.so
lrwxrwxrwx 1 developer users      13 10. Jun 18:43 libdl.so.2 ->
libdl-2.15.so
-rw-r--r-- 1 developer users     135 10. Jun 18:43 libgcc_s.so
-rw-r--r-- 1 developer users 3190583 10. Jun 18:43 libgcc_s.so.1
lrwxrwxrwx 1 developer users      13 10. Jun 18:43 libld-linux.so.3 ->
ld-linux.so.3



I have also put the code on github for reference. Where is the mistake? - I
think we are almost there :-)
https://github.com/fnbk/prelink-cross-example/tree/shared-library


Greetings
Florian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20150617/7e96ed56/attachment.html>


More information about the yocto mailing list