Opened 14 months ago

Last modified 5 weeks ago

#29620 new defect

./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

Reported by: mkoeppe Owned by:
Priority: critical Milestone: sage-9.4
Component: build: configure Keywords:
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 mkoeppe)

Likewise for --with-system-gcc=no --with-system-gfortran=no, as reported in https://groups.google.com/d/msg/sage-devel/YyB2zk2Lbtg/4YTwKlMJAgAJ

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.

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

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
  --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 mutually exclusive packages.

Change History (18)

comment:1 Changed 14 months ago by dimpase

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

comment:2 Changed 14 months ago by mkoeppe

I agree

comment:3 Changed 14 months 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 14 months ago by mkoeppe

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

comment:5 Changed 14 months ago by mkoeppe

  • Milestone changed from sage-9.1 to sage-9.2

comment:6 Changed 11 months ago by mkoeppe

  • Cc slelievre added

comment:7 Changed 11 months ago by mkoeppe

  • Description modified (diff)

comment:8 Changed 8 months ago by mkoeppe

  • Milestone changed from sage-9.2 to sage-9.3

comment:9 Changed 3 months ago by mkoeppe

  • Priority changed from major to critical

Just got bitten by this again.

comment:10 Changed 3 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 3 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 3 months ago by mkoeppe

  • Description modified (diff)

comment:13 Changed 3 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 3 months ago by dimpase

removing full boost is certainly a good idea.

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

Replying to dimpase:

removing full boost is certainly a good idea.

That's now #31575.

comment:16 Changed 2 months ago by mkoeppe

  • Description modified (diff)

comment:17 Changed 2 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 5 weeks ago by mkoeppe

  • Milestone changed from sage-9.3 to sage-9.4

Moving to 9.4, as 9.3 has been released.

Note: See TracTickets for help on using tickets.