Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

At the end of configure, show installation hints for non-enabled optional packages separately #29372

Closed
orlitzky opened this issue Mar 19, 2020 · 22 comments

Comments

@orlitzky
Copy link
Contributor

When running the configure script, --enable-foo and --disable-foo should be used to control the installation of optional packages.

Original wishlist item:

With respect to the system-package support, this means that ./configure should not try to find any optional packages that I don't want, and it shouldn't tell me to install them. For example,

$ ./configure
...
Checking whether SageMath should install SPKG gp2c...
checking installing pari? ... no
checking for gp2c... no
configure: using pari/gp from the system, but building gp2c
configure: one might prefer to install a system-wide gp2c, instead
configure: and re-run configure.
configure: gp prefix is /usr 
configure: pari.cfg is /usr/share/pari/pari.cfg 
configure: no suitable system package found for SPKG gp2c
using Sage's gp2c SPKG
...
gp2c-0.0.10.p0:                              no suitable system package; optional, use "./configure --enable-gp2c" to install
...
configure: Hint: The following SPKGs did not find equivalent system packages:
configure:   cbc gp2c libsemigroups
checking for the package system in use... gentoo
configure: Hint: Installing the following system packages is recommended and may avoid building some of the above SPKGs from source:
configure:   $ # install the following packages: sci-mathematics/gp2c

I guess this is partly due to the default of if_installed for --enable-foo (which I think is a bad default, but that's another matter), but the same thing happens if I explicitly pass --disable-gp2c.

In this ticket, as a milder change, we show the list of system packages corresponding to non-enabled optional packages separately.

To test this branch, remember to use ./bootstrap before ./configure.

Critical for Sage 9.3 because there is evidence that users get concerned when too many packages are suggested to be installed.

Related:

CC: @mkoeppe @dimpase @embray @slel @EmmanuelCharpentier

Component: build: configure

Author: Matthias Koeppe

Branch/Commit: 50b1b25

Reviewer: Samuel Lelièvre

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

@orlitzky orlitzky added this to the sage-9.1 milestone Mar 19, 2020
@mkoeppe
Copy link
Contributor

mkoeppe commented Mar 19, 2020

comment:1

To clarify, they are not "enabled". But the hints certainly make no distinction between enabled and non-enabled packages.

This ticket overlaps with #29363 - "At the end of configure, indicate which optional/experimental packages are configured to be installed". Help on this is very welcome!

@mkoeppe
Copy link
Contributor

mkoeppe commented Mar 19, 2020

comment:2

I guess this is partly due to the default of if_installed for --enable-foo (which I think is a bad default, but that's another matter)

Yes, the fact that an existing installation in SAGE_LOCAL influences configure's defaults is, of course, a quirk of Sage.
We should not change this because it has a long tradition; but it would be good to have an additional configure option to disable it and obtain more standard configure behavior.

@orlitzky
Copy link
Contributor Author

comment:3

I think it's reasonable to use an existing spkg if one exists, and I guess that's why if_installed was chosen as the default. But someone doing sage -i foo and someone just happening to have foo installed on the system express two very different intentions. This will become more apparent as we support more and more optional packages via spkg-configure, and they're all enabled by default.

@mkoeppe
Copy link
Contributor

mkoeppe commented Mar 19, 2020

comment:4

No, if_installed means "if installed as an SPKG in SAGE_LOCAL."

@mkoeppe
Copy link
Contributor

mkoeppe commented Mar 19, 2020

comment:5

"Enabling" an optional package really just means to make sure it is installed as an spkg if the system does not provide it already.

@orlitzky
Copy link
Contributor Author

comment:6

Replying to @mkoeppe:

No, if_installed means "if installed as an SPKG in SAGE_LOCAL."

Oh, OK. That's less crazy to me, then. But in that case, ./configure definitely should not be looking for those system packages and telling me to install them (since I've told it to use those packages only if they're installed as SPKGs).

@mkoeppe
Copy link
Contributor

mkoeppe commented Mar 19, 2020

comment:7

Replying to @orlitzky:

But in that case, ./configure definitely should not be looking for those system packages and telling me to install them (since I've told it to use those packages only if they're installed as SPKGs).

Yes, I agree that the hint should not be issued for disabled optional packages. Would you like to work on this improvement?

Testing for the system packages, on the other hand, is a bit trickier because they might be dependencies of an enabled optional package.

@mkoeppe mkoeppe changed the title optional packages should not be enabled automagically At the end of configure, show installation hints for disabled optional packages separately Mar 20, 2020
@mkoeppe mkoeppe modified the milestones: sage-9.1, sage-9.2 Apr 9, 2020
@mkoeppe mkoeppe modified the milestones: sage-9.2, sage-9.3 Aug 29, 2020
@slel

This comment has been minimized.

@mkoeppe
Copy link
Contributor

mkoeppe commented Feb 13, 2021

comment:12

Setting new milestone based on a cursory review of ticket status, priority, and last modification date.

@mkoeppe mkoeppe modified the milestones: sage-9.3, sage-9.4 Feb 13, 2021
@mkoeppe
Copy link
Contributor

mkoeppe commented Mar 20, 2021

@mkoeppe
Copy link
Contributor

mkoeppe commented Mar 20, 2021

Commit: 50b1b25

@mkoeppe
Copy link
Contributor

mkoeppe commented Mar 20, 2021

New commits:

50b1b25m4/sage_spkg_collect.m4: Show installation hints for non-enabled optional packages separately

@mkoeppe
Copy link
Contributor

mkoeppe commented Mar 20, 2021

Author: Matthias Koeppe

@mkoeppe mkoeppe modified the milestones: sage-9.4, sage-9.3 Mar 20, 2021
@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe changed the title At the end of configure, show installation hints for disabled optional packages separately At the end of configure, show installation hints for non-enabled optional packages separately Mar 20, 2021
@mkoeppe

This comment has been minimized.

@slel
Copy link
Member

slel commented Mar 22, 2021

Reviewer: Samuel Lelièvre

@mkoeppe
Copy link
Contributor

mkoeppe commented Mar 22, 2021

comment:18

Thanks!

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor

mkoeppe commented Mar 29, 2021

comment:20

Setting priority to blocker to bring this ticket to the attention of the release bot.

@vbraun
Copy link
Member

vbraun commented Mar 31, 2021

comment:21

Not a blocker

@mkoeppe
Copy link
Contributor

mkoeppe commented Apr 1, 2021

comment:22

Could you please clarify whether you mean that you do not plan to merge this ticket before the 9.4 series?

@vbraun
Copy link
Member

vbraun commented Apr 26, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants