Use library search paths of compiler for RPATH when building binutils with system compiler + enhance sanity check by running --version for binutils commands#2323
Conversation
This allows compiling with a "system" compiler in a non-standard location
|
I reinstalled and the linking appears to be fixed: I can also confirm that |
|
Test report by @Flamefire Overview of tested easyconfigs (in order)
Build succeeded for 27 out of 27 (14 easyconfigs in total) |
|
Test report by @boegel Overview of tested easyconfigs (in order)
Build succeeded for 2 out of 2 (2 easyconfigs in total) edit: tested under |
|
Test report by @boegel Overview of tested easyconfigs (in order)
Build succeeded for 12 out of 12 (12 easyconfigs in total) |
|
Test report by @boegel Overview of tested easyconfigs (in order)
Build succeeded for 34 out of 34 (34 easyconfigs in total) |
|
Test report by @boegel Overview of tested easyconfigs (in order)
Build succeeded for 8 out of 8 (8 easyconfigs in total) |
|
Thanks a lot for your efforts on this @Flamefire, and to @krometis for your persistence in helping to track down the underlying cause for easybuilders/easybuild-easyconfigs#10805 |
| # Escaping: Double $$ for Make to get literal $ORIGIN in the file | ||
| libdirs = [r'$$ORIGIN/../lib'] + self.determine_used_library_paths() | ||
| # https://github.com/easybuilders/easybuild-easyconfigs/issues/10056; | ||
| # double $$ to get literal $ORIGIN in the file when command is run |
There was a problem hiding this comment.
This comment is actually wrong. The $$ is (still) for make as in the comment above.
There was a problem hiding this comment.
The comment (which was there originally) didn't make sense to me, so I tweaked it.
Which make is being referred to here?
Please open an issue or PR to follow up, keeping track of things in closed/merged PRs is close to impossible to keep up with...
| ]) | ||
|
|
||
| # All binaries support --version, check that they can be run | ||
| custom_commands = ['%s --version' % os.path.join(self.installdir, 'bin', b) for b in binaries] |
There was a problem hiding this comment.
The abs path was intentional, so those binaries are really used and not anything from the system. But I guess it doesn't matter due to PATH being set?
There was a problem hiding this comment.
Right before the sanity check the binutils module is loaded, so we're quite sure it's the correct binary.
The commands run in the sanity check should be run like an end user would.
We can extend the sanity check to verify the location of the binaries via the which function perhaps?
(created using
eb --new-pr)Fixes easybuilders/easybuild-easyconfigs#10805
Fixes easybuilders/easybuild-easyconfigs#11988
Example with
objdump -x $(which ld.gold) | grep RPATH:$ORIGIN/../lib:/usr/lib:/usr/lib64$ORIGIN/../lib:/sw/installed/zlib/1.2.11/lib64:/sw/installed/flex/2.6.4/lib64:/usr/lib/gcc/ppc64le-redhat-linux/4.8.5:/usr/lib64Maybe we should do this before loading any dependencies? Or is this ok?