[Discuss] fortran + gcc 4
Alan W. Irwin
irwin at beluga.phys.uvic.ca
Tue Nov 7 12:44:32 PST 2006
On 2006-11-07 09:53-0800 pw wrote:
> Looking at the GCC canonical download site, gcc 4.1.1
> (my current version) shows gcc-fortran-4.1.1 .
> This is fortran 95/2003 for gcc.
>
> I assume this is what I am *supposed* to install
> for my version of GCC.
Possibly. But it really depends on the origin of your gcc (what vendor
patches were applied to it, etc.) There may be consistency issues. (There
are on-going problems with gfortran on Mac OS X because of this issue.)
I would have a look at the gcc 4.1.1 tarball first. It may already include
gfortran or give you explicit instructions about anything extra that needs
to be downloaded to obtain gfortran. Anyhow, following those instructions
(or else the instructions in the gcc-fortran-4.1.1 tarball) should insure
consistency between gfortran and the gcc C compiler.
>
> Does anyone know if this also maps to g77?
According to all the websites I have read nobody wanted to port g77 (which
used facilities in gcc-3.x) to gcc-4.x. So I think the answer to your
question must be "no".
>
> The reason I ask is, I am installing some older software that uses g77
> as part of its core. The scripts provided are peppered with g77 (f77)
> references.
I think you are going to have to change those references to f95. Better
yet, since that apparently is a build script may I highly recommend CMake to
do your builds? Even if you have no CMake experience at all, expertise
in that build system is well worth having for all open-source developers.
Within the last year or so I posted here (in connection with the X.org move
to it from the home-brew X build system that preceded it) about how
autotools (the combination of autoconf, automake, and libtool) had become
the de facto standard build system for open-source projects. But what a
difference a year makes in the open-source world; CMake has a lot of
momentum now as THE open-source build system to use.
What changed the landscape was the KDE developers became disenchanted with
the ability of autotools to deal with the KDE build complexity. (That
complaint resonated with a lot of developers like me who have put up with
incomprehensible autotools "magic" for years.) Their developers tried a
number of alternatives, but once they tried CMake they became completely
convinced, and they have now made the complete transition from an autotools
build system to a CMake build system. Once that story came out, I tried
doing the transition from autotools to CMake for PLplot with excellent
results. From this good experience, and the good experience of many other
projects that were inspired by the KDE example to make the same transition,
I think CMake is fast becoming one of the most important parts of the
open-source developer toolkit. It configures much faster than the autotools
configure script, the CMake configuration files are much easier to
understand, extend, and maintain, and it works on all Unix platforms
(including Mac OS X and Linux) as well as all windows platforms (including
Cygwin, MinGW, MinGW/MSYS, and bare windows).
To be honest, there is also one weakness with CMake and that is fortran
build issues which are taking a while to sort out because of lack of fortran
expertise by the CMake core developers. However, two simple workarounds to
the fortran bugs in the current CMake suffice to help PLplot build both
fortran 77 and fortran 95 interfaces, examples, and tests, and I would be
happy to give the needed fortran advice if you decide to take the CMake
plunge.
Alan
__________________________
Alan W. Irwin
Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).
Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________
Linux-powered Science
__________________________
More information about the Discuss
mailing list