8000 fix auditwheel .so relocation for namespace modules by pascalkuthe · Pull Request #2513 · PyO3/maturin · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix auditwheel .so relocation for namespace modules #2513

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

Merged
merged 1 commit into from
Mar 13, 2025

Conversation

pascalkuthe
Copy link
Contributor

For a project of mine I have a setup as a namespace package like this:

[tool.maturin]
python-source = "python/src"
module-name = "my.example.namespace.module"

The module has a shared library dependency and currently the shared object generated by audit wheel fails to load as the rpath gets set incorrectly. The wheel has the following contents

/my.libs/my_dep.so
/my/example/namespace/module.so

The RATH/RUNPATH for /my/example/namespace/module.so gets set to $ORIGIN/../my.libs/my_dep.so which means that my_dep.so is not found while trying to load the module. Instead the RATH/RUNPATH should be: $ORIGIN/../../../my.libs/my_dep.so.

I took a stab at fixing this. It looks like the logic for determining the artifact path was wrong and assumed the shared library would endup in my.example.namespace.module/module.so but it endsup in my/example/namespace/module.so.

@pascalkuthe pascalkuthe force-pushed the auditwheel_rpath branch 2 times, most recently from 33ba1ac to 76e66d0 Compare March 13, 2025 01:24
Copy link
Member
@messense messense left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@messense messense merged commit 30cdcbd into PyO3:main Mar 13, 2025
39 checks passed
@pascalkuthe
Copy link
Contributor Author
pascalkuthe commented Mar 13, 2025

Thanks for the quick response! This issue is a blocker for me at work right now. I am weighing whether to setup a from-source build internally or wait for the next release.

Do you have a rough plan for when you would release a new version or will it be a while?

@messense
Copy link
Member

I can release a new patch version tonight after work, or you can speed it up by sending a PR to update changelog & version like #2469 :-).

9B92

@pascalkuthe pascalkuthe deleted the auditwheel_rpath branch March 13, 2025 09:42
@pascalkuthe
Copy link
Contributor Author

that would be fantistic!. I will do a PR similiar like that to help. Thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0