What is the best way of finding library conflicts in a large application?
0
votes
0
answers
384
views
I have a large application (let's call it P) with lots of dependencies to boost, Qt, zlib, libpng, etc. Recently, I have added a feature to P that needs to dynamically load a new shared object (let's call it
lib1.so
). lib1.so
is dependent to MATLAB api. As a result, it will be dependent to lots of libraries that P already is dependent to.
The problem is that when I try to dynamically load lib1.so
inside P (using the QLibrary class of Qt 5.12), the loading is failed. The failure message is that a Matlab shared object cannot be found. But the shared object is already there and its path is inside LD_LIBRARY_PATH.
If I try to load lib1.so
inside a simple application (with the same LD_LIBRARY_PATH value) it works fine.
My guess is that P is loading a shared object at load time and lib1.so
want to load the same library (but a different version) while dynamic loading time and this conflict does not allow lib1.so
to be loaded inside P.
I have tried to use strace
command on P, but because lib1.so
is loaded dynamically, it does not help me a lot.
What is the best way to find this common library that makes this error?
Asked by TonySalimi
(157 rep)
Nov 29, 2020, 09:05 PM
Last activity: Nov 30, 2020, 09:37 AM
Last activity: Nov 30, 2020, 09:37 AM