in reply to Problems installing PGPLOT.pm

I have the latest pgplot libraries installed, including the corrections for 64-bit architecture and the c-wrapper. All the demos run fine so this seems to be working. My LD_LIBRARY_PATH env variable is set and includes the standard paths and the path for the pgplot libraries. MY PGPLOT_DIR env variable is also set... I am confused... :-s

A couple of barely-educated guesses, from odd notes and memory of similar problems.

1. Try rebuilding your pgplot c lib, using g77 instead of gcc.

# make a build subdir in the toplevel of the pgplot src, then ../makemake ../ linux g77_gcc
2. A bug in the Perl module, possibly related to the 64-bit stuff. I would contact the author.

3. When you built your pgplot c lib, there may be some stray header for an older version earlier in the search path, which was accidently used. Usually /usr/local/lib is found first, but some odd glitch may be occurring.

I would look at number 1 first.


I'm not really a human, but I play one on earth. Cogito ergo sum a bum

Replies are listed 'Best First'.
Re^2: Problems installing PGPLOT.pm
by nickschurch (Acolyte) on Nov 27, 2007 at 06:32 UTC
    Thanks for the help. I actually managed to find a pre-compiled version of PGPLOT.pm that came as part of a package that includes all the pg plot libraries (lheasoft package for atronomical software - if anyone is interested) so this now works.
      I recently came across this same trouble, and found a quick and easy solution that I thought I'd share. When you compiled the full PGPLOT distribution, you likely compiled it by something along the lines of (check the pgplot docs)
      makemake "wherever the source files are" linux g77_gcc
      but looking at the top line of your output of PGPLOT-2.20, it says
      Found compiler g77 Found compiler gfortran ExtUtils::F77: Using system=Linux compiler=GFortran ... ExtUtils::F77: Compiler: gfortran
      and therein lies the rub: pgplot was compiled and linked against G77, and PGPLOT-2.20 is compiling/linking against gfortran and the two are not compatible. Take a look at the Makefile.PL file in the PGPLOT-2.20 directory and UNcomment the line that reads something like
      #use ExtUtils::F77 qw(generic g77);
      and this will force PGPLOT-2.20 to use g77 instead of gfortan like it wants to. Other suggestions on the interwebs suggest compiling pgplot itself through gfortran, but this leaves you hanging dry if you need some of the more common output types. This took a while to figure out, but it works as expected for me.
        Whoops, forgot to sign in when I wrote the above :)
        I had the same issue but now it is solved thanks to the tip explained in the previous comment. Thanks a lot !