I'm getting some FORTRAN dusted off after a couple of years and have been installing and getting it working as well. Slightly different order and I used the gfortran-4.2.3.dmg package. Things have changed in Xcode (improved I think) for handling FORTRAN since I worked on this code last time.
I do have /usr/local/bin but I'm not sure if that came with Postgresql, Macports or somethign else. gfortran does seem to have installed into /usr/local/bin with gfortran-4.2 in /usr/bin.
What have you got in your build rules? Is there some confusion in the rules about the installation?
First off, I am not a software developer or engineer, but I do occassionally use Fortran programs at work. I thought it would be good to learn about Xcode and use Fortran at the same time. Not so simple. Code in C would have been easier. None the less, I am cobbling together a system that will eventually work.
You can look at the pre-built Fortran package that I downloaded here: http://r.research.att.com/tools/. Apple may have the same at: http://www.opensource.apple.com/release/developer-tools-40/. Code compiles and programs run fine from the command-line interface in the Terminal window. I could just be satisfied with this, but next steps to do this with Xcode might not be too hard.
I am learning about writing/using Makefiles and telling Xcode to build/run my Fortran projects with Makefile. Here is where I am getting tips from: https://www.sharcnet.ca/help/index.php/Make_utility_and_makefiles. Also from here: http://meandmark.com/blog/2011/10/using-makefiles-in-xcode-4/.
Since the command-line is working just fine for me now, and this is not a high priority for me, I have not gone any further with the effort yet.
I have checked with folks that NEED Fortran to compile code on their OS X 10.8 systems and they all have told me the compiler with "gc-42-5666.3-darwin.pkg" always works.
I thought it would be good to learn about Xcode and use Fortran at the same time. Not so simple. Code in C would have been easier.
I certainly agree with that! Sounds like we are in the same boat. I have some geochem code that came in Fortran I need to dust off.
You can look at the pre-built Fortran package that I downloaded here: http://r.research.att.com/tools/. Apple may have the same at: http://www.opensource.apple.com/release/developer-tools-40/.
The compiler with the R tools is familiar. I currently have the one from the HPC Mac OS X Project http://hpc.sourceforge.net but I remember reading some warnings that it did not work with R. I'm not building R so I went with a newer version.
I am learning about writing/using Makefiles and telling Xcode to build/run my Fortran projects with Makefile.
Thats how I had it working a couple of years ago, and it worked quite well that way. I'm now trying to do more completely in xcode and possible xcodebuild. I can post what I get working here - it would be interesting to compare make with xcodebuild approaches and see what (if any) pros and cons there are.