Buildache install fix: replace placeholder and origin install paths in rpath when relocating binaries #10287
Buildache install fix: replace placeholder and origin install paths in rpath when relocating binaries #10287gartung wants to merge 23 commits intospack:developfrom
Conversation
|
Pending merge of |
…n rpath when relocating binaries
28cffb9 to
1f9456f
Compare
This is similar to `spack spec -I` but highlights which nodes in a DAG are relocatable and which are not. spec.tree has been generalized a little to accept a status function, instead of always showing the install status The current implementation works only for ELF, and needs to be generalized to other platforms.
This test requires a few commands to be present in the environment. Currently it will run only under python 3.7 (which uses Xenial instead of Trusty).
tgamblin
left a comment
There was a problem hiding this comment.
@gartung: this looks good to me, but could you add some more tests for this stuff? The coverage on binary caching is currently kind of low, and I'd like to see some simple tests on mock packages that build dummy libraries and relocate them. Is that feasible? It could be in a separate PR if this needs to go in soon, but it would be really nice to have better regression coverage for the bincache parts of the code.
|
@tgamblin the code coverage report link times out. How can I reproduce this on my machine? |
|
@gartung: codecov seems to be having issues. I pushed a commit to see whether it'll work if we generate fewer reports (they seem to crash on merging lots of reports for PRs). If you do want to run this locally, you can do this (from the spack root). You'll need the Python coverage run spack test
coverage combine
coverage htmlMight need some options on the above, but that is the gist of it. You should get a directory with a local HTML coverage view if you're successful. Also, if you want to zoom in on one part, you can run, e.g.: |
|
Close for now so every commit os not tested. |
|
Re-open for comments. |
…l or external packages. (spack#229)
Conflicts: lib/spack/spack/relocate.py
…ot check with file_is_relocatable which is much faster.
|
This error was produced when trying to create a buildcache for [email protected] that was linked against system zlib which has an entry for a version 1.2.7 that does not exists in the zlib package.py. The real cause of the error is in spec.full_hash(). |
|
@tgamblin The patch coverage is at 62%. Is this OK to merge? |
|
Either myself or @tgamblin can look at this by tomorrow |
|
Note that I merged in pr #9199 |
…'_patches_in_order_of_appearance'
|
I did 'git push origin :branch' instead of 'git push origin +branch'. |
OK I will look at that, and check this out later today. |
This fixes a problem where the placeholder path was not in the first rpath entry. This was seen in c++ libraries and binaries because the compiler was outside the spack install base path and always appears first in the rpath.
Instead of checking the first rpath entry, all rpaths have the placeholder path and the old install path (if it exists) replaced with the new install path.
The second commit changes the check for old install path strings by using the install prefix instead of the install root.