If you install these compilers with fink, it will set everything up for you in a hassle-free manner. g95 is in fink's unstable branch, so you need to enable it. In addition to g77 and g95, they have gfortran.
I've been having major problems using a Fortran compiler on my Powerbook G4. I have Tiger and xCode 2 installed, and I've downloaded g95 for Tiger and other compilers, but can't get the compiler command to work in my x11 window. The instructions that come with the compiler aren't helping at all. Does anyone have explicit instructions on how to add the Fortran compiler? I'd like to use it as I use gcc for my C files. Thanks.
6 replies
You invoke it in exactly the same way. The g95 executable has to be in your $PATH. You might find g77 3.4 works better (it does for me).
If you install these compilers with fink, it will set everything up for you in a hassle-free manner. g95 is in fink's unstable branch, so you need to enable it. In addition to g77 and g95, they have gfortran.
If you install these compilers with fink, it will set everything up for you in a hassle-free manner. g95 is in fink's unstable branch, so you need to enable it. In addition to g77 and g95, they have gfortran.
Just a little warning that you may or may not need; my apologies if you don't.
I've been watching, on another list, a lot of discussion of various versions of fortran. A lot of people are getting burned by mismatching versions of gcc and g77, g95 or gfortran.
Also, as far as I can tell, neither g95 nor gfortran has passed beyond a rough beta stage. My information may be out of date, but if so, it was only recently that either of them (and I wouldn't know which) became sufficiently bug-free to actually use. Bill may have better information than I.
Use the gcc_select command to check or set your gcc version; use g95 or gfortran only in combination with gcc 4.x (that is, if you're building a app that uses both C and fortran).
I've been watching, on another list, a lot of discussion of various versions of fortran. A lot of people are getting burned by mismatching versions of gcc and g77, g95 or gfortran.
Also, as far as I can tell, neither g95 nor gfortran has passed beyond a rough beta stage. My information may be out of date, but if so, it was only recently that either of them (and I wouldn't know which) became sufficiently bug-free to actually use. Bill may have better information than I.
Use the gcc_select command to check or set your gcc version; use g95 or gfortran only in combination with gcc 4.x (that is, if you're building a app that uses both C and fortran).
I've heard that the programs I need to run are considerably slower when compiled with gfortran than with g77-3.4.3. Fortunately, g77-3.4.x plays nice with gcc 4.x.x. g77 apparently incorporates many of the features of the newer versions of the language, so it is a bit of a misnomer. You are now at the end of my brain.
At this point g95 has fewer bugs and complies more programs than Absoft 9.0 or any other fortran compiler that I know of. It compiles programs much slower, but they run only slightly slower. About, the only thing missing from g95 is CRAY pointers. gfortran compiles programs much faster then g95, but it still has many bugs. Still, if one of the ~300 known bugs in gfortran does not affect your programs, it is usable. By the way, a few years ago, one of the maintainers of the HP fortran compilers told me that their known bug count never gets much below 300 and jumps up much higher at each new release.
Hi, I am just wondering, where canyou get the Fortran compilers for Tiger?
Thanks.
Thanks.
You can get standalone gfortran here:
http://gcc.gnu.org/wiki/GFortranBinaries#MacOS
gfortran 4.1 works fine with Xcode2.1 and 2.2 I've found it compiles most of my stuff but there are run-time errors in several programs.
gfortran, g77 and g95 are all available via fink. The gfortran in fink is older, and buggier, so if you want the most up to date version, grab my unofficial gcc4 fink debian packages here. You can grab my precompiled g77 there as well, if you have Xcode 2.1. If you have 2.2, you need to recompile it to get g77 to work right.
g77-3.4.x works fine with gcc4.x
http://gcc.gnu.org/wiki/GFortranBinaries#MacOS
gfortran 4.1 works fine with Xcode2.1 and 2.2 I've found it compiles most of my stuff but there are run-time errors in several programs.
gfortran, g77 and g95 are all available via fink. The gfortran in fink is older, and buggier, so if you want the most up to date version, grab my unofficial gcc4 fink debian packages here. You can grab my precompiled g77 there as well, if you have Xcode 2.1. If you have 2.2, you need to recompile it to get g77 to work right.
g77-3.4.x works fine with gcc4.x
Using Fortran Compiler