Skip to content
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

[BUG]: Can't include 3rd shared libraries #5367

Open
3 tasks done
thewh1teagle opened this issue Sep 13, 2024 · 0 comments
Open
3 tasks done

[BUG]: Can't include 3rd shared libraries #5367

thewh1teagle opened this issue Sep 13, 2024 · 0 comments
Labels
triage New bug, unverified

Comments

@thewh1teagle
Copy link

thewh1teagle commented Sep 13, 2024

Required prerequisites

What version (or hash if on master) of pybind11 are you using?

2.13.5

Problem description

I'm using pybind11 in the project piper-phonemize-fork which has 2 shared libraries dependencies (onnxruntime and espeak-ng).
I can't import the extension because it doesn't find the 2 shared libraries which I included in the package.
Even when modifying LD_LIBRARY_PATH on Linux and or DYLD_LIBRARY_PATH on macOS or PATH on Windows.
It just says that it can't find the extension but the issue is that the extension fail to load the shared libraries.
It can import ONLY if the extension and the shared libraries are placed in the same folder, but for some reason the extension file is placed in site-pacakges rather than the package folder.

My suggestion:

  1. Provide a way to place the extension in the package folder rather than site-packages
  2. Provide a cross platform solution to include the shared libraries in the package and to be able to import the extension.
  3. Add documentation. I noticed at least 3 projects which I contributed to and the developers struggle with this exact issue.

People use auditwheel or delocate or cibuildwheel or delvewheel
While these tools can sometimes simplify, I prefer not to use them in simple projects.

Reproducible example code

setup.py
CMakeLists.txt

Is this a regression? Put the last known working version here if it is.

Not a regression

@thewh1teagle thewh1teagle added the triage New bug, unverified label Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage New bug, unverified
Projects
None yet
Development

No branches or pull requests

1 participant