easybuilders / easybuild-easyblocks

Collection of easyblocks that implement support for building and installing software with EasyBuild.
https://easybuild.io
GNU General Public License v2.0
106 stars 283 forks source link

add CUPTI and nvvm lib dirs to LIBRARY_PATH #3516

Open trz42 opened 5 days ago

trz42 commented 5 days ago

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.