Detect if libraries are installed in lib and/or lib64 directories for appending to LD_LIBRARY_PATH.
authorSmith, Steve <smith84@llnl.gov>
Thu, 08 Nov 2018 11:19:05 -0800
changeset 427 6e673e7d365c
parent 426 1b29c11c9789
child 428 8068ae6e90f6
Detect if libraries are installed in lib and/or lib64 directories for appending to LD_LIBRARY_PATH.
bake/ModuleEnvironment.py
--- a/bake/ModuleEnvironment.py	Wed Oct 03 07:34:21 2018 -0700
+++ b/bake/ModuleEnvironment.py	Thu Nov 08 11:19:05 2018 -0800
@@ -376,8 +376,11 @@
                  "fi \n\n"
 
         self._binpaths.add(self._bin_path())
-        self._libpaths.add(self._lib_path())
-        
+        if os.path.isdir(self._lib_path()):
+            self._libpaths.add(self._lib_path())
+        if os.path.isdir(self._lib_path()+'64'):
+            self._libpaths.add(self._lib_path()+'64')
+
         if len(self._libpaths) > 0:
             script = script + self.add_onPath("LD_LIBRARY_PATH", self._libpaths) + "\n"