Reimplement `sage -i SPKG` for optional/experimental packages as `configure --enable-SPKG && make build`
mkoeppe opened this issue · 17 comments
#28095 adds configure --enable-SPKG.
As a follow-up, using this new interface we reimplement sage -i for optional/experimental packages, falling back to direct invocation of make for all other packages.
CC: @dimpase @embray @jhpalmieri
Component: build
Author: Matthias Koeppe
Branch/Commit: 3417f43
Reviewer: John Palmieri
Issue created by migration from https://trac.sagemath.org/ticket/29113
Description changed:
---
+++
@@ -2,3 +2,4 @@
As a follow-up, using this new interface we reimplement `sage -i`.
+Also, we issue warnings regarding experimental packages at configure time, rather than at `make` time. Ah, I misread this at first--I thought you were proposing to replace sage -i as the way to install optional packages.
If I understand correctly though, you are just proposing a change to how it works internally. If so I'm +1.
Author: Matthias Koeppe
New commits:
3417f43 | src/bin/sage: Handle 'sage -i SPKG' for optional/experimental packages by configure --enable-SPKG |
Description changed:
---
+++
@@ -1,5 +1,6 @@
#28095 adds `configure --enable-SPKG`.
-As a follow-up, using this new interface we reimplement `sage -i`.
+As a follow-up, using this new interface we reimplement `sage -i` for optional/experimental packages, falling back to direct invocation of make for all other packages.
-Also, we issue warnings regarding experimental packages at configure time, rather than at `make` time.
+
+I took a fresh tarball and merged this branch. When I ran ./sage -i meataxe, it ran configure three times in a row. Is this expected?
By the way, after running ./sage -i meataxe or ./configure --enable-meataxe, config.log still says
configure:30333: result: meataxe-1.0.p0: does not support check for system package; optional, use "./configure --enable-meataxe" to install
It would be nice if this actually noted that the user has requested its installation.
Replying to @jhpalmieri:
I took a fresh tarball and merged this branch. When I ran
./sage -i meataxe, it ranconfigurethree times in a row. Is this expected?
That's clearly too much.
Replying to @jhpalmieri:
By the way, after running
./sage -i meataxeor./configure --enable-meataxe,config.logstill saysconfigure:30333: result: meataxe-1.0.p0: does not support check for system package; optional, use "./configure --enable-meataxe" to installIt would be nice if this actually noted that the user has requested its installation.
That's #29363 "At the end of configure, indicate which optional/experimental packages are configured to be installed"
Replying to @mkoeppe:
Replying to @jhpalmieri:
I took a fresh tarball and merged this branch. When I ran
./sage -i meataxe, it ranconfigurethree times in a row. Is this expected?That's clearly too much.
With a fully built Sage, running ./sage -i -p_group_cohomology just ran configure once.
Let me clarify about the other case. I took a fresh tarball for 9.1.beta8, got this branch and ran git rebase develop. That's when configure ran three times. The first time:
% ./sage -i meataxe
make -j6 build/make/Makefile --stop
make[1]: warning: -jN forced in submake: disabling jobserver mode.
rm -f config.log
mkdir -p logs/pkgs
ln -s logs/pkgs/config.log config.log
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... config/install-sh -c -d
checking for gawk... no
...
The second time:
real 0m0.206s
user 0m0.156s
sys 0m0.038s
Sage build/upgrade complete!
running ./configure '--enable-meataxe'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... config/install-sh -c -d
checking for gawk... no
The third time:
checking for the package system in use... homebrew
configure: No equivalent system packages for homebrew are known to Sage
make -j6 build/make/Makefile --stop
make[1]: warning: -jN forced in submake: disabling jobserver mode.
rm -f config.log
mkdir -p logs/pkgs
ln -s logs/pkgs/config.log config.log
running CONFIG_SHELL=/bin/sh /bin/sh ./configure --enable-meataxe --no-create --no-recursion
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... config/install-sh -c -d
checking for gawk... no
If I start with a 9.1.beta7 tarball and use this branch, configure only runs twice.
these multiple runs of configure, in some cases up to 3 times, also happen without this branch. so this is not a regression.
Replying to @dimpase:
these multiple runs of configure, in some cases up to 3 times, also happen without this branch. so this is not a regression.
I agree. But independent of this ticket, we should probably look at some point how to clean this up a bit.
Well, I'm happy with this. Positive review from me. Dima (or @embray, if you're active these days), if you want to look at it more, feel free to set back to needs review.
Reviewer: John Palmieri
Changed branch from u/mkoeppe/reimplement__sage__i_spkg__as__configure___enable_spkg____make_build_ to 3417f43