gfortran on macs

Brian Barnes bcbarnes@artsci.wustl.edu
Wed Jul 25 17:31:00 GMT 2007


> I believe that using the GFortran 4.3 binary package should work fine with a 
> system GCC of version 4.0 -- the GFortran package should be set up so as not 
> to interfere with the system library at all.  But that's an educated guess; I

Thanks for the reply, Brooks.  I tried the gfortran 4.3 binary package on 
the official wiki / website.  Unfortunately, it failed to complete the 
install.  I noticed that it installed many (possibly all) of its files in 
/usr/local/gfortran as expected, but failed to create /usr/bin/gfortran. 
There may have been other problems with the install, but I didn't see a 
log or error message.  This is on OS X 10.4.10 with the XCode from the 
10.4.9 DVDs installed.  All new stuff.  The package was run with su 
permissions.  So I deleted what the gfortran pkg installed and went to 
plan B...

> I found it almost trivially simple to compile things from source, much like 
> it would be on a Linux machine (and the commands are identical, too.)  The

I ended up fixing a problem with my fink install so that I could see the 
gcc42 package in fink -stable and -unstable.  Thank you Jack Howarth for 
maintaining this package!  I used 'sudo fink install gcc42' and its 
install script detected the gmp and mpfr dependencies, and everything was 
compiled from source and installed fine.  I now have gcc 4.2.1 installed. 
Building these for Intel OS X is supposedly non-trivial; gmp specifies 
that they do not support Intel OS X in their 4.x releases, and building 
of gcc required some multilib changes.  There are other Intel OS X patches 
laying around to fix build bugs too.  But, I think J.H. took care of all 
these things in his fink build script.

I tested the gfotran 4.2.1 install using our group's molecular dynamics 
code (which is mostly F77, but is a numerically strong test) and 
everything works.  :)

Yeah, so I know this is a bit of a tangent from the normal development 
talk here, but I hope some people find it helpful.  Thank you, and good 
luck with the work on 4.3!

Sincerely,

Brian Barnes



More information about the Fortran mailing list