I Have Libraries with a tree of dependencies, i.e. some of the dependencies have other dependencies I want to Preload. How can I do this?
LD_PRELOAD \
/opt/yocto/2.5.1/sysroots/core2-64-poky-linux/usr/lib/libicudata.so.60 \
/opt/yocto/2.5.1/sysroots/core2-64-poky-linux/usr/lib/libicuuc.so.60 \
/opt/yocto/2.5.1/sysroots/core2-64-poky-linux/usr/lib/libicui18n.so.60 \
/opt/yocto/2.5.1/sysroots/core2-64-poky-linux/usr/lib/libQt5Core.so.5 \
MyApp
The LD_PRELOAD
call contains is sorted, such that the dependencies are listed before the depending library.
The Linker throws the following error:
ERROR: ld.so: object '/opt/yocto/2.5.1/sysroots/core2-64-poky-linux/usr/lib/libQt5Core.so.5' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
Can the libraries be preloaded to fulfil the dependencies in the correct order?
This error:
ld.so: object '/opt/yocto/2.5.1/sysroots/core2-64-poky-linux/usr/lib/libQt5Core.so.5' \
from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
means that the dynamic loader tried to open the library and failed.
There are several possible reasons for this failure:
ls -L /opt/yocto/2.5.1/sysroots/core2-64-poky-linux/usr/lib/libQt5Core.so.5
to confirm that it doesMyApp
is 64-bit, or vice versa). Use file MyApp
and file libQt5Core.so.5
to confirm that they match.MyApp
was linked with newlib
or uClibc
, but libQt5Core.so.5
was built with GLIBC (or vice versa).