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.
>To: address@hidden >From: "C. NICANNA (GEOLOGY) PG" <address@hidden> >Subject: netcdf installation >Organization: Dept. of Geology, University College, Dublin >Keywords: 199702101721.KAA00177 Hi Clodagh, > I was wondering if you coudl help me out with installing netcdf. I am > installing it on a Solaris OS with gcc and f77. I have tried to > follow the INSTALL document but have received the following error > messages when I try compile. > > making `all' in directory /usr/local/netcdf/netcdf-2.4.3/src/port > > `all' is updated. > > returning to directory /usr/local/netcdf/netcdf-2.4.3/src > > > making `all' in directory /usr/local/netcdf/netcdf-2.4.3/src/xdr > > > returning to directory /usr/local/netcdf/netcdf-2.4.3/src > > > making `all' in directory /usr/local/netcdf/netcdf-2.4.3/src/libsrc > > gcc -c -fpic -O -DNO_STDARG error.c > *** Error code 1 > *** Error code 1 > make: Fatal error: Command failed for target `error.o' > Current working directory /usr/local/netcdf/netcdf-2.4.3/src/libsrc > *** Error code 1 > make: Fatal error: Command failed for target `libsrc/all' > cnic@gloria~>make all > log > error.c: In function `nc_serror': > error.c:121: number of arguments doesn't match prototype > local_nc.h:178: prototype declaration > error.c: In function `NCadvise': > error.c:194: number of arguments doesn't match prototype > local_nc.h:183: prototype declaration > make: Fatal error: Command failed for target `error.o' > Current working directory /usr/local/netcdf/netcdf-2.4.3/src/libsrc > make: Fatal error: Command failed for target `libsrc/all' It appears as if there is something wrong with your gcc installation or supporting "include" files, because apparently the "configure" script finds that the -DNO_STDARG option is needed with gcc. But gcc is an ANSI standard C compiler, so it should not need this option, and our gcc compiler (version 2.7.2 on SunOS 5.5) doesn't need this option. If your gcc can't compile the following small test program, then that would demonstrate the problem, because this is standard C. If you can get it working on this, then it may work for building netCDF. If this C program is stored in a file named "t.c", then you should see no errors when you invoke "gcc -c t.c" to compile it. #include <stdarg.h> int foo(int bar, ...) { va_list alist; va_start(alist, bar); bar = (int)va_arg(alist, int); va_end(alist); return 0; } Please let us know if you can compile this, but it still doesn't work for netCDF. --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu