From e804671fc0cea34f99c29412644b330f26060de0 Mon Sep 17 00:00:00 2001 From: Brian Van Essen Date: Thu, 12 Jan 2023 11:41:17 -0800 Subject: 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. --- var/spack/repos/builtin/packages/rdma-core/package.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'var') 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 -- cgit v1.2.3-70-g09d2