summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorHarmen Stoppels <harmenstoppels@gmail.com>2022-11-04 00:34:00 +0100
committerGitHub <noreply@github.com>2022-11-03 17:34:00 -0600
commitb52be759788cf20f1458c80e6e005744f5856c73 (patch)
treea53db50ae7ca4ea9e779be099faee6581fc24eda /etc
parent7fc49c42ee27bcd2629e3ac112e63da460d9a26c (diff)
downloadspack-b52be759788cf20f1458c80e6e005744f5856c73.tar.gz
spack-b52be759788cf20f1458c80e6e005744f5856c73.tar.bz2
spack-b52be759788cf20f1458c80e6e005744f5856c73.tar.xz
spack-b52be759788cf20f1458c80e6e005744f5856c73.zip
Experimental binding of shared ELF libraries (#31948)
Adds another post install hook that loops over the install prefix, looking for shared libraries type of ELF files, and sets the soname to their own absolute paths. The idea being, whenever somebody links against those libraries, the linker copies the soname (which is the absolute path to the library) as a "needed" library, so that at runtime the dynamic loader realizes the needed library is a path which should be loaded directly without searching. As a result: 1. rpaths are not used for the fixed/static list of needed libraries in the dynamic section (only for _actually_ dynamically loaded libraries through `dlopen`), which largely solves the issue that Spack's rpaths are a heuristic (`<prefix>/lib` and `<prefix>/lib64` might not be where libraries really are...) 2. improved startup times (no library search required)
Diffstat (limited to 'etc')
-rw-r--r--etc/spack/defaults/config.yaml18
1 files changed, 14 insertions, 4 deletions
diff --git a/etc/spack/defaults/config.yaml b/etc/spack/defaults/config.yaml
index e72608248f..b3356428fe 100644
--- a/etc/spack/defaults/config.yaml
+++ b/etc/spack/defaults/config.yaml
@@ -187,10 +187,20 @@ config:
package_lock_timeout: null
- # Control whether Spack embeds RPATH or RUNPATH attributes in ELF binaries.
- # Has no effect on macOS. DO NOT MIX these within the same install tree.
- # See the Spack documentation for details.
- shared_linking: 'rpath'
+ # Control how shared libraries are located at runtime on Linux. See the
+ # the Spack documentation for details.
+ shared_linking:
+ # Spack automatically embeds runtime search paths in ELF binaries for their
+ # dependencies. Their type can either be "rpath" or "runpath". For glibc, rpath is
+ # inherited and has precedence over LD_LIBRARY_PATH; runpath is not inherited
+ # and of lower precedence. DO NOT MIX these within the same install tree.
+ type: rpath
+
+
+ # (Experimental) Embed absolute paths of dependent libraries directly in ELF
+ # binaries to avoid runtime search. This can improve startup time of
+ # executables with many dependencies, in particular on slow filesystems.
+ bind: false
# Set to 'false' to allow installation on filesystems that doesn't allow setgid bit