[Discuss] fortran + gcc 4
pw
p.willis at telus.net
Tue Nov 7 13:06:37 PST 2006
Alan W. Irwin wrote:
> 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
I looked at CMake a while back but never really got much
past the basics.
Does CMake still use M4 or is it a completely different
base from the M4 autotools system?
Autotools has a lot of overhead with large builds, mostly
due to the generic scripting used for many of the base
functions. It always irks me a bit when I make a generic autotools
build of something using autoconf and automake and the configure
script takes aeons to check for libaries that the program will never
use. It's easier to use makefiles in many cases, but people then
complain that they need to edit.
Can you recommend a good howto for CMake?
Peter
More information about the Discuss
mailing list