13

I have program that depends on library that is linked to libboost 1.67, which installed in the system. When I launch it, I have an error that libboost_system.so.1.58 does not exist. LD_PRELOAD and LD_LIBRARY_PATH are unset.

lddtree execution doesn't show this library as dependency but ldd does.

How can I trace from where the library is required?

14

If on a GNU system, try running your application with:

LD_DEBUG=libs your-application

See LD_DEBUG=help for more options or man ld.so.

5

If the program is loading libboost_system manually using dlopen(), you might be able to find where it is doing that using ltrace to see if it is calling dlopen(), and maybe gdb to set a breakpoint on calls to dlopen() and then generating a stack backtrace. (See also latrace.)

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.