Bugfix spack module files (#39282)

* Fixed the LD_LIBRARY_PATH to use the lib64 directory.
* On AMD systems the llvm/lib directory is not properly put into the LD_LIBRARY_PATH.
* Added both lib and lib64 paths for libfabric.
* Split the prepend statements.
This commit is contained in:
Brian Van Essen
2023-08-05 20:26:00 -07:00
committed by GitHub
parent ef544a3b6d
commit 8cd9497522
2 changed files with 12 additions and 0 deletions

View File

@@ -157,11 +157,13 @@ def setup_build_environment(self, env):
def setup_run_environment(self, env):
libfabric_home = self.spec["libfabric"].prefix
env.prepend_path("LD_LIBRARY_PATH", libfabric_home.lib)
env.prepend_path("LD_LIBRARY_PATH", libfabric_home.lib64)
# To enable this package add it to the LD_LIBRARY_PATH
def setup_dependent_run_environment(self, env, dependent_spec):
libfabric_home = self.spec["libfabric"].prefix
env.prepend_path("LD_LIBRARY_PATH", libfabric_home.lib)
env.prepend_path("LD_LIBRARY_PATH", libfabric_home.lib64)
@when("@main")
def autoreconf(self, spec, prefix):

View File

@@ -307,3 +307,13 @@ def determine_version(cls, path):
int(match.group(1)), int(match.group(2)), int(match.group(3))
)
return detected_version
# Make sure that the compiler paths are in the LD_LIBRARY_PATH
def setup_run_environment(self, env):
llvm_amdgpu_home = self.spec["llvm-amdgpu"].prefix
env.prepend_path("LD_LIBRARY_PATH", llvm_amdgpu_home + "/llvm/lib")
# Make sure that the compiler paths are in the LD_LIBRARY_PATH
def setup_dependent_run_environment(self, env, dependent_spec):
llvm_amdgpu_home = self.spec["llvm-amdgpu"].prefix
env.prepend_path("LD_LIBRARY_PATH", llvm_amdgpu_home + "/llvm/lib")