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

./configure --without-system-A --without-system-B can build both A and B #29620

Open
mkoeppe opened this issue Apr 29, 2020 · 19 comments
Open

./configure --without-system-A --without-system-B can build both A and B #29620

mkoeppe opened this issue Apr 29, 2020 · 19 comments

Comments

@mkoeppe
Copy link
Member

mkoeppe commented Apr 29, 2020

Some functionality can be provided by
either one of two SPKGs.

For such pairs (A, B) of SPKGs, configuring with

./configure --without-system-A --without-system-B

or equivalently

./configure --with-system-A=no --with-system-B=no

can result in both A and B being built.

Some cases are solved after the removal
of one of the spkgs in the pair.

Remaining cases:

  • gfortran can be provided by the gcc or gfortran SPKGs
  • some database packages have SPKG vs SPKG_small pairs

gfortran

Both gcc and gfortran built after

./configure --with-system-gcc=no --with-system-gfortran=no`

SPKG_small

  --with-system-pari_seadata={no|yes (default)|force (exit with an error if no usable version is found)}
                          detect and use an existing system pari_seadata
  --with-system-pari_seadata_small={no|yes (default)|force (exit with an error if no usable version is found)}
                          detect and use an existing system pari_seadata_small

Overall, we need a better solution for such pairs of packages.

CC: @orlitzky @dimpase @jhpalmieri @slel

Component: build: configure

Keywords: spkg-pairs

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

@mkoeppe mkoeppe added this to the sage-9.1 milestone Apr 29, 2020
@dimpase
Copy link
Member

dimpase commented Apr 30, 2020

comment:1

perhaps fixing this in ./configure is the most natural thing to do.

@mkoeppe
Copy link
Member Author

mkoeppe commented May 1, 2020

comment:2

I agree

@orlitzky
Copy link
Contributor

orlitzky commented May 1, 2020

comment:3

This is ugly because sage_spkg_install_mpir=no can mean multiple things when you take --with-mp into consideration. There's a simpler statement of the problem: passing --without-system-gmp causes the gmp SPKG to be installed when mpir will be used anyway. I haven't been able to wrap my head around a solution that works in all cases. We may need to introduce another variable that indicates what's actually going on, rather than trying to reverse engineer what happened from the sage_spkg_install variables at the end of gmp's post-check phase.

@mkoeppe
Copy link
Member Author

mkoeppe commented May 1, 2020

comment:4

Yes, we should first define the meaning of these options.

@mkoeppe mkoeppe modified the milestones: sage-9.1, sage-9.2 May 5, 2020
@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe modified the milestones: sage-9.2, sage-9.3 Oct 24, 2020
@mkoeppe
Copy link
Member Author

mkoeppe commented Mar 24, 2021

comment:9

Just got bitten by this again.

@orlitzky
Copy link
Contributor

comment:10

We recently switched the default back to GMP because MPIR is bit-rotting. Being able to choose GMP instead of MPIR had obvious benefits when MPIR was the default. But is there any benefit to being able to use MPIR as an alternative when GMP is the default?

@mkoeppe
Copy link
Member Author

mkoeppe commented Mar 25, 2021

comment:11

The only reason that comes to mind is that at least one package uses an mpir-specific interface: #30325.

For Sage 9.3, I would be reluctant to remove MPIR completely. But it would be good to remove this trap in our configure script.

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Member Author

mkoeppe commented Mar 28, 2021

comment:13

For boost, of course, we could just remove the full boost package and only offer our cropped version of boost. It could be argued again that it's not Sage's job to provide a full boost installation. (Our version is ancient in any case)

@dimpase
Copy link
Member

dimpase commented Mar 28, 2021

comment:14

removing full boost is certainly a good idea.

@mkoeppe
Copy link
Member Author

mkoeppe commented Mar 29, 2021

comment:15

Replying to @dimpase:

removing full boost is certainly a good idea.

That's now #31575.

@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe changed the title ./configure --without-system-gmp --without-system-mpir installs both GMP and MPIR spkg ./configure --without-system-gmp --without-system-mpir installs both GMP and MPIR spkg; and similar issues for openblas/atlas, boost/boost_cropped, SPKG/SPKG_small Apr 8, 2021
@mkoeppe
Copy link
Member Author

mkoeppe commented May 10, 2021

comment:18

Moving to 9.4, as 9.3 has been released.

@mkoeppe mkoeppe modified the milestones: sage-9.3, sage-9.4 May 10, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.4, sage-9.5 Jul 19, 2021
@mkoeppe
Copy link
Member Author

mkoeppe commented Sep 22, 2021

comment:20

I have opened #32549 to remove package mpir

@mkoeppe

This comment has been minimized.

@slel

This comment has been minimized.

@slel
Copy link
Member

slel commented Jan 1, 2022

Changed keywords from none to spkg-pairs

@slel
Copy link
Member

slel commented Jan 1, 2022

comment:23

Reworded ticket description (removing some bits
reproduced below) after


For gmp/mpir, we have:

  --with-system-gmp={no|yes (default)|force (exit with an error if no usable version is found)}
                          detect and use an existing system gmp
  --with-system-mpir={no|yes (default)|force (exit with an error if no usable version is found)}
                          detect and use an existing system mpir
  --with-mp=system        use the system GMP as multiprecision library, if
                          possible (default)
  --with-mp=mpir          use the Sage SPKG for MPIR as multiprecision library
  --with-mp=gmp           use the Sage SPKG for GMP as multiprecision library

The first two are automatically generated and do not work properly. The --with-mp option is legacy and works properly but does not fit well with the systematic naming scheme. Removing mpir in #32549 removes this case.

Same for BLAS (as reported most recently in https://groups.google.com/g/sage-support/c/pqnhfUJYS-Q/m/lOQJ3EtYBwAJ):

  --with-system-atlas={no|yes (default)|force (exit with an error if no usable version is found)}
                          detect and use an existing system atlas
  --with-system-openblas={no|yes (default)|force (exit with an error if no usable version is found)}
                          detect and use an existing system openblas
  --with-blas=openblas    use OpenBLAS as BLAS library (default)
    --with-blas=atlas       use ATLAS as BLAS library

Removing atlas in #30350 removes this case.

And to a lesser degree for these ones:

  --with-system-boost={no|yes (default)|force (exit with an error if no usable version is found)}
                          detect and use an existing system boost
  --with-system-boost_cropped={no|yes (default)|force (exit with an error if no usable version is found)}
                          detect and use an existing system boost_cropped

@slel slel changed the title ./configure --without-system-gmp --without-system-mpir installs both GMP and MPIR spkg; and similar issues for openblas/atlas, boost/boost_cropped, SPKG/SPKG_small ./configure --without-system-A --without-system-B can build both A and B Jan 1, 2022
@mkoeppe mkoeppe modified the milestones: sage-9.6, sage-9.7 Mar 5, 2022
@mkoeppe mkoeppe modified the milestones: sage-9.7, sage-9.8 Aug 31, 2022
@mkoeppe mkoeppe removed this from the sage-9.8 milestone Jan 29, 2023
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