Open tornaria opened 3 years ago
Branch: public/32425
New commits:
6b8e901 | Trac #32425: accept pari-seadata-small system package |
If system-wide pari-seadata
is not installed, by system-wide pari
is used, Sage has no way to install its pari_seadata
spkg.
That's why we check for pari-seadata
, not for its smaller brother.
Thus, this patch will break an optional package for no good reason.
PARI and its data packages are a bit of a mess because its "datadir" can't be overridden:
https://pari.math.u-bordeaux.fr/dochtml/html-stable/GP_defaults.html#datadir
As a result, the optional packages all have to be installed the same way that pari itself was installed, and is why the pari spkg-configure does checks that you would think belong in the data packages themselves.
For a real fix, someone needs to ask upstream about making the datadir use a search path override with an environment variable like PARI_DATADIR
. Then we could install the optional data anywhere we want, and add that location to the search path, even if pari was installed by someone else.
I sent a feature request upstream but it hasn't shown up on the bug tracker yet.
Edit: https://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=2316
I think we are on our own with the datadir. So long as the data packages cannot be installed independently, they don't really make sense as optional SPKGs, and our "pari" package is really "pari with all of the additional data." They must all be installed the same way, either as system packages, or as SPKGs.
Given that, I think it makes the most sense to keep requiring the full seadata package, just to keep the (already complicated) mess as simple as possible. But I don't feel strongly about it.
I understand the issue. However, if one has pari-seadata-small installed from distro, then one can install pari-seadata from distro as well. As an added advantage one can also install pari-seadata-big if necessary.
The situation where this change would be a problem is a user without root privileges compiling sage in a system where pari is installed with pari-seadata-small, but in fact needing pari-seadata. I think this situation has --with-system-pari=no
as a workaround.
On the other hand, if I want to compile sage with distro pari and just pari-seadata-small I can't, and --with-system-pari=force
won't work either.
Maybe it's possible that installation of seadata as a sage package (or any pari database, for that matter) will check that pari itself is installed as a sage package. In case it's not, it would refuse to install explaining to the user to either (a) install the package from distro; or (b) use configure to disable system-pari and recompile sage (hopefully this will just install pari, gp2c, giac, and relink sage).
Also, a warning could be printed the first time configure is run to indicate that pari-seadata is not installed and suggesting to disable system pari if one might need extra packages and can't install them.
I guess all of this applies as well to pari_elldata
, pari_galpol
and pari_nftables
, which are also optional.
Why do people insist on using pari-seadata-small, etc?
Should we send you $20 for a bigger disk? :-)
But, seriously, without upstream cooperation, involving designing a better way to handle datadir, these is no way out here.
What one still can do is to provide a switch to turn these checks into different checks, using -small versions of packages, instead. But this is a feature bloat.
Context: system pari is installed with databases elldata, galdata, galpol and seadata-small.
Behaviour: system pari is discarded because pari-seadata is not isntalled; in fact, sage will not install pari-seadata either because it is optional.
Expected behaviour: system pari is used.
Trivial fix:
CC: @dkwo @dimpase @orlitzky
Component: packages: standard
Keywords: pari
Author: Gonzalo Tornaría
Branch/Commit: public/32425 @
6b8e901
Issue created by migration from https://trac.sagemath.org/ticket/32425