

- #HOME BREW SIMPLY FORTRAN MAC OS X#
- #HOME BREW SIMPLY FORTRAN INSTALL#
- #HOME BREW SIMPLY FORTRAN SOFTWARE#
#HOME BREW SIMPLY FORTRAN INSTALL#
In theory, you can use Fink to install gfortran. (See this article.) I wouldn't expect there to be system library dependencies when installing gfortran, but there could be such dependencies when installing other Homebrew packages. Installs could depend on system libraries, meaning that dependencies for Homebrew packages could break on an OS upgrade. (See this post on SuperUser.) Need to change PATH. Could interfere with MacPorts and Fink installs.
#HOME BREW SIMPLY FORTRAN SOFTWARE#
May need to follow the Homebrew paradigm when installing other (non-Homebrew) software to /usr/local to avoid messing anything up. Disadvantages: Inherits all the disadvantages from "Installing a version that matches system compilers".Could install a newer GCC (4.7.0) stack using the alternate repository homebrew-dupes. Only install what you need (in contrast to MacPorts). Advantages: Easy to use package manager installs the same Fortran compiler as in "Installing a version that matches system compilers".Homebrew can also be used to install a Fortran compiler. Could interfere with Homebrew and Fink installs. ( Sean Farley proposes some workarounds.) Also requires changing PATH. Compilers don't include debugging symbols, which can pose a problem when using a debugger, or installing PETSc. Disadvantages: Installing ports tends to require an entire "software ecosystem".Advantages: Installs in /opt/local port select can be used to switch among compiler versions (including system compilers).MacPorts has a number of versions of compilers available for use. (without a version number, and without any symlinks). (You could modify the PATH, delete the compiler install, or kludge around it.) Will clobber other methods of installing compilers in /usr/local because compiler binaries are simply named 'gcc', 'g++', etc. Doesn't clobber existing system compilers, or the approach above. Advantages: With the right command, installs in /usr/local up-to-date.The PETSc developers recommend this method on their FAQ.
#HOME BREW SIMPLY FORTRAN MAC OS X#
HPC Mac OS X has binaries for the latest release of GCC (at the time of this writing, 4.8.0 (experimental)), as well as g77 binaries, and an f2c-based compiler. Installing a precompiled, up-to-date binary from HPC Mac OS X (GCC 4.2.1 is the latest Apple compiler it was released in 2007.) Installs to /usr/bin.

Originally, I preferred MacPorts when I wrote this answer. I have tried all of these methods except for "Fink" and "Other Methods".
