On 6/16/15 5:56 PM, Florian Boehmak wrote: >> 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 >
/usr/local/bin/hello is going to look at the absolute location, not that patch within that specific sysroot. Any files passed in should have the on-host path names specified. This allows for you to prelink an app based on rootfs where the app is not present. The normal mechanism used by the Yocto Project is: [path]/prelink --root ${IMAGE_ROOTFS} -amR -N -c /etc/prelink.conf This will process the entire contents of the IMAGE_ROOTFS. --Mark > error message: > > prelink: /lib/libdl-2.15.so <http://libdl-2.15.so> is not present in any > config > file directories, nor was specified on command line > prelink: /lib/libc-2.15.so <http://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 <http://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 <http://libdl-2.15.so> > libc-2.15.so <http://libc-2.15.so> > libgcc_s.so.1 > ld-2.15.so <http://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 > <http://ld-2.15.so> > lrwxrwxrwx 1 developer users 10 10. Jun 18:43 ld-linux.so.3 -> ld-2.15.so > <http://ld-2.15.so> > -rwxr-xr-x 1 developer users 1777390 10. Jun 18:43 libc-2.15.so > <http://libc-2.15.so> > lrwxrwxrwx 1 developer users 12 10. Jun 18:43 libc.so.6 -> libc-2.15.so > <http://libc-2.15.so> > -rwxr-xr-x 1 developer users 26841 10. Jun 18:43 libdl-2.15.so > <http://libdl-2.15.so> > lrwxrwxrwx 1 developer users 13 10. Jun 18:43 libdl.so.2 -> libdl-2.15.so > <http://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 > > > -- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto