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: Jill Wessel <address@hidden> >Subject: error when compiling netcdf v2.3.2 on Solaris 2.5 >Organization: Pacific Tsunami Warning Center >Keywords: 199610012038.AA06183 Hi Jill, > Has anyone run across this error and know how to resolve it: > > I'm using Sun Ansi C compilor v4.0 on a SPARC 20 running > Solaris 2.5. I edited paths in the CUSTOMIZE file and ran > configure before compiling. > The netcdf version I have is > 2.3.2 and I cannot use a later version at this time because > of programs I'm using with it. I'm not sure I understand your last statement. The current version, netCDF 2.4.3, uses exactly the same file format as netCDF 2.3.2, and is backward compatible with the netCDF 2.3.2 interface. It should work fine with other programs using the 2.3.2 interface, except that programs that use NC_LONG data need to be recompiled with the new library. If there are other incompatibilities that prevent using the current version of the library, we'd like to know about them. Nevertheless, I tried to duplicate the problem you are seeing by building netCDF 2.3.2 from a freshly unpacked compressed tar file on a Solaris 2.5 platform, and it seemed to work fine. Perhaps you just need to do a "make clean" from the top level before running "make all test". I've added a few more notes below on the differences I see ... > # make all > > making `all' in directory /export/opt/netcdf/netcdf-232pl2/port > > ar rcuv libudport.a uddummy.o > ranlib libudport.a > > returning to directory /export/opt/netcdf/netcdf-232pl2 > > > making `all' in directory /export/opt/netcdf/netcdf-232pl2/xdr > > ar rcuv ../libsrc/libnetcdf.a xdr.o xdrfloat.o xdrstdio.o xdrarray.o > ranlib ../libsrc/libnetcdf.a > > returning to directory /export/opt/netcdf/netcdf-232pl2 > > > making `all' in directory /export/opt/netcdf/netcdf-232pl2/libsrc > > /usr/local/SUNWspro/bin/cc -c -DNDEBUG -O array.c > /usr/local/SUNWspro/bin/cc -c -DNDEBUG -O attr.c > /usr/local/SUNWspro/bin/cc -c -DNDEBUG -O cdf.c > /usr/local/SUNWspro/bin/cc -c -DNDEBUG -O dim.c > /usr/local/SUNWspro/bin/cc -c -DNDEBUG -O file.c > /usr/local/SUNWspro/bin/cc -c -DNDEBUG -O iarray.c > /usr/local/SUNWspro/bin/cc -c -DNDEBUG -O error.c > /usr/local/SUNWspro/bin/cc -c -DNDEBUG -O globdef.c > /usr/local/SUNWspro/bin/cc -c -DNDEBUG -O putget.c > /usr/local/SUNWspro/bin/cc -c -DNDEBUG -O putgetg.c > /usr/local/SUNWspro/bin/cc -c -DNDEBUG -O sharray.c > /usr/local/SUNWspro/bin/cc -c -DNDEBUG -O string.c > /usr/local/SUNWspro/bin/cc -c -DNDEBUG -O var.c > /usr/local/SUNWspro/bin/cc -c -DNDEBUG -O xdrposix.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 > ar: writing libnetcdf.a > r - array.o > r - attr.o > r - cdf.o > r - dim.o > r - file.o > r - iarray.o > r - error.o > r - globdef.o > r - putget.o > r - putgetg.o > r - sharray.o > r - string.o > r - var.o > r - xdrposix.o > ranlib libnetcdf.a > > returning to directory /export/opt/netcdf/netcdf-232pl2 > > > making `all' in directory /export/opt/netcdf/netcdf-232pl2/fortran > > `netcdf.inc' is up to date. > /usr/local/SUNWspro/bin/cc -c -I../libsrc -DNDEBUG -O jackets.c > "jackets.c", line 74: non-constant initializer: op "NAME" > "jackets.c", line 76: non-constant initializer: op "NAME" > cc: acomp failed for jackets.c > *** Error code 2 > make: Fatal error: Command failed for target `jackets.o' > Current working directory /export/opt/netcdf/netcdf-232pl2/fortran > *** Error code 1 > make: Fatal error: Command failed for target `all' > Current working directory /export/opt/netcdf/netcdf-232pl2/fortran > *** Error code 1 > make: Fatal error: Command failed for target `fortran/all' When I ran "make all", the following was output for the fortran directory: making `all' in directory /a/zero/home/russ/tmp/netcdf-232pl2/fortran ./fortc -L . -O sunos common.inc > netcdf.inc ./fortc -L . -O sunos jackets.src > jackets.c cc -c -I../libsrc -DNDEBUG -O jackets.c ar rcuv ../libsrc/libnetcdf.a jackets.o I suspect you have a left-over "jackets.c" file from some previous build that may have been for a different platform, so a "make clean" is probably required to get the appropriate "jackets.c" file generated again. --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu