-
Notifications
You must be signed in to change notification settings - Fork 156
Update libraries later if possible #582
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
base: main
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
…to update-found-libs
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #582 +/- ##
==========================================
+ Coverage 92.82% 92.84% +0.01%
==========================================
Files 21 21
Lines 1771 1774 +3
Branches 333 334 +1
==========================================
+ Hits 1644 1647 +3
Misses 77 77
Partials 50 50 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
for more information, see https://pre-commit.ci
9465b6d
to
66ef898
Compare
66ef898
to
4272b53
Compare
282cce2
to
40c9b98
Compare
cython issue: cython/cython#6861 |
16f06ed
to
7993e1d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR addresses issues with unpredictable dependency processing and missing library resolutions by introducing deterministic library ordering and updating RPATHs.
- Update build commands in tests/integration/testrpath/setup.py to compile and patch new library d/libd.so.
- Modify test expectations in tests/integration/test_manylinux.py to validate the new dependency ordering and output.
- Update lddtree.py to use OrderedDict and sorted iteration for consistent dependency processing.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
tests/integration/testrpath/setup.py | Updated compilation commands and adjusted linker flags for new library d/libd.so. |
tests/integration/testrpath/d/d.h & d/d.c | Added new header and source for library d. |
tests/integration/testrpath/b/b.c | Updated fb() to incorporate dependency on fd() from library d. |
tests/integration/testrpath/a/a.c | Updated fa() to aggregate values from fb() and fd(). |
tests/integration/test_manylinux.py | Modified test assertions to account for the new dependency ordering and output changes. |
src/auditwheel/lddtree.py | Refactored dependency resolution to use OrderedDict and sorted iteration. |
Comments suppressed due to low confidence (1)
tests/integration/test_manylinux.py:616
- Relying on an exact substring in log output to validate behavior may be fragile; consider asserting on a structured error code or exit status to make the test more robust against log message changes.
assert 'lddtree:Could not locate libd.so, skipping' in repair_output, (
…lude based on path
b118006
to
6b8e49f
Compare
6b8e49f
to
76b78ac
Compare
Thanks for digging into this. |
it's enough for upstream PyTorch but 6.3.0 also introduced a new issue which could be fixed by: eb8773a, i.e. this:
And after removing the library from _all_libs this should be fine?
I suspect a second pass may not be enough for general case. For example we have n libraries from a.so to n.so, a.so has rpath for all other libraries while all others do not. In this case we need a n-pass iteration to find all libraries unless we use a BFS search? I can imagine there's other issue. How's libc/ld handle this? |
The need for this commit is based on realpath update. |
It should be fine then? The reason is I'm using |
Fixes: #561, pytorch/pytorch#149471
Fixes that:
for
from a set):auditwheel/src/auditwheel/lddtree.py
Line 518 in ff5b637
by:
sorted(set)
andordereddict
to iterate through libraries deterministicallyAlso fix an issue when we exclude based on path but excluded library may still present in
DynamicExecutable.libraries
with emptyplatform
field, which breaks this check:auditwheel/src/auditwheel/wheel_abi.py
Line 278 in f5f83dd