Skip to content
Prev 20963 / 63424 Next

further f77/gfortran

On Wed, 7 Jun 2006, Ben Bolker wrote:

            
That's not what is happening, I believe.  If the C compiler is gcc4, it 
preferentially picks gfortran, as gcc4 and g77 are not compatible on 
structures such as double complex on at least some architectures.  From 
the R.m4 file

## * If the C compiler is gcc, we try looking for a matching GCC Fortran
##   compiler (gfortran for 4.x, g77 for 3.x) first.  This should handle
##   problems if GCC 4.x and 3.x suites are installed and, depending on
##   the gcc default, the "wrong" GCC Fortran compiler is picked up (as

We used to pick a F77 compiler first, but note that all legal F77 code is 
legal F95 code so there was no actual advantage is doing so.  The issue 
here is that your code is not legal F77, and g77 (which implements 'GNU 
Fortran') is letting it through.
You cannot override either F77 or the default .f.o rule, as etc/Makeconf 
wins.  However, you set up a specific rule in Makevars, and also need an 
all: target.  See fastICA/src/Makevars for the sort of thing.