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.
Cindy, >Date: Thu, 5 Oct 95 16:59:33 PDT >From: address@hidden (CR Turney) >Organization: Battelle Pacific Northwest Laboratories >Subject: Re: 951005: netCDF on sun solaris >Keywords: 199510051709.AA26566 In the above message you wrote: > The reason I used the nondefault XDRFILE in the first place is that > I was having trouble with NCAR's ZEBRA software. It was inserting bogus zeros > into my netCDF files. It was a problem that was very difficult to demonstrate > reliably, because it would appear and disappear again. > > The problem would occur on our auto-mounted system but not on our > system which wasn't auto-mounted. > > Gary Granger, of NCAR, gave me a netcdf library that he created on > his solaris system using xdrstdio instead of xdrposix. It seems to have > solved my problem. So, now it was time to create my own library. But, I > had problems so finally I contacted you. > > ******************************************************************************* > > I went ahead and followed your suggested CUSTOMIZE changes, anyway, > andI am still having trouble: > > I had trouble with make all: ... > making `all' in directory /home/d3a058/netcdf/netcdf-232pl4/fortran > > ./fortc -L . -O sunos common.inc > netcdf.inc > ./fortc -L . -O sunos jackets.src > jackets.c > gcc -O -c -I../libsrc -DDEBUG -g jackets.c > jackets.c:74: initializer element for `ncfils_.dd' is not constant > jackets.c:76: initializer element for `ncfils_.ff' is not constant > *** Error code 1 > make: Fatal error: Command failed for target `jackets.o' > Current working directory /home/d3a058/netcdf/netcdf-232pl4/fortran > *** Error code 1 > make: Fatal error: Command failed for target `all' > Current working directory /home/d3a058/netcdf/netcdf-232pl4/fortran > *** Error code 1 > make: Fatal error: Command failed for target `fortran/all' If you don't have a need for old fill values (see the discussion in the INSTALL file), then I suggest the following: 1. Go to the top-level source directory. 2. Execute `make clean'. 3. Edit the file CUSTOMIZE and remove the setting of OLDFILLVALUES. 4. Execute `./configure' and send it to me. 5. Execute `make clean'. > ***************************************************************************** > So I put these constants in jackets.c that I found on another solaris > machine. I have no idea whether they are correct. > > /* XDR_D_INFINITY, You may have to insert a constant here */ > 1.797693134862315900e+308, > FILL_LONG, > /* XDR_F_INFINITY, You may have to insert a constant here */ > 3.40282357e+38, They should be ok. > Then I did another make all, which appeared to be successful. > > Then my make test failed (and now I am stuck, again): > > {116} d3a058@mock -> make test ... > making `test' in directory /home/d3a058/netcdf/netcdf-232pl4/fortran > > ar rcuv ../libsrc/libnetcdf.a jackets.o > ./fortc -L . -O sunos ftest.src > ftest.f > f77 -c ftest.f > ftest.f: > MAIN ftest: > tncacpy: > tncadel: > tncagt: > tncapt: > BLOCK DATA: > tncddef: > tncinq: > tncredf: > tncvdef: > tncvgt: > tncvgt1: > tncvpt: > tncvpt1: > f77 ftest.o -L../libsrc -lnetcdf -o ftest > Undefined first referenced > symbol in file > __eprintf ../libsrc/libnetcdf.a(file.o) > ld: fatal: Symbol referencing errors. No output written to ftest > *** Error code 1 > make: Fatal error: Command failed for target `ftest' > Current working directory /home/d3a058/netcdf/netcdf-232pl4/fortran > *** Error code 1 > make: Fatal error: Command failed for target `test' > Current working directory /home/d3a058/netcdf/netcdf-232pl4/fortran I suspect that the Sun FORTRAN compiler and the GNU C compiler aren't working well together. You'll probably have to tell the FORTRAN compiler to use the GNU C runtime library. The reference will be something like `-L/usr/local/gnu/lib -lc' or `-L/usr/local/gnu/lib/gcc-lib/sun4-sun-sunos5.4/2.7.0 -lgcc'. This should be added to the LIBS macro in the file fortran/Makefile. -------- Steve Emmerson <address@hidden>