Opened 2 years ago

Last modified 5 months ago

#29620 new defect

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

Reported by: mkoeppe Owned by:
Priority: major Milestone: sage-9.7
Component: build: configure Keywords: spkg-pairs
Cc: mjo, dimpase, jhpalmieri, slelievre Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by slelievre)

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.

  • gmp vs mpir: remove mpir #32549, #32727
  • atlas vs openblas; remove atlas #30350
  • full boost vs boost_cropped; remove full #31575; m4 files use cropped #31871

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.

Change History (24)

comment:1 Changed 2 years ago by dimpase

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

comment:2 Changed 2 years ago by mkoeppe

I agree

comment:3 Changed 2 years ago by mjo

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.

comment:4 Changed 2 years ago by mkoeppe

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

comment:5 Changed 2 years ago by mkoeppe

  • Milestone changed from sage-9.1 to sage-9.2

comment:6 Changed 2 years ago by mkoeppe

  • Cc slelievre added

comment:7 Changed 2 years ago by mkoeppe

  • Description modified (diff)

comment:8 Changed 22 months ago by mkoeppe

  • Milestone changed from sage-9.2 to sage-9.3

comment:9 Changed 17 months ago by mkoeppe

  • Priority changed from major to critical

Just got bitten by this again.

comment:10 Changed 17 months ago by mjo

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?

comment:11 Changed 17 months ago by mkoeppe

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.

comment:12 Changed 17 months ago by mkoeppe

  • Description modified (diff)

comment:13 Changed 17 months ago by mkoeppe

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)

comment:14 follow-up: Changed 17 months ago by dimpase

removing full boost is certainly a good idea.

comment:15 in reply to: ↑ 14 Changed 17 months ago by mkoeppe

Replying to dimpase:

removing full boost is certainly a good idea.

That's now #31575.

comment:16 Changed 16 months ago by mkoeppe

  • Description modified (diff)

comment:17 Changed 16 months ago by mkoeppe

  • Summary changed from ./configure --without-system-gmp --without-system-mpir installs both GMP and MPIR spkg to ./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

comment:18 Changed 15 months ago by mkoeppe

  • Milestone changed from sage-9.3 to sage-9.4

Moving to 9.4, as 9.3 has been released.

comment:19 Changed 13 months ago by mkoeppe

  • Milestone changed from sage-9.4 to sage-9.5

comment:20 Changed 11 months ago by mkoeppe

I have opened #32549 to remove package mpir

comment:21 Changed 11 months ago by mkoeppe

  • Description modified (diff)
  • Priority changed from critical to major

comment:22 Changed 8 months ago by mkoeppe

  • Milestone changed from sage-9.5 to sage-9.6

comment:23 Changed 7 months ago by slelievre

  • Description modified (diff)
  • Keywords spkg-pairs added
  • Summary changed from ./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 to ./configure --without-system-A --without-system-B can build both A and B

Reworded ticket description (removing some bits reproduced below) after

  • ATLAS removed in #30350.
  • MPIR removed in #32549 and #32727.
  • work on boost and boost-cropped:
    • #31871: replace boost by boost_cropped in m4 files
    • #31575: Remove full boost package
    • #31250: Upgrade: boost_cropped 1.78.0

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

comment:24 Changed 5 months ago by mkoeppe

  • Milestone changed from sage-9.6 to sage-9.7
Note: See TracTickets for help on using tickets.