home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / progs / pari / pari_137 / tex / appa.tex next >
Encoding:
Text File  |  1992-05-20  |  7.9 KB  |  154 lines

  1. \title{Appendix A : Installation Guide for the UNIX Versions}
  2.  
  3. 1) To print the users' manual, type ``{\tt make manual}'' in the main directory
  4.    (after having copied an appropriate Makefile as explained below),
  5.    or ``{\tt make}'' in the {\tt tex} subdirectory.
  6.    This will create a file {\tt users.dvi} containing the manual and a table of
  7.    contents, and a separate {\tt index.dvi} containing the index. You must
  8.    then send the two .dvi files to your favorite printer in the usual way.
  9.  
  10.    A tutorial for GP is being written. If you want the available part of the
  11.    tutorial to be included in the manual, uncomment the line 
  12.    {\tt \bs input tutorial} in the file {\tt users.tex}.
  13. \smallskip
  14. 2) To compile the library and the calculator (gp).
  15.  
  16. \indent
  17.    a) Choose the Makefile appropriate to your system. Choose 
  18. {\tt Makefile.sun3} if your machine is 68020/68030/68040 based. In that case,
  19. you must also choose which assembly file to use (see 8) below).
  20.  
  21. Choose {\tt Makefile.sun4} if your machine is Sparc based.
  22.  
  23. Choose {\tt Makefile.hppa} if your machine has the HP-PA architecture.
  24.  
  25. For any other machine, use {\tt Makefile.port}. On DECstations, for example, a
  26. few extra modifications are necessary.
  27.  
  28. For example, if you have a sun4, type {\tt cp Makefile.sun4 Makefile}.
  29.  
  30. \indent
  31.    b) If you have the GNU gcc compiler installed (we recommend that you do), 
  32.       then replace in the Makefile {\tt CC=cc} by {\tt CC=gcc}, add the flag {\tt -g} in the 
  33.       CFLAGS if you know how to use dbx or gdb and want to debug PARI yourself,
  34.       and add the flag {\tt -traditional} to the compilation options of 
  35. {\tt plot.o} if in addition you are under suntools.
  36.  
  37. \indent
  38.    c) If you are not running under suntools or X11, change in the Makefile
  39.       {\tt plot.sun} to {\tt plot.null}. If you are using the X11 window system, 
  40.       change {\tt plot.sun} (or {\tt plot.null} in the port version) to {\tt plot.X}.
  41.       Some slight modifications may have to be made so that the compiler knows
  42.       where to access the X11 libraries.
  43.  
  44. \indent
  45.    d) If you have the GNU readline library installed (distributed with gdb),
  46.       replace {\tt gp.c} by {\tt gpreadline.c}, i.e. {\tt mv gp.c gpold.c; mv gpreadline.c gp.c}.
  47.       Then in the Makefile add {\tt -lreadline -ltermcap} to the list of libraries
  48.       in the compilation line for gp.
  49.       Note: if you are compiling with sunview ({\tt -lsuntool -lsunwindow -lpixrect})
  50.       you will have an error message about a redefined function {\tt rl\_copy}.
  51.       Since the sun source code is not available, the way out is to recompile
  52.       the GNU readline library by changing in the file readline.c
  53.       {\tt rl\_copy} to some weird name, say {\tt rl\_copy\_kludge}.
  54.       The use of the readline and history library (suggested to me by E. Roeder)
  55.       is not yet documented but is similar to emacs commands. However note that
  56.       it is incompatible with SUN commandtools (but not with shelltools).
  57.  
  58. \indent
  59.    e) Some special-purpose application programs may be available in Pari and
  60.       GP. By default in the distribution they are available under GP, but are
  61.       not linked in with the other library modules during the creation of the
  62.       file {\tt libpari.a}. In the present version \vers, these are the 
  63.       functions {\tt buchimag()} and {\tt buchreal()}, both in the file
  64.       {\tt buch.c}. If you want to have the smallest possible GP executable, 
  65.       you will have to do two things. First suppress all occurrences of
  66.       {\tt buch.c} and {\tt buch.o} in the {\tt Makefile}.
  67.       Second, in the files {\tt anal.c, helpmessages.c} and {\tt gencom.h},
  68.       suppress the lines corresponding to {\tt buchimag()} and {\tt buchreal()}.
  69.       If on the contrary you want these functions to be available in library
  70.       mode as well as under GP, in the {\tt Makefile} add {\tt buch.o} to the 
  71.       files which are listed during the creation of {\tt libpari.a}.
  72.  
  73. \indent
  74.    f) Then simply type ``{\tt make}'' in the distribution directory. Be sure to 
  75.       ``{\tt make clean}'' before changing to another architecture using the same
  76.       file system. Note that the non 68020 versions are slower, especially
  77.       the ``port'' version.
  78.  
  79. \indent
  80.    g) To test the executable, run gp on the file {\tt testin} as follows:
  81.       {\tt gp$<$testin$>$\&\ fileout \&}. Then do a {\tt diff} with the file 
  82.       {\tt testout}. If any difference occurs other than the heading
  83.       (version number and type), and the functions {\tt random()} and {\tt tchirnhausen()}
  84.       this means something is wrong. Most probably with your installation
  85.       procedure, but it may be a bug in the system, in which case we would
  86.       appreciate a report. Note that {\tt testin} is not a severe test and is
  87.       quite fast (a few minutes), but does check at least one instance of
  88.       every function. Do NOT forget the \& atfer $>$, since {\tt testin} tests
  89.       one special error message. Testin does not check the optional functions
  90.       such as buchimag and buchreal. You should check them yourself
  91.       (you can take as examples the commented calls of these functions which
  92.       are in the {\tt testin} file).
  93.  
  94. \indent
  95.    h) If you want to test the graphic routines, use instead
  96.       {\tt gp$<$testplotin}. You will have to click 5 times on
  97.       the mouse button after seeing each image (under X11; under suntools you
  98.       must kill the images).
  99.  
  100.       The {\tt testin} script produces a Postscript file {\tt pari.ps} which
  101.       you can send to a Postscript printer. The printed output should be
  102.       similar (although not identical) to the screen images.
  103.  
  104. \smallskip
  105. 3) To install the PARI library so that it can be easily used from a user
  106.    program, create the directory {\tt /usr/include/pari-include}, and type
  107.    ``{\tt make install}''. This puts the executable {\tt gp} in {\tt /usr/local/bin}, the library 
  108.    in the directory {\tt /usr/local/lib}, and the necessary include files in 
  109.    {\tt /usr/include/pari-include}. If these directories do not suit your
  110.    installation, change the {\tt LIBDIR} or the {\tt INCLUDEDIR} in the
  111.    {\tt Makefile}. 
  112. \smallskip
  113. 4) Once installed, to link to the PARI library just add {\tt -lpari} in your
  114.    link command. A sample makefile ({\tt Makesimple}) is given for gp itself.
  115.    All modifications made to the Makefile should of course be made on the
  116.    Makesimple file.
  117. \smallskip
  118. 5) If you want to use {\tt gp} under {\tt gnuemacs} (see section 3.10 of the users' manual)
  119.    change the pathnames in the file {\tt pari.el} to suit your installation, and read
  120.    the file {\tt pari.txt}.
  121. \smallskip
  122. 6) If you want to get rid of your .o files and the created binaries in the
  123.    working directory, type ``{\tt make clean}''.
  124. \smallskip
  125. 7) For the example of section 4.3 of the user's manual, type {\tt make}
  126.    in the directory {\tt examples}.  Two complete sample GP programs are also
  127.    given in that directory (Shanks's SQUFOF factoring method and a general 
  128.    class group and fundamental unit algorithm). See the file 
  129.    {\tt Newin1.37} for more explanations.
  130. \smallskip
  131. 8) The syntax used by the SUN 3 assembler is not standard. On the MacII 
  132.    distribution, the correct Mac assembler syntax is given. In the present
  133.    distribution, in addition to {\tt mp.s} which has the SUN 3 syntax, two files
  134.    called {\tt mp.news} and {\tt mp.ami} are included so as to help people having machines
  135.    with a 680x0 processor ($x>=2$) but a more standard syntax.
  136.  
  137.    This may not correspond to the actual syntax used, but may be closer than 
  138.    {\tt mp.s}.
  139.    In principle, apart from whitespace and the different syntax, the semantics
  140.    of the two files should be identical. In case of conflict, correct 
  141.    {\tt mp.news} or {\tt mp.ami} (i.e. NEVER touch {\tt mp.s}).
  142.  
  143.    The file {\tt mp.news} has been successfully tested on a Sony NEWS, and the file
  144.    {\tt mp.ami} on a Commodore amiga 2500 running Lattice C 5.10.
  145. \smallskip
  146. 9) Send bugs, comments, etc\dots to:\smallskip
  147. \centerline{{\tt pari@alioth.greco-prog.fr }}
  148. \smallskip
  149. 10) Good luck!   
  150.  
  151.  
  152.  
  153. \vfill\eject
  154.