-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
Shared object from dependency not found when loading python library #281
Comments
Same problem here, my library depends on |
I've solved this problem using
But now It's throwing |
I believe the original report is essentially the same as #387. More in general, maturin can't really do much about the linking behaviour of libraries. |
Hi,
first of all, thank you very much for this project - it's a pleasure to work with.
I encountered a problem that I am not able to solve - I hope this is the right place to formulate this issue.
I am building a python/pyo3 mixed project. One dependency of my crate (ndarray-linalg) uses either a statically or dynamically linked library (netlib-src).
I am having issues using maturin to build my crate with pyO3 bindings that depends on this library.
Mac
On my Mac, I can use maturin to build the project without problems using
maturin develop --release
when I use thefeatures=["static"]
flag in my dependency's Cargo.toml fornetlib-src
. However, python will not find the shared object when i buildnetlib-src
via a shared library.Linux
On Linux, both options don't work.
When importing my package in python, I get:
ImportError: liblapacke.so: cannot open shared object file: No such file or directory
liblapacke.so
is correctly built and located in/target/release/build/netlib-src-..../out/lib/
.When building a static library, the symbols are not found. The
liblapacke.a
is correctly build and located in/target/release/build/netlib-src-..../out/lib/
as well.There are no problems for my rust binary which also depends on these external libraries.
Any help would be appreciated.
The text was updated successfully, but these errors were encountered: