summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarmen Stoppels <harmenstoppels@gmail.com>2023-02-18 21:27:34 +0100
committerGitHub <noreply@github.com>2023-02-18 12:27:34 -0800
commit011c28a5380d8a63c489eb1b97c3f8d0a50918d4 (patch)
tree513f95893ad9165644c6ec4b8206ec2c7213b0bc
parent86320eb5699036698d03b23c9cbf2dbf75422880 (diff)
downloadspack-011c28a5380d8a63c489eb1b97c3f8d0a50918d4.tar.gz
spack-011c28a5380d8a63c489eb1b97c3f8d0a50918d4.tar.bz2
spack-011c28a5380d8a63c489eb1b97c3f8d0a50918d4.tar.xz
spack-011c28a5380d8a63c489eb1b97c3f8d0a50918d4.zip
openblas: fix prereqs / make race (#35395)
Fix a race in the makefile where the shared lib was built before the object files were available. See https://github.com/xianyi/OpenBLAS/issues/3899
-rw-r--r--var/spack/repos/builtin/packages/openblas/fix-shared-tests-prereqs.patch14
-rw-r--r--var/spack/repos/builtin/packages/openblas/package.py4
2 files changed, 18 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/openblas/fix-shared-tests-prereqs.patch b/var/spack/repos/builtin/packages/openblas/fix-shared-tests-prereqs.patch
new file mode 100644
index 0000000000..75d8340acd
--- /dev/null
+++ b/var/spack/repos/builtin/packages/openblas/fix-shared-tests-prereqs.patch
@@ -0,0 +1,14 @@
+diff --git a/Makefile b/Makefile
+index 967ab1bb6..98666e853 100644
+--- a/Makefile
++++ b/Makefile
+@@ -42,6 +42,9 @@ SUBDIRS_ALL = $(SUBDIRS) test ctest utest exports benchmark ../laswp ../bench cp
+ .PHONY : all libs netlib $(RELA) test ctest shared install
+ .NOTPARALLEL : all libs $(RELA) prof lapack-test install blas-test
+
++shared: libs netlib $(RELA)
++tests: libs netlib $(RELA) shared
++
+ all :: libs netlib $(RELA) tests shared
+ @echo
+ @echo " OpenBLAS build complete. ($(LIB_COMPONENTS))"
diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py
index 93d6b1ff93..3d7f552f77 100644
--- a/var/spack/repos/builtin/packages/openblas/package.py
+++ b/var/spack/repos/builtin/packages/openblas/package.py
@@ -182,6 +182,10 @@ class Openblas(MakefilePackage):
when="@0.3.21 %gcc@:9",
)
+ # Generic fix (https://github.com/xianyi/OpenBLAS/pull/3902) so we don't
+ # have to build tests
+ patch("fix-shared-tests-prereqs.patch", when="@0.2.20:0.3.21")
+
# See https://github.com/spack/spack/issues/19932#issuecomment-733452619
# Notice: fixed on Amazon Linux GCC 7.3.1 (which is an unofficial version
# as GCC only has major.minor releases. But the bound :7.3.0 doesn't hurt)