This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Patrick, > To: address@hidden > From: "Patrick O'Leary" <address@hidden> > Subject: Problem installing netcdfperl 1.2 > Organization: NOAA/FSL > Keywords: 200003291844.LAA23106 In the above message, you wrote: > [oleary@spur src]$ sudo make > make[1]: Entering directory `/tmp/netcdf-perl-1.2/src' > make[2]: Entering directory `/tmp/netcdf-perl-1.2/src' > > making `dynamic' in directory /tmp/netcdf-perl-1.2/src/perl > > make[3]: Entering directory `/tmp/netcdf-perl-1.2/src/perl' > cc -c -I/usr/local/netcdf-3.4/include -fno-strict-aliasing > -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"1.2\" > -DXS_VERSION=\"1.2\" -fpic > -I/usr/local/perl-5.6.0/lib/5.6.0/i686-linux/CORE NetCDF.c > In file included from NetCDF.xs:23: > /usr/include/assert.h:79: warning: `assert' redefined > /usr/local/perl-5.6.0/lib/5.6.0/i686-linux/CORE/perl.h:2054: warning: > this is the location of the previous definition > NetCDF.xs: In function `pv_data': > NetCDF.xs:823: `na' undeclared (first use in this function) > NetCDF.xs:823: (Each undeclared identifier is reported only once > NetCDF.xs:823: for each function it appears in.) > NetCDF.xs: In function `XS_NetCDF_attput': > NetCDF.xs:2251: `na' undeclared (first use in this function) > make[3]: *** [NetCDF.o] Error 1 > make[3]: Leaving directory `/tmp/netcdf-perl-1.2/src/perl' > make[2]: *** [perl/dynamic] Error 1 > make[2]: Leaving directory `/tmp/netcdf-perl-1.2/src' > make[1]: *** [decision] Error 2 > make[1]: Leaving directory `/tmp/netcdf-perl-1.2/src' > make: *** [all] Error 2 The referenced variable "na" should have been "Perl_na". It would seem that the file netCDF.c is being incorrectly generated from file NetCDF.xs by your perl utility. Try removing the file perl/netCDF.c in order to have the make utility regenerate it. Execute the command "make -n NetCDF.o". Grab the command that make(1) thinks it would execute in order to generate the object file. Change the "-c" (compile) option to "-E" (preprocess). Is the variable at the relevant position "na" or "Perl_na"? Regards, Steve Emmerson <http://www.unidata.ucar.edu>