Print

Print


On Tue, 24 Feb 2004, Norman Gray wrote:

> On Tue, 24 Feb 2004, Peter W. Draper wrote:
>
> > Clearly the presence of an f95 command on my system is causing some
> > unintended havoc. I guess you need to prefer *77 compilers over *95 ones
> > (but that "--mode=compile f95" looks odd as a parameter to me too).
>
> I'm printing out the libtool manual as I type, as it's clear I'm going
> to have to commune with it more deeply than I had hoped.  I'm not sure
> _exactly_ what's happening here, but I can sort-of see why it's happening.
> Autoconf now has two sets of Fortran macros, the `F77' ones and the `FC'
> ones; the former are about to be deprecated, I understand, and so I based
> the automake support for fpp on the FC macros.  There's little difference
> at present, except that the FC ones are flexible enough that they can
> cope with Fortran95 and will, I think, prefer Fortran95 compilers over
> Fortran77 compilers if they find them.
>
> My understanding was that this wouldn't matter, since Fortran77 is
> a subset of Fortran95 so that a f95 compiler could grok f77 code.
> It does look as if it's mattering here, though I have a recollection that
> `unable to infer tagged configuration' means something more specifically
> libtoolish.  I'll need to get back to this, I'm afraid.

Norman,

hmm, I'm not as confident as you that picking an f95 compiler in
preference to an f77 one is right, for our code anyway. It's certainly an
untested option, plus there's the issue of deprecation. Some features are
being removed from the language that were once supported. The recent
Fortran 2003 proposals has actually deleted some features from the
language:

   REAL and DOUBLE DO variables
   Branching to an END IF from outside its block
   the PAUSE statement
   ASSIGN and assigned GOTO
   H edit descriptor

There's also a few cut-down f90/95 compilers that don't even claim to
support the full language.


> The --mode=compile is right.  When you're building shared libraries,
> you more-or-less have to let libtool oversee the compilation, too, so
> that it can add the right PIC options.
>
> > Tried setting the environment variable F77, but that doesn't seem to have
> > gotten me any further. Any configuration options (--with-xxx) that I can
> > also try to work around this?
>
> F77 is right for the old F77 macros.  The analogue for the FC macros
> should be FC, so if you set that at ./configure time, either by
> setting FC in the environment or, better, by giving it as a parameter
> to configure (./configure FC=/path/to/g77), then it should propagate
> through correctly.  If you do it the latter way, then ./configure can
> check that it's consistent between reconfigures.

OK, I'll try that.

Cheers,

Peter.