Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make $LD_LIBRARY_PATH detection more robust for LAMMPS #2765

Merged
merged 3 commits into from
Aug 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions easybuild/easyblocks/l/lammps.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,9 +454,9 @@ def sanity_check_step(self, *args, **kwargs):
# Requires liblammps.so to be findable by the runtime linker (which it might not be if using
# rpath and filtering out LD_LIBRARY_PATH)
set_ld_library_path = ''
if 'LD_LIBRARY_PATH' not in os.environ:
if self.installdir not in os.getenv('LD_LIBRARY_PATH', default=''):
# Use LIBRARY_PATH to set it
set_ld_library_path = "LD_LIBRARY_PATH=$LIBRARY_PATH "
set_ld_library_path = "LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH "
custom_commands = ["cd %s && " % execution_dir + set_ld_library_path + cmd for cmd in custom_commands]

shlib_ext = get_shared_lib_ext()
Expand Down