4.3 regression with netcdf library

Florian Ladstaedter flad@gmx.at
Tue Jul 31 18:22:00 GMT 2007


Hi, the netcdf 3.6.2 library (source available from 
http://conan.unidata.ucar.edu/downloads/netcdf/netcdf-3_6_2/index.jsp) 
can be compiled with gfortran 4.2.1 without problems:


----------------------------
FC=gfortran-4.2  CPPFLAGS=-DpgiFortran ./configure
make
make check
----------------------------

works nicely.

However with 4.3.0 20070730 I get an error message while compiling:


----------------------------
....
Making all in fortran
make[2]: Entering directory 
`/home/fhl/workspace/EGOPS/src/external/netcdf/netcdf-3.6.2/src/fortran'
make  all-am
make[3]: Entering directory 
`/home/fhl/workspace/EGOPS/src/external/netcdf/netcdf-3.6.2/src/fortran'
depbase=`echo fort-attio.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
         if /bin/sh ../libtool --tag=CC --mode=compile cc 
-DHAVE_CONFIG_H -I. -I. -I.. -I.    -I../libsrc  -DpgiFortran  -g -O2 
-MT fort-attio.lo -MD -MP -MF "$depbase.Tpo" -c -o fort-attio.lo 
fort-attio.c; \
         then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f 
"$depbase.Tpo"; exit 1; fi
libtool: compile:  cc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I../libsrc 
-DpgiFortran -g -O2 -MT fort-attio.lo -MD -MP -MF .deps/fort-attio.Tpo 
-c fort-attio.c -o fort-attio.o
In file included from fort-attio.c:7:
ncfortran.h:26:42: error: NF_INT_IS_C_... not defined: No such file or 
directory
----------------------------


The problem seems to be related with a different output of the configure 
script:


4.2.1:
-------------------------------------
checking for Fortran "byte"... yes
checking for Fortran "integer*2"... yes
checking if Fortran "byte" is C "signed char"... yes
checking if Fortran "byte" is C "short"... no
checking if Fortran "byte" is C "int"... no
checking if Fortran "byte" is C "long"... no
checking if Fortran "integer*2" is C "short"... yes
checking if Fortran "integer*2" is C "int"... no
checking if Fortran "integer*2" is C "long"... no
checking if Fortran "integer" is C "int"... yes
checking if Fortran "real" is C "float"... yes
checking if Fortran "doubleprecision" is C "double"... yes
checking for Fortran-equivalent to netCDF "byte"... byte
checking for Fortran-equivalent to netCDF "short"... integer*2
-------------------------------------

4.3.0:
-------------------------------------
checking for Fortran "byte"... yes
checking for Fortran "integer*2"... yes
checking if Fortran "byte" is C "signed char"... no
checking if Fortran "byte" is C "short"... no
checking if Fortran "byte" is C "int"... no
checking if Fortran "byte" is C "long"... no
checking if Fortran "integer*2" is C "short"... no
checking if Fortran "integer*2" is C "int"... no
checking if Fortran "integer*2" is C "long"... no
checking if Fortran "integer" is C "int"... no
checking if Fortran "integer" is C "long"... no
checking if Fortran "real" is C "float"... no
checking if Fortran "real" is C "double"... no
checking if Fortran "doubleprecision" is C "double"... no
checking if Fortran "doubleprecision" is C "float"... no
checking for Fortran-equivalent to netCDF "byte"... byte
checking for Fortran-equivalent to netCDF "short"... integer*2
-------------------------------------


Since this seems to be related to the -dev version of gfortran I post 
this here and not at the netcdf list. Not much information though I 
admit. Please find the sources at the link provided.

thanks florian





More information about the Fortran mailing list