Skip to content
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

enable RPATH linking by default #4448

Merged
merged 3 commits into from Feb 14, 2024
Merged

Conversation

branfosj
Copy link
Member

@branfosj branfosj commented Feb 3, 2024

I've marked this as draft while we discuss changing this default in EB5.

@branfosj branfosj added change EasyBuild-5.0 EasyBuild 5.0 labels Feb 3, 2024
@branfosj branfosj added this to the 5.0 milestone Feb 3, 2024
@branfosj branfosj self-assigned this Feb 3, 2024
@branfosj branfosj marked this pull request as draft February 3, 2024 19:49
@boegelbot

This comment was marked as outdated.

@Micket
Copy link
Contributor

Micket commented Feb 4, 2024

  1. we are keeping LD_LIBRARY_PATH
  2. this just affects stuff we built (no attempts to elf-patch binaries)
  3. should be fine to introduce in existing software trees (it of course won't affect things retroactively, but new things will build with rpath enabled).
  4. No attempts to change how users link against modules when building their own code.

Positives:
https://docs.easybuild.io/rpath-support/#rpath_support_why
though primarily i think its main advantage is to built libraries and binaries more robust against users fiddling with LD_LIBRARY_PATH.

Downsides:

  1. Higher burden when making new easyconfigs due to the code that ensures things did get rpath'ed, contributions test builds will non-rpath'ed linking has occurred. e.g. eb git-lfs-3.2.0.eb --rpath fails on RPATH sanity check easybuild-easyconfigs#17516 . One could argue we would rather catch these sooner, but it would also affect every novice user of EB building local easyconfigs.
  2. Maybe we actually rather would want a different approach like: also support using full path soname for shared libraries as alternative to using RPATH #4122 in which case it might hurt to set this new default if there is a better option around the corner.

@jfgrimm
Copy link
Member

jfgrimm commented Feb 6, 2024

I'd support this.

For reference, we enabled rpath on our new cluster (without filtering LD_LIBRARY_PATH), and have zero negative feedback from users.
EasyBuild already skips the rpath check when using the Binary easyblock, so I haven't run into many issues at all (2 failed on the rpath check out of ~1000 unique software, ~4000 total modules).

I don't think we should worry about holding back to wait for #4122, that can always be added later (and would probably get more attention with rpath being on by default)

@ocaisa
Copy link
Member

ocaisa commented Feb 6, 2024

I'm also in general supportive, but I do think there needs to be space in some cases to be able to override libraries with an ABI compatible alternative (MPI in particular). Current rpath support does make this possible (and we use that in EESSI). If we do switch to #4122 at some point, we should still be able to retain this possibility.

@boegel boegel changed the title enable rpath by default enable RPATH linking by default Feb 7, 2024
@boegel
Copy link
Member

boegel commented Feb 7, 2024

I'm fine with this, as long as we add a very clear section to the documentation that explains our motivation for doing this, outline the (mostly positive) impact this has. That section should include clear instructions on how to switch back to the old behavior of not using RPATH linking, or how to disable it for specific easyconfigs (by setting the rpath toolchain option to False).

We should also only have it enabled by default on Linux, and keep it disabled on macOS (where it doesn't work at all).

@branfosj
Copy link
Member Author

branfosj commented Feb 7, 2024

@branfosj branfosj marked this pull request as ready for review February 7, 2024 18:52
Copy link
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@boegel boegel merged commit 360b053 into easybuilders:5.0.x Feb 14, 2024
32 checks passed
@branfosj branfosj deleted the enable_rpath branch February 14, 2024 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

6 participants