auditwheel icon indicating copy to clipboard operation
auditwheel copied to clipboard

Added the option to skip setting library SONAMEs

Open pvallet opened this issue 2 years ago • 3 comments

I am adding this option locally as I ended up needing it to circumvent this problem I encountered, so I figured I might as well create a PR: https://stackoverflow.com/questions/77733250/using-patchelf-to-change-the-soname-of-libgldispatch-so-breaks-its-functionality

While not the common flow, it does seem that being able to skip setting the SONAMEs and only relying on file names can have its uses in some cases.

pvallet avatar Jan 02 '24 07:01 pvallet

Codecov Report

Attention: Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 92.10%. Comparing base (45a8c00) to head (de6ecb3). Report is 41 commits behind head on main.

Files with missing lines Patch % Lines
src/auditwheel/repair.py 75.00% 0 Missing and 1 partial :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #472      +/-   ##
==========================================
- Coverage   92.17%   92.10%   -0.07%     
==========================================
  Files          20       20              
  Lines        1252     1254       +2     
  Branches      304      305       +1     
==========================================
+ Hits         1154     1155       +1     
  Misses         56       56              
- Partials       42       43       +1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jan 02 '24 08:01 codecov[bot]

Hello! Is there any way I could help push this forward? Should I create some tests for the new option? I hadn’t made them as the option I was taking inspiration from (no update tags) didn’t have any, but I could definitely add some

pvallet avatar Jan 15 '24 08:01 pvallet

I'm not almost sure that we don't want to see this happening. Copying without renaming/changing the SONAME is likely to break things in different environments. While libOpenGL.so can't be whitelisted, I think it falls in the category where it can be excluded from being grafted altogether: https://github.com/pypa/auditwheel/pull/368

cc @lkollar for another opinion on the matter.

mayeut avatar Feb 03 '24 09:02 mayeut

FWIW, think this pull is likely barking up the wrong tree - the explanation is probably along https://github.com/pypa/cibuildwheel/issues/2118 - libGLdispatch is used between libA and libA_vendor, where libA is one of GL family of libraries. You need to load them from system locations to find the hidden libA_vendor.

HinTak avatar Jan 02 '25 19:01 HinTak

The 2 last comments point to using --exclude.

mayeut avatar Jan 04 '25 09:01 mayeut