[Dock-fans] Installing DOCK 6.2 on Mac OSX Tiger

Prism Sciences jim.parker at prismsciences.com
Tue Aug 12 17:19:21 PDT 2008

I found the compilation of Fortran 77 (which useful for DOCK 6.2) on  
a Mac to be less than trivial, I didn't find any help in the past  
several months of archived mail, so I thought I'd pass this to the  

For those desiring to install DOCK 6.2 on a Mac running OSX, I found  
the following to be very helpful:

You'll need Apple Developer Tools to start, but that's a "no- 
brainer"--gotta have a compiler.

You need g77 which is not part of the standard Apple Developer tools,  
gfortran just isn't up to the job yet (at least for me).
This site has good links for HPC info and howto install g77.

The only hurdle now is that g77 and the Apple version of gcc don't  
play well together so I added the library links that will be needed  
in the following config file.  I called it tiger-powerpc-g77 and put  
it in the install directory with the other config files.  See the  
embedded comments and html links for more info.  If you have an intel  
Mac, just change the <arch> directory to i686-apple-darwin8

To make it work, type
 > cd /path-to-DOCK-source/install
 > configure tiger-powerpc-g77
 > make

--Jim Parker


# DOCK configuration file for Apple GCC compilers.
# This configuration file can be used on
#  Macintosh OS X with g77.

# CC is the C compiler
# CXX is the C++ compiler
# CFLAGS is the flags for the C and C++ compilers
# FC is the Fortran compiler
# FFLAGS is the flags for the Fortran compiler
# LIBS is the flags for the linker
# LOAD is the command to invoke the linker
# SFX is the suffix for the executable

CC=          gcc
CXX=         g++
CFLAGS=      -O2
FC=          g77
FFLAGS=      -O2 -fno-automatic -fno-second-underscore
# Added 12Aug08 -- for Apple specific setup
#   Installed developer tools for OS X Tiger 10.4.11 (gcc version 4.0.1)
#   using FSF g77 (version 3.4.2) for Fortran compiler
#   due to inconsistencies in FSF vs. Apple GCC and moving from
#   version 3.* and 4.* compilers
#   the following library links were necessary:
#       -lSystemStubs                              <-- for 3.* and 4.*
#       -L/usr/lib/<arch>/<gcc-version> -lgcc      <-- FSF vs. apple

#  see http://lists.apple.com/archives/Fortran-dev/2004/Jul/ 
#  http://forums.macosxhints.com/archive/index.php/t-62186.html
LIBS=        -lm -lpthread -lSystemStubs -L/usr/lib/gcc/powerpc-apple- 
darwin8/4.0.1 -lgcc
LOAD=        g++

# Macro definitions for NAB
# AR is the library archiver
# LEX is the lexical analyzer generator
# OCFLAGS is the flags for the C compilers with high optimization
# RANLIB is the library index generator
AR=          ar rv
LEX=         flex
RANLIB=      ranlib


More information about the Dock-fans mailing list