Project

General

Profile

Bug #24787

pull request upstream: find_library allow foo.so.2, foo.so.3, etc.

Added by Marc Mengel 2 months ago. Updated 2 months ago.

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

0%

Estimated time:
Duration:

Description

--- 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

History

#1 Updated by Marc Mengel 2 months ago

branch feature/allow_so_n created



Also available in: Atom PDF