My understanding is that Apple has moved to using LLVM/Clang for their compilers. There is no Fortran front-end currently available for LLVM. Gfortran is a front-end for GCC. It may be that Apple left GFortran installed, but never tested it using the latest OS. Even though there is a gcc command on OS X, it actually uses LLVM (see gcc —version).
To get GFortran working again, I think you will have to build GCC (which includes GFortran) from source.
There is a project called DragonEgg [1] that allows LLVM to be used as a GCC backend, but I don’t see much point in doing this if you need to build GCC from source anyway.
Regards, Greg
More information.
The issue appears to be gfortran on Yosemite.
Running gfortran from the terminal window (so independent of Eclipse) I get these errors on a trivial, 1 line program:
gfortran: warning: couldn’t understand kern.osversion ‘14.0.0 ld: library not found for -lcrt1.o collect2: error: ld returned 1 exit status
Suggestions?
Bernard
Update:
By explicitly including the path to gfortran at Project > Properties > Fortran Build > Settings > GNU Fortran Compiler >Tool Settings I can get gfortran to run but even on a simple “Hello world” program I get this:
10:45:40 **** Build of configuration Release for project Fortran test on OSX10.10 **** make all Building file: ../Helloworld.f95 Invoking: GNU Fortran Compiler /usr/local/gfortran/bin/gfortran -funderscoring -O0 -Wall -c -fmessage-length=0 -o "Helloworld.o" "../Helloworld.f95" make: *** [Helloworld.o] Segmentation fault: 11
Any thoughts appreciated.
Bernard
Each time Apple releases a new version of OS X I find that Eclipse Photran ceases to run correctly. I installed Yosemite (OS X 10.10) today and Eclipse (Luna) cannot find gfortran in usr/local/gfortran/bin.
I have tried the following:
1. setting the PATH to include usr/local/gfortran/bin in MacOSX/environment.plist 2. opening a terminal window, setting the PATH as above then running Eclipse
without success. Both methods worked in OS X 10.9.
Any suggestions?
Bernard Abramson
_______________________________________________ photran mailing list photran@xxxxxxxxxxx To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/photran
|