[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #IJR-228088]: Fortran issues



> Dear netcdf support
> I seem to be having some trouble with the itnerface between netcdf and
> gfortran
> # 14:22:07 address@hidden .40 $ cd ~/Downloads/netcdf-4.0.1 && gcc -v
> Using built-in specs.
> Target: i686-apple-darwin10
> Configured with: /var/tmp/gcc/gcc-5666.3~6/src/configure --disable-checking
> --enable-werror --prefix=/usr --mandir=/share/man
> --enable-languages=c,objc,c++,obj-c++
> --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib
> --build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10-
> --host=x86_64-apple-darwin10 --target=i686-apple-darwin10
> --with-gxx-include-dir=/include/c++/4.2.1
> Thread model: posix
> gcc version 4.2.1 (Apple Inc. build 5666) (dot 3)
> 
> # 14:22:12 address@hidden .41 $ cd ~/Downloads/netcdf-4.0.1 && gfortran -v
> Using built-in specs.
> COLLECT_GCC=gfortran
> Target: x86_64-apple-darwin10.3.0
> Configured with: ../gcc-4_5-branch/configure --prefix=/usr/local/gfortran
> --enable-languages=c,c++,fortran
> --with-gmp=/Users/fx/devel/gcc/ibin45/../irun45 --enable-bootstrap
> --with-included-gettext --with-arch=nocona --with-tune=generic
> Thread model: posix
> gcc version 4.5.1 20100506 (prerelease) (GCC)
> 
> When I type ./configure --prefix=/Users/spcarter/installs/netcdf-4.0.1/
> I get the following

 ...

> checking whether gfortran accepts -g... no
> configure: setting up Fortran 90
> checking for Fortran flag to compile .f90 files... unknown
> configure: error: Fortran could not compile .f90 files

I think this problem is caused by using the Apple gcc with a different version 
gfortran.
If you got the fortran compiler from a different source, you should use the 
corresponding gcc 
C compiler with it.  For example, if there is a /usr/local/gcc that was 
installed with gfortran,
use that instead of the /usr/bin/gcc from Apple's XCode.  This is not a netCDF 
problem, as
you'll see by Googling for the specific associated error message that appears 
in your
config.log file: 

  configure:5526: gfortran -c -g  conftest.f >&5
  gfortran: error trying to exec 'f951': execvp: No such file or directory
  configure:5533: $? = 1
  configure: failed program was:
  |       program main
  | 
  |       end

--Russ


Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: IJR-228088
Department: Support netCDF
Priority: Normal
Status: Closed


NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.