From af0e24286a62a06d85e1baf49d0dc8f624965e5c Mon Sep 17 00:00:00 2001 From: Volker Braun Date: Sun, 7 Apr 2024 19:17:37 +0200 Subject: [PATCH 1/4] ECM-related tests fail after an incremental build This is because setting the default ECMBIN=ecm is only done when using the configure test, but not when skipping the configure test because the spkg is already installed. Steps to reproduce: * ecm is not installed in the base os * Sage make distclean && make succeeeds * Tests succeed * re-running ./bootstrap && ./configure && make works * Tests now fail with PermissionError: [Errno 13] Permission denied: '' See also: * https://github.com/sagemath/sage/pull/37701 * https://github.com/sagemath/sage/pull/37011#issuecomment-2023089743 --- build/pkgs/ecm/spkg-configure.m4 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/build/pkgs/ecm/spkg-configure.m4 b/build/pkgs/ecm/spkg-configure.m4 index dbc76db0001..e0a397100ba 100644 --- a/build/pkgs/ecm/spkg-configure.m4 +++ b/build/pkgs/ecm/spkg-configure.m4 @@ -1,6 +1,6 @@ SAGE_SPKG_CONFIGURE([ecm], [ + # CHECK - test whether the package is already installed m4_pushdef([SAGE_ECM_MINVER],[7.0.4]) - ECMBIN=ecm SAGE_SPKG_DEPCHECK([gmp], [ AC_CHECK_HEADER(ecm.h, [ AX_ABSOLUTE_HEADER([ecm.h]) @@ -35,5 +35,12 @@ SAGE_SPKG_CONFIGURE([ecm], [ ], [sage_spkg_install_ecm=yes]) ]) m4_popdef([SAGE_ECM_MINVER]) +], [ + # REQUIRED-check is empty +], [ + # PRE - always perform + ECMBIN=ecm +], [ + # POST - always perform AC_SUBST(SAGE_ECMBIN, $ECMBIN) ]) From 6531f7e415230d62fecd0a38fd804081341a9f32 Mon Sep 17 00:00:00 2001 From: Volker Braun Date: Sun, 7 Apr 2024 21:35:38 +0200 Subject: [PATCH 2/4] Update build/pkgs/ecm/spkg-configure.m4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Matthias Köppe --- build/pkgs/ecm/spkg-configure.m4 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build/pkgs/ecm/spkg-configure.m4 b/build/pkgs/ecm/spkg-configure.m4 index e0a397100ba..1c027607b31 100644 --- a/build/pkgs/ecm/spkg-configure.m4 +++ b/build/pkgs/ecm/spkg-configure.m4 @@ -1,5 +1,4 @@ -SAGE_SPKG_CONFIGURE([ecm], [ - # CHECK - test whether the package is already installed +SAGE_SPKG_CONFIGURE([ecm], [dnl CHECK - test whether the package is already installed m4_pushdef([SAGE_ECM_MINVER],[7.0.4]) SAGE_SPKG_DEPCHECK([gmp], [ AC_CHECK_HEADER(ecm.h, [ From fbf896681da3ad1fad6c164e4d5a7cf452ec2eec Mon Sep 17 00:00:00 2001 From: Volker Braun Date: Sun, 7 Apr 2024 21:35:42 +0200 Subject: [PATCH 3/4] Update build/pkgs/ecm/spkg-configure.m4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Matthias Köppe --- build/pkgs/ecm/spkg-configure.m4 | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/build/pkgs/ecm/spkg-configure.m4 b/build/pkgs/ecm/spkg-configure.m4 index 1c027607b31..00604e3aec9 100644 --- a/build/pkgs/ecm/spkg-configure.m4 +++ b/build/pkgs/ecm/spkg-configure.m4 @@ -34,12 +34,9 @@ SAGE_SPKG_CONFIGURE([ecm], [dnl CHECK - test whether the package is already inst ], [sage_spkg_install_ecm=yes]) ]) m4_popdef([SAGE_ECM_MINVER]) -], [ - # REQUIRED-check is empty -], [ - # PRE - always perform +], [dnl REQUIRED-check is empty +], [dnl PRE - always perform ECMBIN=ecm -], [ - # POST - always perform +], [dnl POST - always perform AC_SUBST(SAGE_ECMBIN, $ECMBIN) ]) From c8d260a6fe37cb0379690e57dab6fd2a3d5d8048 Mon Sep 17 00:00:00 2001 From: Volker Braun Date: Sun, 7 Apr 2024 22:13:11 +0200 Subject: [PATCH 4/4] Update build/pkgs/ecm/spkg-configure.m4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Matthias Köppe --- build/pkgs/ecm/spkg-configure.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pkgs/ecm/spkg-configure.m4 b/build/pkgs/ecm/spkg-configure.m4 index 00604e3aec9..987c1d4605e 100644 --- a/build/pkgs/ecm/spkg-configure.m4 +++ b/build/pkgs/ecm/spkg-configure.m4 @@ -38,5 +38,5 @@ SAGE_SPKG_CONFIGURE([ecm], [dnl CHECK - test whether the package is already inst ], [dnl PRE - always perform ECMBIN=ecm ], [dnl POST - always perform - AC_SUBST(SAGE_ECMBIN, $ECMBIN) + AC_SUBST([SAGE_ECMBIN], ["$ECMBIN"]) ])