sagemath/sage

Re-run configure+make after installing an SPKG with sage -i

Closed this issue · 31 comments

This is an idea for fixing #27373.

As explained in comment#73 on that ticket, after installing a new package it is really necessary to re-run configure after installing a new package, whether it was an optional package that was not previously installed, or a standard package that was not previously installed (due to a configure-time check determining that it was not needed).

This is to ensure that files generated by configure reflect the new system configuration, in terms of what SPKGs are installed.

Further, it is advisable to re-run make all-build in case the sage -i installed packages whose dependents need to be rebuilt.

This also needs to ensure that if an SPKG is installed for some standard package, that we account for that when re-running configure: It must not try again to check the system for that dependency, and just reflect that the SPKG is installed. For example, from #27373, if Sage is first built using GMP/MPIR from the system, then we run sage -i mpir, the system configuration must be updated to reflect that we are now using the mpir SPKG instead of GMP/MPIR from the system. It's also necessary to rebuilt any of its dependent packages.

Depends on #27641

CC: @dimpase

Component: build

Author: Erik Bray

Branch/Commit: public/build/ticket-27642 @ e168732

Reviewer: Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/27642

comment:1

This branch mostly fixes the bug in #27373 for me.

As noted in the commit message this does not yet preserve arguments previously passed to configure. I think we can fix that by running ./config.status --config but I need to test that a bit more.


Last 10 new commits:

687cdf0Replace various --with-gmp=$SAGE_LOCAL flags in spkg-installs with a
6de961dReworked this a bit more
f76d6d5fix typo
5f90ff7added a bit more explanation
3dee97ccorrect logic for SAGE_GMP_PREFIX etc
0308142add the AX_ABSOLUTE_HEADER macro
eea0685iml in particular is very picky about being given an absolute path to the
6f29e86Add support for unconditional pre- and post-check actions in spkg-configure.m4
a2bab81Refactor the mpir/spkg-configure.m4 (and to a lesser extent the one for gmp) to use the new pre and post arguments to SAGE_SPKG_CONFIGURE
a29056aTrac #27642: Initial attempt at fix: re-run `configure` and `make all-build` after

Author: Erik Bray

Commit: a29056a

comment:2

could you rebase it?

Changed commit from a29056a to 248c071

New commits:

191269eAdd support for unconditional pre- and post-check actions in spkg-configure.m4
f9c9a91Refactor the mpir/spkg-configure.m4 (and to a lesser extent the one for gmp) to use the new pre and post arguments to SAGE_SPKG_CONFIGURE
248c071Trac #27642: Initial attempt at fix: re-run `configure` and `make all-build` after
comment:4

Trying this with ./configure leaves gmp not marked as an not to be installed, while mpir is marked as not to be installed. (to be fixed on #27641).

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

191269eAdd support for unconditional pre- and post-check actions in spkg-configure.m4
1c24df1Refactor the mpir/spkg-configure.m4 (and to a lesser extent the one for gmp) to use the new pre and post arguments to SAGE_SPKG_CONFIGURE
dc8fd7fRefactor the mpir/spkg-configure.m4 (and to a lesser extent the one for gmp) to use the new pre and post arguments to SAGE_SPKG_CONFIGURE
4bce1a3Trac #27642: Initial attempt at fix: re-run `configure` and `make all-build` after

Changed commit from 248c071 to 4bce1a3

comment:6

rebased over updated #27641

Reviewer: Dima Pasechnik

comment:7

now this branch leaves gmp not marked as an not to be installed, while mpir is marked as not to be installed, despite being fixed on #27641...

comment:8

Your rebasing did not apparently include the fixes I made to #27641 (compare gmp/spkg-configure.m4)

comment:9

gmp/spkg-configure.m4 was not touched on #27641, have a look at git show 1c24df1.
`

comment:10

More precisely, you overwrote this change in #27641 comment:15

comment:11

Right. That was intentional. It should not be changed.

comment:12

Replying to @embray:

Right. That was intentional. It should not be changed.

Should I re-create the un-rebased branch and try again, or it's simply removing the changes to gmp/spkg-configure.m4 that would do?

Changed commit from 4bce1a3 to 18d612d

Branch pushed to git repo; I updated commit sha1. New commits:

18d612dleave GMP's spkg-configure.m4 as it was
comment:15

This is a bit of a mess. I just need to rebase on top of the final version of #27641, not add spurious new commits.

Changed commit from 18d612d to e168732

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

d9bbdd4Add support for unconditional pre- and post-check actions in spkg-configure.m4
a360518Refactor the mpir/spkg-configure.m4 (and to a lesser extent the one for gmp) to use the new pre and post arguments to SAGE_SPKG_CONFIGURE
e168732Trac #27642: Initial attempt at fix: re-run `configure` and `make all-build` after
comment:17

Updated to the final version of #27641. Still need to kick around a bit with making sure it can preserve previous configure flags.

comment:18

Too late, a previous version of this branch was released in 8.8.beta5

comment:19

I am afraid it has to be reverted. It's not good as it is now.

comment:20

See #27820

comment:21

I'm confused. How was it merged? It was not set to positive review, and you never replaced the branch with the merge commit as in your usual process?

comment:22

Replying to @embray:

I'm confused. How was it merged? It was not set to positive review,

it was, see comment:14

I gather it wasn't merged in the usual way as it didn't come with a (formally) needed configure bump

comment:23

I can confirm that this branch is merged in 8.8.rc0.
So this is done and dusted.