You are here: Matthew KENWORTHY > Nelse > Compiling PGPLOT on a MacBook
Compiling PGPLOT on a MacBook
How to compile and locally install the PGPLOT routines in OS X on a Macbook in your home directory.
cd ~/myperl/
mkdir src
cd src/
wget pgplot5.2.tar.gz
tar zxvf pgplot5.2.tar.gz
Apparently, the Perl:F77 module prefers to use gfortran to do compiling with, and I had picked the g77 compiler for making the PGPLOT libraries. After tweaking the PGPLOT make files to use gfortran, and replacing the system pgplot libs with the newly compiled files, PGPLOT.pm worked!
You should only need to recompile PGPLOT with gfortran, not pgperl.
You don't need to set LDLIBRARYPATH to /usr/local/lib; it will be searched by default. Since you're installing PGPLOT into the default location, you also don't need to set PGPLOT_DIR.