Skip to content

Commit fd45c71

Browse files
authored
Merge pull request #3717 from migueldiascosta/fujitsu_append_library_path
only add fujitsu libdir to LIBRARY_PATH if it's not already there
2 parents a674838 + 3f58769 commit fd45c71

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

easybuild/toolchains/compiler/fujitsu.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,11 @@ def prepare(self, *args, **kwargs):
8989
super(FujitsuCompiler, self).prepare(*args, **kwargs)
9090

9191
# make sure the fujitsu module libraries are found (and added to rpath by wrapper)
92+
library_path = os.getenv('LIBRARY_PATH', '')
9293
libdir = os.path.join(os.getenv(TC_CONSTANT_MODULE_VAR), 'lib64')
93-
self.log.debug("Adding %s to $LIBRARY_PATH" % libdir)
94-
env.setvar('LIBRARY_PATH', os.pathsep.join([os.getenv('LIBRARY_PATH', ''), libdir]))
94+
if libdir not in library_path:
95+
self.log.debug("Adding %s to $LIBRARY_PATH" % libdir)
96+
env.setvar('LIBRARY_PATH', os.pathsep.join([library_path, libdir]))
9597

9698
def _set_compiler_vars(self):
9799
super(FujitsuCompiler, self)._set_compiler_vars()

0 commit comments

Comments
 (0)