diff options
author | vvolkl <valentin.volkl@cern.ch> | 2020-06-16 08:31:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-15 23:31:41 -0700 |
commit | e28561241bb63b1661105b76e4ab91bc8d62027d (patch) | |
tree | 0e57e81540def4fa32910bc31a9d56c33eff10a8 | |
parent | 9f73e60ba9d3775ef4dda9c815412f28ed80b518 (diff) | |
download | spack-e28561241bb63b1661105b76e4ab91bc8d62027d.tar.gz spack-e28561241bb63b1661105b76e4ab91bc8d62027d.tar.bz2 spack-e28561241bb63b1661105b76e4ab91bc8d62027d.tar.xz spack-e28561241bb63b1661105b76e4ab91bc8d62027d.zip |
ROOT: set LD_LIBRARY_PATH when ~rpath (#16899)
Allow Spack to build with ROOT as an external dependency by setting
LD_LIBRARY_PATH: given that the external package was not built by
Spack, dependents would not be able to locate libraries using RPATHs
when running ROOT binaries.
-rw-r--r-- | var/spack/repos/builtin/packages/root/package.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/root/package.py b/var/spack/repos/builtin/packages/root/package.py index b1591f455e..0e590e30ae 100644 --- a/var/spack/repos/builtin/packages/root/package.py +++ b/var/spack/repos/builtin/packages/root/package.py @@ -492,12 +492,16 @@ class Root(CMakePackage): env.prepend_path('PATH', self.prefix.bin) env.append_path('CMAKE_MODULE_PATH', '{0}/cmake' .format(self.prefix)) + if "+rpath" not in self.spec: + env.prepend_path('LD_LIBRARY_PATH', self.prefix.lib) def setup_dependent_run_environment(self, env, dependent_spec): env.set('ROOTSYS', self.prefix) env.set('ROOT_VERSION', 'v{0}'.format(self.version.up_to(1))) env.prepend_path('PYTHONPATH', self.prefix.lib) env.prepend_path('PATH', self.prefix.bin) + if "+rpath" not in self.spec: + env.prepend_path('LD_LIBRARY_PATH', self.prefix.lib) def _process_opts(self, *opt_lists): """Process all provided boolean option lists into CMake arguments. |