From 08cdb2275ccb767561b710d44c0e12a24875da6e Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 6 Nov 2023 13:30:13 -0800 Subject: [PATCH 1/4] build/pkgs/openblas: Stop openblas from using explicit 'make -j' --- build/pkgs/openblas/spkg-install.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/pkgs/openblas/spkg-install.in b/build/pkgs/openblas/spkg-install.in index 00413ca517d..eacd993e9d6 100644 --- a/build/pkgs/openblas/spkg-install.in +++ b/build/pkgs/openblas/spkg-install.in @@ -34,6 +34,9 @@ fi echo "Building OpenBLAS: $MAKE $OPENBLAS_CONFIGURE" +# Do not emit "-j" options +export MAKE_NB_JOBS=0 + # Ensure USE_TLS=1 ; see https://github.com/sagemath/sage/issues/27256 OPENBLAS_CONFIGURE="$OPENBLAS_CONFIGURE USE_TLS=1" From 91a4e0617b224eae0818bd6518bba56caca33d1d Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 6 Nov 2023 17:08:23 -0800 Subject: [PATCH 2/4] build/pkgs/openblas/spkg-install.in: Put MAKE_NB_JOBS in OPENBLAS_CONFIGURE --- build/pkgs/openblas/spkg-install.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pkgs/openblas/spkg-install.in b/build/pkgs/openblas/spkg-install.in index eacd993e9d6..5050e165787 100644 --- a/build/pkgs/openblas/spkg-install.in +++ b/build/pkgs/openblas/spkg-install.in @@ -35,7 +35,7 @@ fi echo "Building OpenBLAS: $MAKE $OPENBLAS_CONFIGURE" # Do not emit "-j" options -export MAKE_NB_JOBS=0 +OPENBLAS_CONFIGURE+=" MAKE_NB_JOBS=0" # Ensure USE_TLS=1 ; see https://github.com/sagemath/sage/issues/27256 OPENBLAS_CONFIGURE="$OPENBLAS_CONFIGURE USE_TLS=1" From d2f56d204da9278169296d36a53fc4fd7009bf4a Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 6 Nov 2023 18:01:25 -0800 Subject: [PATCH 3/4] build/pkgs/openblas/spkg-install.in: Work around hang with GNU make 3.81 (ubuntu-trusty) --- build/pkgs/openblas/spkg-install.in | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/build/pkgs/openblas/spkg-install.in b/build/pkgs/openblas/spkg-install.in index 5050e165787..006067800af 100644 --- a/build/pkgs/openblas/spkg-install.in +++ b/build/pkgs/openblas/spkg-install.in @@ -34,8 +34,13 @@ fi echo "Building OpenBLAS: $MAKE $OPENBLAS_CONFIGURE" -# Do not emit "-j" options -OPENBLAS_CONFIGURE+=" MAKE_NB_JOBS=0" +if $MAKE --version | grep -q -F '3.81'; then + # Work around https://savannah.gnu.org/bugs/?15919 + OPENBLAS_CONFIGURE+=" MAKE_NB_JOBS=1" +else + # Do not emit "-j" options; use jobserver + OPENBLAS_CONFIGURE+=" MAKE_NB_JOBS=0" +fi # Ensure USE_TLS=1 ; see https://github.com/sagemath/sage/issues/27256 OPENBLAS_CONFIGURE="$OPENBLAS_CONFIGURE USE_TLS=1" From 6d1a957d2b540da8717eb7d9b86f3f4005b22c6a Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 7 Nov 2023 10:04:07 -0800 Subject: [PATCH 4/4] build/pkgs/openblas/spkg-install.in: Build targets libs, netlib, shared in separate make invocations --- build/pkgs/openblas/spkg-install.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/pkgs/openblas/spkg-install.in b/build/pkgs/openblas/spkg-install.in index 006067800af..2f8aea512bc 100644 --- a/build/pkgs/openblas/spkg-install.in +++ b/build/pkgs/openblas/spkg-install.in @@ -45,7 +45,7 @@ fi # Ensure USE_TLS=1 ; see https://github.com/sagemath/sage/issues/27256 OPENBLAS_CONFIGURE="$OPENBLAS_CONFIGURE USE_TLS=1" -if ! (sdh_make libs netlib shared $OPENBLAS_CONFIGURE); then +if ! (sdh_make libs $OPENBLAS_CONFIGURE && sdh_make netlib $OPENBLAS_CONFIGURE && sdh_make shared $OPENBLAS_CONFIGURE); then if [[ $OPENBLAS_CONFIGURE == *"TARGET"* ]]; then sdh_die "Error building OpenBLAS" else @@ -55,7 +55,7 @@ if ! (sdh_make libs netlib shared $OPENBLAS_CONFIGURE); then echo "Error building OpenBLAS" echo "Retrying building OpenBLAS: $MAKE $OPENBLAS_CONFIGURE" sdh_make clean - sdh_make libs netlib shared $OPENBLAS_CONFIGURE + sdh_make libs $OPENBLAS_CONFIGURE && sdh_make netlib $OPENBLAS_CONFIGURE && sdh_make shared $OPENBLAS_CONFIGURE fi fi