home *** CD-ROM | disk | FTP | other *** search
- \title{Appendix A : Installation Guide for the UNIX Versions}
-
- 1) To print the users' manual, type ``{\tt make manual}'' in the main directory
- (after having copied an appropriate Makefile as explained below),
- or ``{\tt make}'' in the {\tt tex} subdirectory.
- This will create a file {\tt users.dvi} containing the manual and a table of
- contents, and a separate {\tt index.dvi} containing the index. You must
- then send the two .dvi files to your favorite printer in the usual way.
-
- A tutorial for GP is being written. If you want the available part of the
- tutorial to be included in the manual, uncomment the line
- {\tt \bs input tutorial} in the file {\tt users.tex}.
- \smallskip
- 2) To compile the library and the calculator (gp).
-
- \indent
- a) Choose the Makefile appropriate to your system. Choose
- {\tt Makefile.sun3} if your machine is 68020/68030/68040 based. In that case,
- you must also choose which assembly file to use (see 8) below).
-
- Choose {\tt Makefile.sun4} if your machine is Sparc based.
-
- Choose {\tt Makefile.hppa} if your machine has the HP-PA architecture.
-
- For any other machine, use {\tt Makefile.port}. On DECstations, for example, a
- few extra modifications are necessary.
-
- For example, if you have a sun4, type {\tt cp Makefile.sun4 Makefile}.
-
- \indent
- b) If you have the GNU gcc compiler installed (we recommend that you do),
- then replace in the Makefile {\tt CC=cc} by {\tt CC=gcc}, add the flag {\tt -g} in the
- CFLAGS if you know how to use dbx or gdb and want to debug PARI yourself,
- and add the flag {\tt -traditional} to the compilation options of
- {\tt plot.o} if in addition you are under suntools.
-
- \indent
- c) If you are not running under suntools or X11, change in the Makefile
- {\tt plot.sun} to {\tt plot.null}. If you are using the X11 window system,
- change {\tt plot.sun} (or {\tt plot.null} in the port version) to {\tt plot.X}.
- Some slight modifications may have to be made so that the compiler knows
- where to access the X11 libraries.
-
- \indent
- d) If you have the GNU readline library installed (distributed with gdb),
- replace {\tt gp.c} by {\tt gpreadline.c}, i.e. {\tt mv gp.c gpold.c; mv gpreadline.c gp.c}.
- Then in the Makefile add {\tt -lreadline -ltermcap} to the list of libraries
- in the compilation line for gp.
- Note: if you are compiling with sunview ({\tt -lsuntool -lsunwindow -lpixrect})
- you will have an error message about a redefined function {\tt rl\_copy}.
- Since the sun source code is not available, the way out is to recompile
- the GNU readline library by changing in the file readline.c
- {\tt rl\_copy} to some weird name, say {\tt rl\_copy\_kludge}.
- The use of the readline and history library (suggested to me by E. Roeder)
- is not yet documented but is similar to emacs commands. However note that
- it is incompatible with SUN commandtools (but not with shelltools).
-
- \indent
- e) Some special-purpose application programs may be available in Pari and
- GP. By default in the distribution they are available under GP, but are
- not linked in with the other library modules during the creation of the
- file {\tt libpari.a}. In the present version \vers, these are the
- functions {\tt buchimag()} and {\tt buchreal()}, both in the file
- {\tt buch.c}. If you want to have the smallest possible GP executable,
- you will have to do two things. First suppress all occurrences of
- {\tt buch.c} and {\tt buch.o} in the {\tt Makefile}.
- Second, in the files {\tt anal.c, helpmessages.c} and {\tt gencom.h},
- suppress the lines corresponding to {\tt buchimag()} and {\tt buchreal()}.
- If on the contrary you want these functions to be available in library
- mode as well as under GP, in the {\tt Makefile} add {\tt buch.o} to the
- files which are listed during the creation of {\tt libpari.a}.
-
- \indent
- f) Then simply type ``{\tt make}'' in the distribution directory. Be sure to
- ``{\tt make clean}'' before changing to another architecture using the same
- file system. Note that the non 68020 versions are slower, especially
- the ``port'' version.
-
- \indent
- g) To test the executable, run gp on the file {\tt testin} as follows:
- {\tt gp$<$testin$>$\&\ fileout \&}. Then do a {\tt diff} with the file
- {\tt testout}. If any difference occurs other than the heading
- (version number and type), and the functions {\tt random()} and {\tt tchirnhausen()}
- this means something is wrong. Most probably with your installation
- procedure, but it may be a bug in the system, in which case we would
- appreciate a report. Note that {\tt testin} is not a severe test and is
- quite fast (a few minutes), but does check at least one instance of
- every function. Do NOT forget the \& atfer $>$, since {\tt testin} tests
- one special error message. Testin does not check the optional functions
- such as buchimag and buchreal. You should check them yourself
- (you can take as examples the commented calls of these functions which
- are in the {\tt testin} file).
-
- \indent
- h) If you want to test the graphic routines, use instead
- {\tt gp$<$testplotin}. You will have to click 5 times on
- the mouse button after seeing each image (under X11; under suntools you
- must kill the images).
-
- The {\tt testin} script produces a Postscript file {\tt pari.ps} which
- you can send to a Postscript printer. The printed output should be
- similar (although not identical) to the screen images.
-
- \smallskip
- 3) To install the PARI library so that it can be easily used from a user
- program, create the directory {\tt /usr/include/pari-include}, and type
- ``{\tt make install}''. This puts the executable {\tt gp} in {\tt /usr/local/bin}, the library
- in the directory {\tt /usr/local/lib}, and the necessary include files in
- {\tt /usr/include/pari-include}. If these directories do not suit your
- installation, change the {\tt LIBDIR} or the {\tt INCLUDEDIR} in the
- {\tt Makefile}.
- \smallskip
- 4) Once installed, to link to the PARI library just add {\tt -lpari} in your
- link command. A sample makefile ({\tt Makesimple}) is given for gp itself.
- All modifications made to the Makefile should of course be made on the
- Makesimple file.
- \smallskip
- 5) If you want to use {\tt gp} under {\tt gnuemacs} (see section 3.10 of the users' manual)
- change the pathnames in the file {\tt pari.el} to suit your installation, and read
- the file {\tt pari.txt}.
- \smallskip
- 6) If you want to get rid of your .o files and the created binaries in the
- working directory, type ``{\tt make clean}''.
- \smallskip
- 7) For the example of section 4.3 of the user's manual, type {\tt make}
- in the directory {\tt examples}. Two complete sample GP programs are also
- given in that directory (Shanks's SQUFOF factoring method and a general
- class group and fundamental unit algorithm). See the file
- {\tt Newin1.37} for more explanations.
- \smallskip
- 8) The syntax used by the SUN 3 assembler is not standard. On the MacII
- distribution, the correct Mac assembler syntax is given. In the present
- distribution, in addition to {\tt mp.s} which has the SUN 3 syntax, two files
- called {\tt mp.news} and {\tt mp.ami} are included so as to help people having machines
- with a 680x0 processor ($x>=2$) but a more standard syntax.
-
- This may not correspond to the actual syntax used, but may be closer than
- {\tt mp.s}.
- In principle, apart from whitespace and the different syntax, the semantics
- of the two files should be identical. In case of conflict, correct
- {\tt mp.news} or {\tt mp.ami} (i.e. NEVER touch {\tt mp.s}).
-
- The file {\tt mp.news} has been successfully tested on a Sony NEWS, and the file
- {\tt mp.ami} on a Commodore amiga 2500 running Lattice C 5.10.
- \smallskip
- 9) Send bugs, comments, etc\dots to:\smallskip
- \centerline{{\tt pari@alioth.greco-prog.fr }}
- \smallskip
- 10) Good luck!
-
-
-
- \vfill\eject
-