The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
==================================================================
The short install procedure is described in README.  Here is the long one:

This module was working OK with 5.003 (some time ago, newer versions
might have broken this...).

If you have Net::FTP module installed and working (type

	perl -MNet::FTP -le "print 'OK'"

to check, and, say

	perl -MCPAN -e 'install Net::FTP'

to install it if you do not have it), then Makefile.PL may fetch and
configure GP/PARI for you, so you can skip steps a,b,c,e in the description
below.  [Sometimes Net::FTP requires setting PASSIVE_FTP environment variable.]

With Net::FTP, building, testing, and testing is done in most cases with

  perl Makefile.PL
  make
  make test
  make install

==================================================================
Let me state the obvious: Math::Pari is a Perl module, so you need to
have a "good enough" binary of Perl running on your machine.
Compiling any Perl module involves a heavy usage of the Config module
coming with Perl.  If your Perl is copied from another machine with an
incompatible configuration, expect problems.  [Typical syndroms:
glob failing; /usr/ucb/cc used instead of a real compiler, make trying
to run `cl' you do not have etc.]

==================================================================
GP/PARI detects the type of the assembler files needed for your
processor; Math::Pari copies this logic, but may not contain the
latest updates/improvements.  If the detection-of-assembler is wrong, put
machine=assembler_type to the Makefile.PL line, as in

  perl Makefile.PL machine=hppa

As the last resort, machine=none means using a portable-and-slow C code.

I would like to hear about wrong assembler-detection.

==================================================================
The older versions of Math::Pari were using GP/PARI configuration
scripts to generate the header file libPARI/paricfg.h needed for the
compile of the library.  The newer version generate this file
themselves.  If this new way fails, put the word Configure on the
Makefile.PL command line to generate this file "the old way":

  perl Makefile.PL Configure

A typical syndrom is a compile error related to undefined CLK_TCK.  I
would like to hear about these cases.  In the worst cases you may need
to manually copy paricfg.h from a subdirectory of GP/PARI build
directory to libPARI/paricfg.h.

[libPARI/paricfg.h is not recreated when rerunning Makefile.PL without
the Configure options.  If you need it to be recreated, rename this
file before rerunning.]

==================================================================
If the problems with Math::Pari being unable to build persist, there is
another way to build it: use a pre-build version of the PARI library.  Put
the link options on the Makefile.PL command line like this:

  perl Makefile.PL LIBPARI="-L/lib -lpari"

This is a non-yet-supported way to build the library; try it only if anything
else fails.

	 Known problems:
		spoofed version;
		no graphing functions present;
		bad free() at t/Pari.t line 265
			(calling installed Perl function from PARI)
		no PARI tests to convert;
		no POD to create;
		no check for ep codes;
		no patching the source;
	   [All but the first 3 of the problems can be avoided if one
	    lets Makefile.PL download and patch PARI, then builds the library
	    using the downloaded+patched version.]
	 Possible problems:
		different sizeof(long);
		non-compatible threading model;
		-lpari build with different non-compatible compiler;

==================================================================
Here is the manual procedure which is somewhat similar to what
Makefile.PL does.

  a) Get the latest PARI distribution from
	ftp://megrez.math.u-bordeaux.fr/pub/pari/unix/

  b) uncompress the distribution; optionally run 'Configure' script
	sh ./Configure

     (Running 'Configure' is required only if you manually copy 'paricfg.h'.)

  c) Math::Pari does not care whether you did `make' GP/PARI, but you can do
     it nevertheless:
	make test
     in toplevel PARI directory;

  d) uncompress the Math::Pari archive into a separate directory (for
     best results make it a sibling of GP/PARI's root directory; kid
     or parent should do as well);

  e) _Optionally_ find the architecture of your processor (if it is not
     known/supported and recognized automatically, the slower 'port' code
     without assembler should be used).  Recognized "processors" are 

	sun3 sparcv7 sparcv8micro sparcv8super alpha hppa i386 port

     the current version should autorecognize them in most situations;

  f) do (assuming your architecture is hppa)

	perl Makefile.PL 
		or
	perl Makefile.PL machine=hppa

     You may also want to add Configure argument (see above).  At this
     moment you may want to manually copy paricfg.h if all the rest fails...)

     This step autogenerates many files, such as POD documentation of GP/PARI
     and the module test suite, from the GP/PARI distribution.

  g) then

	make
	make test

  h) Now

	make install

     should make this extension available to the perl programs.

x) Patches to some versions of GP/PARI may be needed (in `patches11',
   or 'patch12', etc.  depending on the version of GP/PARI 2.0.*).
   This may be done automatically during auto-download of GP/PARI.

x) We skip "compatibility" tests, and do not support "compatibility" mode
   (with very old versions of GP/PARI).

x) dmake on Win32 is buggy.  The symptom is a message about not being able
   to find the target 'all'.  The workaround is to run `dmake -i'.  One must
   watch for errors (with "Ignored" in the error message), since in this regime
   dmake won't stop on an error.