What do I need?

  1. A C compiler. Unlike earlier versions, I would suggest the one that Apple provides as part of Xcode.
  2. A FORTRAN compiler. The best suggestion is R tools for Mac development. They have a nice fortran compiler (called gfortran).
  3. X11 for the Mac

Installing the compilers

The C compiler needs to be installed as a package.
The gfortran compiler will come as a DMG file, so will use a similar package installation like the Xcode package.
From here on, /usr/bin and /usr/local/bin needs to be in your path. Typing rehash in a termainal can help.

Installing X11

This is just a package, done in the usual way. You will have to agree to license and type in your password, but otherwise this is no different than upgrading iTunes.

Building PGPLOT

Follow the instructions. When it comes time to create the makefile, select the following option: linux g77_gcc_aout. Then type make.
It is a good idea to make the c bindings, too. Type make cpg.

That does not work.

If you get errors along the lines of
/usr/bin/ranlib: archive member: libpgplot.a(grdate.o) cputype (16777223) does not match previous archive members cputype (7) (all members must match).
than I suggest Ben Weiner's all too useful solution.
Go to the Start
Last modified: Wed May 30 10:36:11 PDT 2012