Project

General

Profile

Feature #24479

system package dependency check

Added by Marc Mengel about 1 month ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
05/27/2020
Due date:
% Done:

0%

Estimated time:
Duration:

Description

allow libfred.so.1 as well as libfred.so for package fred library checks.

--- a/lib/spack/llnl/util/filesystem.py
+++ b/lib/spack/llnl/util/filesystem.py
@@ -1535,6 +1535,13 @@ def find_libraries(libraries, root, shared=True, recursive=False):
         suffix = 'a'
     # List of libraries we are searching with suffixes
     libraries = ['{0}.{1}'.format(lib, suffix) for lib in libraries]
+    if suffix == 'so':
+        # runtime on many Linuxes has libfoo.so.3 rather than 
+        # libfoo.so.. 
+        # note: might be faster to glob for this later and lose the artificial
+        # limit of major version 20..
+        librariesn = ['{0}.{1}'.format(lib,str(n)) for n in range(20) for lib in libraries]
+        libraries = libraries + librariesn

     if not recursive:
         # If not recursive, look for the libraries directly in root


Also available in: Atom PDF