I have few shared libraries that I compiled and have dependencies as follows liba.so depends on nothing, libb.so depends on liba.so, libc.so depends on liba.so, and libd.so depends on liba.so, libb.so, libc.so
I ran ldd
on libraries b-d and got this:
libb.so:
...some system/installed libs...
liba.so => ./ext/lib/liba.so
...some more system/installed libs...
libc.so:
...some system/installed libs...
liba.so => ./ext/lib/liba.so
...some more system/installed libs...
libd.so:
...some system/installed libs...
libc.so => ./ext/lib/libc.so
libb.so => ./ext/lib/libb.so
liba.so => ./ext/lib/liba.so
...some more system/installed libs...
now when I try to import libd in python I get an error like
OSError: ./lib/libd.so: undefined symbol: function_from_libb
I've read some other answers to this same sort of question and they suggest things like using ctypes.RTLD_GLOBAL
or make sure the LD_LIBRARY_PATH
env var is set properly but neither of these things have made a difference. when I try importing liba, libb, libc using CDLL it works just fine, so what is different with libd that would be causing this?