
Common Problems and Possible Solutions
--------------------------------------

If you have libpgplot set up following the recommended defaults and the
Makefile.PL recognises your system. Perl/PGPLOT should build out of the
box. If you don't you may experience problems. Read on for possible
fixes. Patches for ExtUtils::F77, which is in its early days, are very
welcome!

  Karl Glazebrook, January 11th, 1997.

o You may experience problems if the module does not 'know' about
  the FORTRAN/C interface on your architecture. Please contact me and I
  will try to help if I have time. Alternatively - install GNU-77! (You
  gnu it makes sense...) and edit 'Makefile.PL' to select GNU-77 (this
  is the default on Linux, etc. anyway).

o Make sure when you build the pgplot library you did a 'make cpg' to
  create the C library and the cpgplot.h header file.

o See if you can compile and run the C program cpgdemo.c which comes
  with the pgplot library itself - 'make cpg' in the pgplot build sequence.
  If this fails there is no way the PGPLOT module will work.

o Check Perl normal dynamic loading works, try: 

  perl -e 'use Socket'

  and see if there are any errors.

o If using G77 check the library /usr/lib/libf2c.a is the one that came
  with g77 and not an older one that comes with F2C. Check also that is is not picking up
  an older shared library (e.g. /usr/lib/libf2c.so) that does not
  correspond to the current libf2c.a. The g77 one should be a link to libg77, e.g.:
  
  lrwxrwxrwx   1 root     root           42 Aug 28 16:17 /usr/lib/libf2c.a -> 
  /usr/lib/gcc-lib/i486-linux/2.7.2/libg77.a
   
  
o Check the cc compiler you used to build cpgplot is the same one
  you used to build Perl (this is the one invoked by Makefile.PL)

o Using the PGPLOT module with a dynamically loaded libpgplot
  library on some UNIX systems CAN be problematic (many confusing
  possibilites of -L/-R/LD_LIBRARY_PATH/LD_RUN_PATH exist). Commonly
  the module builds with no errors but fails to plot anything. You can
  maybe fix this by ensuring the pgplot libraries are linked in to
  /usr/local/lib/ (as per the pgplot install instructions) or
  alternatively playing with LD_LIBRARY_PATH. If this fails try
  deleting the libpgplot.so* or libpgplot.sl* shareable library (or at
  least move it to /tmp!). Alternatively, if you don't have system
  priviledge, try this dirty hack:

  mkdir pgplot_tmp
  cp /usr/local/pgplot/lib*pgplot.a pgplot_tmp
  ranlib pgplot_tmp/*

  (don't worry if the 'ranlib' command gives an error - many UNIX
   systems don't have or need it.)

  Now start from the top again. The Makefile.PL will automatically
  detect 'pgplot_tmp' and link in these files statically.

o Finally, if you mail me for help include in your message the complete log 
  output of:

  perl -V; perl Makefile.PL; make; make test


Architecture-Specific Problems/Tips
-----------------------------------

HP systems - Try using c89 with HP's fort77 compiler rather than gcc. 
(e.g. if you get a message about not being able to resolve symbol 
'__main__')

DEC Alphas - are suceptible to the LD_LIBRARY_PATH problems mentioned
above.
