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.
Hi Pietro, > Hi Russ, do you remember me? I am Pietro Toschi and I wrote you last week > about > a problem installing netcdf. Well, I actually fixed that problem: my xlc > compiler was corrupted! Now it works well and I made a successful "make all", > but troubles are going to come; when I issue "make test" I get this error > message: > > making `test' in directory /usr/local/netcdf/libsrc > > cc -c -DNDEBUG -D_ALL_SOURCE -O cdftest.c > ar rcuv libnetcdf.a array.o attr.o cdf.o dim.o file.o iarray.o error.o > globdef.o putget.o putgetg.o sharray.o string.o var.o xdrposix.o > ranlib libnetcdf.a > cc -O cdftest.o libnetcdf.a -o cdftest > ./cdftest > cdftest_out.new > ncattget: attribute "TITLE" not found > Assertion failed: file cdftest.c, line 393 ... > My machine is an IBM RS/6000 running AIX 3.2.5 w. XLC 1.3.0.0 and XLF 2.3 We have observed a problem with the optimizer in the C compiler of AIX 3.2. The default for our configure script is to specify optimization by using the "-O" compiler flag, but that causes the netCDF library to be built incorrectly under AIX 3.2, with the symptom that "make test" will fail even though there are no compile or link errors when building from source. A workaround is to build the netCDF library with CFLAGS="" (or "-g") explicitly, by setting the environment variable CFLAGS to "" or "-g" before invoking configure, or by using one of the other methods suggested in the INSTALL file to prevent the use of the "-O" flag for compilation. The specific file that is incorrectly compiled with "-O" is libsrc/string.c, so another workaround is to recompile that file without "-O". Delete the ncgen and ncdump executables before rebuilding, so they will get rebuilt using the new library. NOTE: This is no longer a problem on AIX 4.1.2. > I also tryed to install netcdf-2.3.2 on a SGI Indy: It seemed to be all > right, but when I issued "make install" I got the following error message: > > making `install' in directory /usr/local/netcdf/fortran > > mkdir -p /usr/local/netcdf/include > chmod u+rwx,g+rws,o=rx /usr/local/netcdf/include > /sbin/install -c -m 664 netcdf.inc > /usr/local/netcdf/include/netcdf.inc > /sbin/install: illegal option -c. ... > I guess IRIX 5.3 does not support "install -c" We tested the netCDF installation on IRIX 4.0 which used a BSD-style install, but with IRIX 5.x, the flags on the install utility changed. To get around this, you need to define the INSTALL configuration variable before building netCDF from the source distribution. How to do this is explained in the installation documents. INSTALL should be defined as /usr/bin/X11/bsdinst which, according to the IRIX 5.2 man pages is an install that uses BSD-style arguments. Then rerun the configure script and redo the make all. Both of these questions are now answered in the netCDF Frequently Asked Questions document at http://www.unidata.ucar.edu/packages/netcdf/faq.html ______________________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu