Installing Elegant on OSX 10.8 Mountain Lion

This is a short guide to installing the accelerator code Elegant on OSX 10.8 Mountain Lion, hopefully giving an error-free, step-by-step guide with a bit more information than is available from the Elegant website and forums.

OS Version: OSX 10.8 Mountain Lion
Elegant Version: 25.1.0 (Nov 7, 2012)

Installation Steps:

  1. Install XCode and Java if you don’t already have them installed (see for details); use the App Store to install XCode. You will probably want to disable Java in your browser after installation.
  2. Install Command Line Tools at XCode>Preferences>Downloads>Components
  3. Install fink binaries using
  4. Carry out the following commands:
    fink selfupdate-rsync
    fink index -f
    fink update-all
  5. Install gfortran using this installer:
  6. Install elegant (darwin-x86 32/64 bit Nov 8 2012) and SDDS binaries (darwin-x86 Nov 7 2012) from the APS software website. Put everything into a folder in your home directory, i.e. in ~/bin/
  7. Download the defns.rpn file and put it in ~/bin/ as well.
  8. You will probably want the SDDS.m file as well if you’re going to be using Mathematica.
  9. Add this line to your .bash_profile:
    export RPN_DEFNS=”~bin/defns.rpn”
    (hint: cp .bash_profile vis.bash_profile to make it visible for editing, then copy back)
  10. Following the instructions on this site,,
    execute the following commands:
    fink install libpng3 <- see update below, this doesn’t seem to be needed now.
    fink install openmotif3
    fink install readline5
    fink install gd2      (…this one takes ages)
    fink install libtiff

That should be it! Quit and restart your, and you should be able to run elegant from the command line.

Update July 25th 2013: I recently re-installed everything, and noticed that fink-0.34.5 doesn’t seem to be able to find libpng3 when you run fink install libpng3. I tested running without this library, and elegant seems to be happily making png files without this library.


Leave a Reply