Restructure RPATH and elf interpreter setting for Java, and add the LIBRARY_PATH to the additional RPATH and separate java awt libs#3583
Conversation
…IBRARY_PATH to the additional RPATH
…kipping it unconditionally
…tching of the RPATH for java now
…y returns something :)
…g extra RPATHS. Also, fix syntax for call to logging
…Also, set bin_lib_subdirs so that also the files in lib/server are patched
|
@casparvl all development is on 5.0 now, can you please move the target of this PR to the branch |
If this can wait a bit, there's no need to, soon the |
| # using patchelf, see e.g. https://github.com/easybuilders/easybuild-easyblocks/pull/3571 | ||
| # The option run_rpath_sanity_check supports a gradual transition where binary installs that properly | ||
| # patch the RPATH can start running the sanity check | ||
| 'run_rpath_sanity_check': [False, "Whether or not to run the RPATH sanity check", CUSTOM], |
There was a problem hiding this comment.
This used to be needed not to break any existing rpath sanity checking that's going on. But, that may no longer be the case: the default RPATH sanity check has been relaxed https://docs.easybuild.io/easybuild-v5/changes/#rpath . So, unless people actively filter LD_LIBRARY_PATH in their Easybuild config, the sanity check wouldn't fail anyway.
| extra_vars.update({ | ||
| # Overwrite the default value for run_rpath_sanity_check to True, since we have RPATH patching with | ||
| # patchelf for Java | ||
| 'run_rpath_sanity_check': [True, "Whether or not to run the RPATH sanity check", CUSTOM], |
There was a problem hiding this comment.
can (probably) be removed, see above.
|
@casparvl do you have the time to sync this pr with develop. Or should we close it and start anew? |
| # Then, add paths from sysroot to the extra RPATH | ||
| if add_sysroot_libdirs_to_rpath: | ||
| sysroot = build_option('sysroot') | ||
| sysroot_lib_paths = glob.glob(os.path.join(sysroot, 'lib*')) | ||
| sysroot_lib_paths += glob.glob(os.path.join(sysroot, 'usr', 'lib*')) | ||
| sysroot_lib_paths += glob.glob(os.path.join(sysroot, 'usr', 'lib*', 'gcc', '*', '*')) | ||
| if sysroot_lib_paths: | ||
| self.log.info("List of library paths in sysroot %s to add to RPATH section: %s", sysroot, | ||
| sysroot_lib_paths) | ||
| extra_rpaths += sysroot_lib_paths |
There was a problem hiding this comment.
If you are changing the dynamic linker, this should not be necessary since these are locations that are searched by default.
|
@casparvl Maybe we can spar on this? There are a couple of things that I don't think are being taken into account (and I was looking into them last week):
|
|
Yes, let's meet on this. Just a heads-up: this is a bit less pressing to me right now, so I don't think I'll be able to put a lot of time in implementing a solution. But I know that it may be relevant for you from an EFP point of view. We can definitely brainstorm on this, and then maybe you can do the (re-)implementation of this idea - and I could review/test? Anyway, let's get in touch on chat to set a meeting, |
Supersedes #3571