summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Van Essen <vanessen1@llnl.gov>2023-01-12 11:41:17 -0800
committerGitHub <noreply@github.com>2023-01-12 11:41:17 -0800
commite804671fc0cea34f99c29412644b330f26060de0 (patch)
tree7b7d81ebf781e7a81a21b17cef987a7470de66d7
parentc0b458e38a6b1403227d83966f3200869c18a5d4 (diff)
downloadspack-e804671fc0cea34f99c29412644b330f26060de0.tar.gz
spack-e804671fc0cea34f99c29412644b330f26060de0.tar.bz2
spack-e804671fc0cea34f99c29412644b330f26060de0.tar.xz
spack-e804671fc0cea34f99c29412644b330f26060de0.zip
bugfix rmda-core external find library (#34484)
* Added a more robust check for an external version of the library. Included a guard to identify when the library gives no discernible version information and then to substitute with "unknown_ver" identifier.
-rw-r--r--var/spack/repos/builtin/packages/rdma-core/package.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/rdma-core/package.py b/var/spack/repos/builtin/packages/rdma-core/package.py
index 9d90b9a3bb..ee4931e18d 100644
--- a/var/spack/repos/builtin/packages/rdma-core/package.py
+++ b/var/spack/repos/builtin/packages/rdma-core/package.py
@@ -64,7 +64,12 @@ class RdmaCore(CMakePackage):
@classmethod
def determine_version(cls, lib):
- match = re.search(r"lib\S*\.so\.\d+\.\d+\.(\d+\.\d+)", lib)
+ match = re.search(r"lib\S*\.so\.\d+\.\d+\.(\d+(?:\.\d+)?)", lib)
+ if match and match.group(1) == "0":
+ # On some systems there is a truncated shared library name that does not
+ # sufficient version information, return a clear indicator of that
+ return "unknown_ver"
+
return match.group(1) if match else None
# NOTE: specify CMAKE_INSTALL_RUNDIR explicitly to prevent rdma-core from