Karim Belabas on Fri, 16 Jul 2010 19:54:16 +0200

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: some glitches in make test-all

* John Cremona [2010-07-16 16:43]:
> I have been running make test-all and have the following observations:
> 1.  If one of the optional data packages is not installed then the
> corresponding test is still run and outputs [BUG].  This is bad if one
> wants to automatically check that the relevant tests have passed!  I
> suggest one of two better things to do:
>  (a) do not run the relevant tests.
>  (b) run them but output something different from "BUG", say
> 2. Some of the tests seem to assume that the data files are in
> /usr/local/share/pari, instead of in $PWD/data,

The tests assume nothing : a default for the final location for the data
files is hardcoded into the system at Configure time, and it is being
used here.

I guess $PWD is the toplevel for the pari sources, and the packages were
simply extracted via 'tar zxf <package.tgz>'. In that case, the
installation is incomplete, you must run 'make install' first to
actually install the packages, see


(or INSTALL.dvi, \S4.1). This has the slight problem that the package is
installed anew each time 'make install' is run. The "manual" method
described in the above URL is the one I use in practice :
  Extract the archive anywhere you like, which will create a 'data'
  folder. Open 'data' and move the folder it contains (e.g. elldata) to
  the directory where the installer placed architecture independent files.
  The default destinations are

    /usr/local/share/pari              (Unix)
    C:\Program Files\PARI              (Win32)

  You may delete the now empty 'data' folder. 

This is documented but indeed error-prone and inconvenient.  
(In particular, one first wants to 'make check', then install, not
install first, then check !)

It would be nicer to have a stand-alone package (extracted anywhere you
like), which could be built, tested and registered independently of the
PARI core (cd package-dir && make test && make install).

This natural solution has the following problems :

1) you have to tell the package exactly where the core is installed,
this cannot be reliably detected.

2) the packages are not independent from the core, they are only data
files, and require support from core C modules. It is the latter that
need testing, not the data files, hence the relevant 'make test' must be
run from the core Makefile, not the package's.

I guess we should simply remove the "make install also installs data/*"
hack and leave only the manual method. The user would have to move the
package data to the right place first (just once), just like they
install libreadline or libgmp, then test the PARI core. 
PARI's Configure could be considerate enough to signal explicitly that
an optional package is missing (just like it signals that libreadline
or libgmp are missing), and avoid the associated test in 'make test-all'

Would that be suitable ?


Karim Belabas, IMB (UMR 5251)  Tel: (+33) (0)5 40 00 26 17
Universite Bordeaux 1          Fax: (+33) (0)5 40 00 69 50
351, cours de la Liberation    http://www.math.u-bordeaux.fr/~belabas/
F-33405 Talence (France)       http://pari.math.u-bordeaux.fr/  [PARI/GP]