When using RPATH linking (e.g., in EESSI) we need to ensure that all directories containing shared libraries must be listed in $LIBRARY_PATH. Otherwise the RPATH linker wrapper would not add these directories to the RPATH header, and thus the libraries cannot be resolved by the dynamic linker later.
Here, we add two directories to LIBRARY_PATH such that corresponding prepend_path commands are added to the module file for CUDA. These directories are known to the easyblock, but currently only added to $LD_LIBRARY_PATH which is filtered in EESSI.
To restrict the change to certain environments, it is only used when LD_LIBRARY_PATH is a filtered environment variable and LIBRARY_PATH is not.
When using
RPATH
linking (e.g., in EESSI) we need to ensure that all directories containing shared libraries must be listed in$LIBRARY_PATH
. Otherwise the RPATH linker wrapper would not add these directories to the RPATH header, and thus the libraries cannot be resolved by the dynamic linker later.Here, we add two directories to
LIBRARY_PATH
such that correspondingprepend_path
commands are added to the module file for CUDA. These directories are known to the easyblock, but currently only added to$LD_LIBRARY_PATH
which is filtered in EESSI.To restrict the change to certain environments, it is only used when
LD_LIBRARY_PATH
is a filtered environment variable andLIBRARY_PATH
is not.