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

fix: replace RPATH on copied libs to the folder where they're copied ($ORIGIN) #478

Merged
merged 3 commits into from
Feb 3, 2024

Conversation

mayeut
Copy link
Member

@mayeut mayeut commented Feb 3, 2024

As the diff in tests showed, this was the original intent but the tests were not working properly.

close #477 (maintainers can't push to that PR)

I believe this would address #451.

We use a tool that uses ldd to make sure software packages don't have outside dependencies. After starting to try using auditwheel, .so files under the libs folder are flagged because the RPATH is set to dest_dir, which is not right. Even though it should never have runtime implications (because the RPATH of the first library in the dependency chain is correct), we'd rather fix this upstream rather than having to add explicit allowlisting to our setup.

This fixes that by setting RPATH to $ORIGIN in those cases. I've done some manual testing and that seems to help ldd find the dependencies properly. That looks like the right thing, but I may very well be missing something.

I'm happy to add tests if required (pointers regarding to where to look at would be appreciated in that case).

@mayeut mayeut changed the title Set RPATH on copied libs to the folder where they're copied ($ORIGIN) fix: replace RPATH on copied libs to the folder where they're copied ($ORIGIN) Feb 3, 2024
Copy link

codecov bot commented Feb 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3484eff) 92.17% compared to head (57c78be) 92.17%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #478   +/-   ##
=======================================
  Coverage   92.17%   92.17%           
=======================================
  Files          20       20           
  Lines        1253     1253           
  Branches      304      304           
=======================================
  Hits         1155     1155           
  Misses         56       56           
  Partials       42       42           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

This was referenced Feb 3, 2024
@mayeut mayeut merged commit 5de39f7 into pypa:main Feb 3, 2024
11 checks passed
@ofek
Copy link
Contributor

ofek commented Feb 3, 2024

Thanks Matthieu! This unblocks us 🎉

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.

3 participants