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

[netCDF #MBG-731605]: Problem installing netcdf v3.3.1.1



Hi Piyush,

The error is due to the use of the "-ansi" option in CFLAGS:

  CFLAGS='-O -m64 -ansi -FPIC'

If you remove that option, things should compile OK and "make check"
should work.

If you unset CFLAGS and CPPFLAGS before compiling, "make check" should
also work fine on your platform.  The configure script determines when
various options are needed, and setting "-Dgfortran" in CPPFLAGS is not
needed for building the netCDF C library.

We haven't tested our software with the "-ansi" option of gcc, but using
it finds uses of "//" for comments, which became valid syntax in the C99 
standard.  Nevertheless, we'll try to replace these comment sections with
the C90 sysntax before the next release.

--Russ  

> ----- Original Message -----
> > I am getting following error in make check install
> >
> > Making check in include
> > make[1]: Entering directory `/home/modeluser/NCL-req/netcdf-4.3.1.1/include'
> > make[1]: Nothing to be done for `check'.
> > make[1]: Leaving directory `/home/modeluser/NCL-req/netcdf-4.3.1.1/include'
> > Making check in oc2
> > make[1]: Entering directory `/home/modeluser/NCL-req/netcdf-4.3.1.1/oc2'
> > /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. 
> > -I.. -I.. -I../include -Dgfortran -O -m64 -ansi -FPIC -MT liboc_la-oc.lo 
> > -MD -MP -MF .deps/liboc_la-oc.Tpo -c -o liboc_la-oc.lo `test -f 'oc.c' || 
> > echo './'`oc.c
> > libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../include 
> > -Dgfortran -O -m64 -ansi -FPIC -MT liboc_la-oc.lo -MD -MP -MF 
> > .deps/liboc_la-oc.Tpo -c oc.c -fPIC -DPIC -o .libs/liboc_la-oc.o
> > In file included from ../config.h:494,
> > from oc.c:4:
> > ../include/ncconfigure.h:25: error: expected identifier or '(' before '/' 
> > token
> > ../include/ncconfigure.h:25: error: stray '#' in program
> > ../include/ncconfigure.h:26: error: stray '#' in program
> > ../include/ncconfigure.h:27: error: stray '#' in program
> > ../include/ncconfigure.h:28: error: stray '#' in program
> > ../include/ncconfigure.h:29: error: stray '#' in program
> > ../include/ncconfigure.h:30: error: stray '#' in program
> > ../include/ncconfigure.h:31: error: stray '#' in program
> > ../include/ncconfigure.h:32: error: stray '#' in program
> > oc.c: In function 'oc_dds_properties':
> > oc.c:244: warning: pointer/integer type mismatch in conditional expression
> > oc.c: In function 'oc_dds_name':
> > oc.c:283: warning: pointer/integer type mismatch in conditional expression
> > oc.c: In function 'oc_dds_fieldbyname':
> > oc.c:572: error: expected expression before '/' token
> > oc.c:572:18: warning: missing terminating ' character
> > oc.c:572: error: missing terminating ' character
> > oc.c: In function 'oc_dimension_properties':
> > oc.c:672: warning: pointer/integer type mismatch in conditional expression
> > oc.c: In function 'oc_dds_attr':
> > oc.c:751: warning: assignment makes pointer from integer without a cast
> > oc.c:757: warning: pointer/integer type mismatch in conditional expression
> > oc.c: In function 'oc_das_attr':
> > oc.c:836: warning: pointer/integer type mismatch in conditional expression
> > oc.c: In function 'oc_data_fieldbyname':
> > oc.c:988: error: expected expression before '/' token
> > oc.c:988:18: warning: missing terminating ' character
> > oc.c:988: error: missing terminating ' character
> > make[1]: *** [liboc_la-oc.lo] Error 1
> > make[1]: Leaving directory `/home/modeluser/NCL-req/netcdf-4.3.1.1/oc2'
> > make: *** [check-recursive] Error 1
> >
> >
> > The configure command was
> > FC=gfortran ./configure --prefix=/usr/local
> 
> Could you please send us the "config.log" file that resulted from running the
> configure script? That will help us determine the cause of the problem.
> 
> Note that the netCDF-C release and netCDF-Fortran release are now separate
> source distributions, so no Fortran compiler is required in the first step, of
> bui;lding the netCDF C library:
> 
> http://www.unidata.ucar.edu/netcdf/docs/getting_and_building_netcdf.html#build_default
> 
> Once that is built and installed, you can build and install the netCDF Fortran
> library by following these instructions:
> 
> http://www.unidata.ucar.edu/netcdf/docs/building_netcdf_fortran.html
> 
> --Russ
> 
> --Russ
> 
> > ---------------------------------------------------------------------
> > Thanks and Regards
> > ---------------------------------------------------------------------
> > Piyush Bhardwaj
> > SRF, Atmospheric Science Division
> > ARIES Manora Peak, Nainital-263002
> > Uttarakhand, India.
> 
> Russ Rew UCAR Unidata Program
> address@hidden http://www.unidata.ucar.edu
> 
> 
> 
> Ticket Details
> ===================
> Ticket ID: MBG-731605
> Department: Support netCDF
> Priority: Normal
> Status: Closed
> 
> 
> 
> 
> --
> ---------------------------------------------------------------------
> Thanks and Regards
> ---------------------------------------------------------------------
> Piyush Bhardwaj
> SRF, Atmospheric Science Division
> ARIES Manora Peak, Nainital-263002
> Uttarakhand, India.
> Tel:+91-5942-233734, 233735, 233727, 232655, Ext: 147
> Fax:+91-5942-233439
> ---------------------------------------------------------------------
> 
> 
Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: MBG-731605
Department: Support netCDF
Priority: Normal
Status: Closed