From af0e24286a62a06d85e1baf49d0dc8f624965e5c Mon Sep 17 00:00:00 2001 From: Volker Braun Date: Sun, 7 Apr 2024 19:17:37 +0200 Subject: [PATCH] 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) ])