Compiling Netcdf Operators errors

Hi

PGI 10.9 x86_64
Ubuntu 10.04 LTS

Netcdf 4.1.1 compiled and working successfully

export NETCDF_INC=/usr/local/netcdf/include; export NETCDF_LIB=/usr/local/netcdf/lib

CC=pgcc CXX=pgCC F77=pgf90 F90=pgf90 ./configure --prefix=/usr/local/nco-4.0.6-pgi


While trying to compile NetCDF Operators, http://nco.sourceforge.net/ I keep hitting this error:

root@new:/usr/local/src/nco-4.0.6/src/nco# pgcc -DHAVE_CONFIG_H -I. -I…/… -I/usr/local/netcdf/include -DPGI_CC -g -c9x -c nco_pck.c -fpic -DPIC -o .libs/nco_pck.o
PGC-S-0037-Syntax error: Recovery attempted by deleting ‘=’ (nco_pck.c: 866)
PGC/x86-64 Linux 10.9-0: compilation completed with severe errors

Please help…

I found that the nco-4.0.6 source has an error that leads to this error with PGI as well as GCC:

The offending lines are:

229 #ifndef NC_MAX_BYTE
230 # define NC_MAX_BYTE
231 endif
232 #ifndef NC_MAX_BYTE
233 # define NC_MAX_BYTE 127
234 endif

Fix line 230 to continue compiling:

root@newton:/usr/local/src/nco-4.0.6# diff src/nco/nco.h src/nco/nco.h.ORIG
230c230
< # define NC_MAX_BYTE 127

define NC_MAX_BYTE

root@newton:/usr/local/src/nco-4.0.6#


But now gcc completes compilation and PGI fails :-(

Hi AnandVaidya,

PGI fails :-(

How does PGI fail? I just tried the file, and it seemed to work fine.

  • Mat