New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dlopen()
and DL_LOAD_PATH
doesn't properly load secondary dependencies
#7004
Comments
I don't think there's anything we can do about this; |
I figured as much. It looks like Here's the output ldd without
and with:
|
It would be nice for it to "just work", but modifying the |
Yeah I agree. It does. thanks,
|
the linker only reads the LD_LIBRARY_PATH environment variable once, at startup. later changes are ignored. you can't change the load path programmatically, AFAIK, or I would have used that API instead of creating DL_LOAD_PATH |
I think that the linker will use libraries you have already opened. So, in theory, you could parse the library headers and load all of the libraries AOT |
Yes, agreed here. At least, I believe that happens on Linux and Mac, not sure about windows. |
Also windows. Windows also looks in the currently directory, and let's you change the lookup PATH at runtime I think it may get more complicated when using absolute paths, however |
@vtjnash said above:
I don't think this works (but I'm likely doing something wrong):
Notice that the library that "could not load" is in the |
Every platform is different. On macOS, sufficient information to back out what can go wrong is available from doing |
Yes, I am learning things I don't want to know :-) In any case, I've found a workaround. The confusing thing to me is that this does not work (note all code is run in 0.5.0, see header above):
or this (note I just removed the seemingly unnecessary full path from the library name, note that the error changed)
but this does
The |
As I hinted above, I believe this is due to an error in the command line originally used to build |
Yes, it only has a local path.
and libidl has several
It is commercial software but I can put in a request for them to fix it. At least there is a workaround. |
Works around the local paths in the library. See: #3 JuliaLang/julia#7004
Trying to load
libhdf5.so
which depends onlibsz.so
. If I set DL_LOAD_PATH it fails to load libsz.so even though it's in the same directory (see details here: JuliaIO/HDF5.jl#97)The text was updated successfully, but these errors were encountered: