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

Restructure RPATH and elf interpreter setting for Java, and add the LIBRARY_PATH to the additional RPATH #3571

Closed
wants to merge 30 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
e2a6a45
Restructure RPATH and elf interpreter setting for Java, and add the L…
Jan 29, 2025
af2f85e
Fix hound issues
Jan 29, 2025
c2e0795
Remove blank line
Jan 29, 2025
a7267f3
Make sure libraries in /lib/server are also found
Jan 29, 2025
aee12db
fix variable name
Jan 29, 2025
b012847
Make sure the paths appear before the paths from LIBRARY_PATH
Jan 29, 2025
18b20e5
Make running the RPATH sanity check optional for Binary, instead of s…
Jan 30, 2025
eaf3f74
Overwrite run_rpath_sanity_check with True for Java, since we have pa…
Jan 30, 2025
ed4f113
Fix hound issues
Jan 30, 2025
83e1976
Make sure to return extra_options
Jan 30, 2025
8af9549
Remove blank lines
Jan 30, 2025
3169ab8
Make sure to return the failures from sanity_check_rpath()
Jan 30, 2025
11d4bf3
Use --force-rpath to make sure an RPATH gets set, and not RUNPATH
Jan 30, 2025
446692b
Fix order of arguments to patchelf
Jan 30, 2025
4284264
Also use --force-rpath when shrinking the rpath, to see if that helps
Jan 30, 2025
70ae426
Fix RPATH also for executables in the libdir
Jan 30, 2025
7d508e0
Move RPATH patching to binary easyblock level. Then, enable it by de…
Jan 30, 2025
616cc64
Forgot comma
Jan 30, 2025
4701009
Fix indent
Jan 30, 2025
9a500f9
Fix syntax errors
Jan 30, 2025
ed87e04
Fix imports, smaller issues
Jan 30, 2025
9b1e8f8
Make sure the function that should determine the extra RPATHS actuall…
Jan 30, 2025
5151c73
Some more fixes of imports and other small mistakes
Jan 30, 2025
13b4f30
Make sure that sysroot variable is set inside the function determinin…
Jan 30, 2025
0ff262b
Some more debug loggin and check that extra_rpaths option is a list, …
Jan 30, 2025
c45a7e7
Use installdir, as EBROOTJAVA isn't set yet at postinstallcmds time. …
Jan 30, 2025
c3580a4
Remove commented section, which is no longer needed
Jan 30, 2025
980b045
Clarify the potential TODO
Jan 30, 2025
65672ee
Fix indents
Jan 30, 2025
7ec9440
Clean up unused imports
Jan 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Some more debug loggin and check that extra_rpaths option is a list, …
…as it shouyld be
Caspar van Leeuwen committed Jan 30, 2025
commit 0ff262b5b61d4d92d8f29746cc6f530aeee44c5f
7 changes: 6 additions & 1 deletion easybuild/easyblocks/generic/binary.py
Original file line number Diff line number Diff line change
@@ -186,17 +186,22 @@ def _determine_extra_rpaths(self, add_library_path_to_rpath, add_sysroot_libdirs
# TODO: make sure this function ignores anything in filter_rpath_sanity_libs
extra_rpaths = []
extra_rpaths_from_option = self.cfg.get('extra_rpaths', None)
if not isinstance(extra_rpaths_from_option, list):
raise EasyBuildError("extra_rpaths option should be a list (got '%s')", extra_rpaths_from_option)
if extra_rpaths_from_option:
self.log.debug("Extra paths to be added to RPATH, specified through extra_rpaths: %s",
extra_rpaths_from_option)
# Replace any $EBROOT* variables by their value
pattern = r"(\$EBROOT[^/]+)(.*)"

# Modify the list in place
self.log.debug("Resolving any environment variables in extra_rpaths")
for i, path in enumerate(extra_rpaths_from_option):
self.log.debug("Matching '%s' with pattern '%s'", path, pattern)
match = re.match(pattern, path)
if match:
env_var = match.group(1)
env_var = match.group(1)
self.log.debug("Found environment variable in extra_paths: %s", env_var)
rest_of_path = match.group(2)
env_value = os.environ.get(env_var, None)
if env_value is None: