-
Notifications
You must be signed in to change notification settings - Fork 294
Use library search paths of compiler for RPATH when building binutils with system compiler + enhance sanity check by running --version for binutils commands #2323
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
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) |
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.
lgtm
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is actually wrong. The $$ is (still) for make as in the comment above.
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.
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...
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.
easybuild/easyblocks/b/binutils.py
Outdated
@@ -211,7 +219,7 @@ def sanity_check_step(self): | |||
]) | |||
|
|||
# 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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/lib64
Maybe we should do this before loading any dependencies? Or is this ok?