-
Notifications
You must be signed in to change notification settings - Fork 150
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
Test cases: Unwanted RPATH overwrite and Failing to patch internal non-py extensions #134
Conversation
At a first quick readthrough, this seems totally plausible to me, but I'd definitely like to see a test case. Can you add a minimal one? |
I went ahead and filed some bugs to correspond to each of the issues and fixes reported here. If it's not too much trouble, I'd really appreciate it if you split the fixes into two separate PRs with targeted tests :) I am happy to help with the tests if that is at all useful. Thanks so much for your contribution to auditwheel! |
Should note that old |
@ehashman Thank you! I can work on this later this week. I would love help with the tests. Our project is not suitable for making a test because it is too large. I need two artificial extensions that would replace dbcore.so and lib_tl.so. Maybe there should be some already in the test suite. |
@daa These checks seem much more complicated to implement than what I envisioned. It seems indeed that auditwheel looks into the rpaths of each extension when looking for libraries, but then doesn't keep track of whether it used them or not – it nonetheless overwrites the rpath when there's is a dependency. This change (not pointing to old locations) would require modifying the logic of The second change, however, seems much simpler to me. We can take out anything that is not a subdirectory of root. Going forward, I will go ahead and try to implement your second suggestion, and reference the first as a comment in my PR, or maybe we can make a new issue for others to look at. |
Hello @ehashman I worked on making a minimal wheel called For me, these two fixes are connected, but if you can think of a realistic test case which makes them independent, feel free to add it. |
could you push all related commit to this branch? |
This PR creates tests in the wrong directory, directly under Do you want to revert this @auvipy? |
reverted |
…n-py extensions (pypa#134) * Adding minimal test wheel based on PR pypa#134 * Separate tests for each change in PR pypa#134 pypa#134 * non-py extension does not show in auditwheel show (ignoring assert) * Confirming tests on macOS * pytest in travis is weirdly triggering a manual test * Sorry! Forgot to install zlib-devel
…n-py extensions (pypa#134) * Adding minimal test wheel based on PR pypa#134 * Separate tests for each change in PR pypa#134 pypa#134 * non-py extension does not show in auditwheel show (ignoring assert) * Confirming tests on macOS * pytest in travis is weirdly triggering a manual test * Sorry! Forgot to install zlib-devel
…n-py extensions (pypa#134) * Adding minimal test wheel based on PR pypa#134 * Separate tests for each change in PR pypa#134 pypa#134 * non-py extension does not show in auditwheel show (ignoring assert) * Confirming tests on macOS * pytest in travis is weirdly triggering a manual test * Sorry! Forgot to install zlib-devel
…n-py extensions (#134) * Adding minimal test wheel based on PR #134 * Separate tests for each change in PR #134 #134 * non-py extension does not show in auditwheel show (ignoring assert) * Confirming tests on macOS * pytest in travis is weirdly triggering a manual test * Sorry! Forgot to install zlib-devel
UPDATE: This PR was modified to only include the test cases that @ehashman has requested.
Hi,
Our wheel has a complicated dependency structure. But the gist of it is the following:
dbcore.so (py_ext) -> lib_tl.so (non-py_ext) -> libcurl.so (external library to be grafted)
Because lib_tl is a non-py extension of dbcore, it was not added to the
full_external_refs
dictionary, which is used byrepair.py
to patch the sonames. So the final result is that lib_tl was not patched, and the package was broken.full_external_refs
dictionary.In addition, dbcore already had an
RPATH
set to$ORIGIN
. So because of its dependency to libcurl.so,patchelf_set_rpath
replaced it to$ORIGIN/.libs
inrepair.py
, even though it was not necessary. This way, it could no longer findlib_tl.so
.$OLD_RPATH:$ORIGIN/.libs
I am attaching logs so you can verify it works for my wheel. The master version, instead of repairing it to manylinux1, breaks it even further. The patched version properly repairs it to manylinux1.
Please find the wheel in this link:
https://www.dropbox.com/s/3muwwe8d92pv78p/klayout-0.26.0.dev8-cp35-cp35m-linux_x86_64.whl?dl=0
I would add it to the test but it has 86MB.
logs-before.zip
logs-after.zip