Chah has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

This is my first time using PGPlot. I'm trying to run the examples from various tutorials around the web. For the most part, things tend to work as advertised with Knoppix, and Perl. But I can't seem to get this line to work:
perldl> use PDL::Graphics::PGPLOT; Can't locate loadable object for module PGPLOT in @INC (@INC contains: + /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr +/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /us +r/local/lib/site_perl .) at /usr/lib/perl5/PDL/Graphics/PGPLOT/Window +.pm line 2272 Compilation failed in require at /usr/lib/perl5/PDL/Graphics/PGPLOT/Wi +ndow.pm line 2272. BEGIN failed--compilation aborted at /usr/lib/perl5/PDL/Graphics/PGPLO +T/Window.pm line 2272. Compilation failed in require at /usr/lib/perl5/PDL/Graphics/PGPLOT.pm + line 148. BEGIN failed--compilation aborted at /usr/lib/perl5/PDL/Graphics/PGPLO +T.pm line 148. Compilation failed in require at (eval 51) line 4. BEGIN failed--compilation aborted
I've tried this on several different machines, using Knoppix 5.3.1 and Knoppix 5.1.1. They come back with the same, or similar error. I went to CPAN to try to download and install PGPlot, but when I try this, I get:
$ perl Makefile.PL Can't locate ExtUtils/F77.pm in @INC (@INC contains: . /etc/perl /usr/ +local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/ +share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site +_perl) at Makefile.PL line 11. BEGIN failed--compilation aborted at Makefile.PL line 11.
I don't know what to make of these errors. Any help?

Thanks,

Replies are listed 'Best First'.
Re: Anyone have problem with PGPlot under Knoppix?
by syphilis (Archbishop) on Oct 04, 2008 at 10:18 UTC
    Hi Chah,
    It looks like PGPLOT has not been correctly installed.
    ExtUtils::F77 is a pre-requisite for PGPLOT, so you'll need to install it first. The pgplot C library is another pre-requisite for PGPLOT - so you'll also need to install that before building and installing PGPLOT (the perl module).

    Cheers,
    Rob
Re: Anyone have problem with PGPlot under Knoppix?
by hda (Chaplain) on Oct 04, 2008 at 14:16 UTC
    Hi,
    There has recently been a discussion on PGPLot in the PDL mailing list. As in that case I post my installation notes (ammended with the help of several users of the PDL mailing list) in case you fin them useful useful:


    download, uncompress and untar in: /usr/local/src

    create a directory /usr/local/pgplot

    open the drivers.list file and select drivers

    copy the drivers.list file to /usr/local/pgplot

    change directory to /usr/local/pgplot

    execute the makemake:

    /usr/local/src/pgplot/makemake /usr/local/src/pgplot linux g77_gcc

    Now comes the tricky part ...
    In openSUSE 10.3 modify the make file to point to gfortran:
    FCOMPL=gfortran
    FFLAGC=-ffixed-form -ffixed-line-length-none -u -Wall -fPIC -O

    Also the png driver will not compile if the following line:
    pndriv.o : ./png.h ./pngconf.h ./zlib.h ./zconf.h

    is not replaced by:
    pndriv.o : /usr/include/png.h /usr/include/pngconf.h /usr/include/zlib.h /usr/include/zconf.h

    # if the drivers.list file includes /(V)GIF, /(V)PPM, or /(V)WD,

    # the source code for these drivers must be edited. Add these three steps:

    cd drivers
    grep -n 64-bit *
    edit the listed files at the lines specified.

    make
    make cpg

    add to bash.bashrc.local export PGPLOT_DIR=/usr/local/pgplot
    export PATH=$PATH:/usr/local/pgplot
    add to ld.conf.so /usr/local/pgplot
    run ldconfig

    In the CPAN shell, install the PGPLOT module.