Compiling GAMIT/GLOBK 10.33 on Mac OS X with gfortran
Here’s what I did to compile GAMIT/GLOBK 10.33 on Mac OS X 10.5.2 (INTEL) with gfortran 4.4.0 20080510
Pre-requirements (INTEL or Power-PC platform)
For Mac OS X 10.5.x: install Apple XCode Dev Tools 3.x with X11 SDK.
For Mac OS X 10.4.x: install Apple XCode Dev Tools 2.4.1 or later with X11 SDK.
Compilation
The compilation of GAMIT/GLOBK 10.3.x is pretty straightforward and easier with gfortran than g77!
1. Download and install the appropriate (INTEL or PowerPC) gfortran disk image for Mac OS X from:
http://gcc.gnu.org/wiki/GFortranBinaries
2. Download ‘GAMIT 10.33′ from MIT ftp server (registration required)
3. Edit ‘libraries/Makefile.config’
3a. Change libraries/Makefile.config to:
# Specific for MacOSX X11LIBPATH /usr/X11/lib X11INCPATH /usr/X11/include/X11
3b. To avoid compilation error ‘get_otl_grid.f:357: error: unrecognizable insn:’, change the optimization level to -O2 of ‘libraries/Makefile.config‘.
The default optimization of -O3 seems to be too aggressive.
Edit ‘libraries/Makefile.config‘ and change the line in the “Mac OS X section” from:
FFLAGS = -O3 -Wuninitialized -fno-f2c -ffast-math -fno-automatic -fno-backslash
to:
FFLAGS = -O2 -Wuninitialized -fno-f2c -ffast-math -fno-automatic -fno-backslash
4. Change ‘install_software‘ and ‘install_updates‘ to be executable:
#chmod ug+x install_*
5. Launch the installation in ‘sudo’ mode (as root)
#sudo ./install_software
Normally it should compile just fine….