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: "Paul Kucera" <address@hidden> >Subject: Errors when testing netcdf >Organization: . >Keywords: 199612121603.AA21508 Paul, > I tried everything you suggested below. I still receive the same error when > running 'make test'. I'm not sure what I should try next. Any suggestions? > If you need anymore information from this end, please let me know > > Thanks, > Paul > > >Try this: > > > > 1. From the top-level netcdf/src/ directory, run > > > > make clean > > > > 2. To prevent the configure script from using old cached information, > > run > > > > rm config.cache > > > > 3. Rerun the "configure" script with whatever other arguments you used > > before (e.g. --prefix=...). It should use your changed CUSTOMIZE > > file and generate Makefiles that won't try to make the C++ > > interface. > > > > 4. Run "make all", "make test", and if that works "make install". > > > Error message from 'make test': > making `test' in directory /usr/local/netcdf-2.4.3/src/xdr > > make[1]: Entering directory `/usr/local/netcdf-2.4.3/src/xdr' > gcc -c -fpic -O -I/usr/include/rpc -DNO_STRERROR xdrtest.c > gcc -o xdrtest -fpic -O xdrtest.o > ld: /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.4.5/libgcc.a(__.SYMDEF): no of > reloc used 30 != no alloc 28 > collect: ld returned 4 exit status > make[1]: *** [xdrtest] Error 1 > make[1]: Leaving directory `/usr/local/netcdf-2.4.3/src/xdr' > make: *** [xdr/test] Error 1 [This is on a SunOS 4.1.3 system.] I can't duplicate the problem here, probably because we have a different version of SunOS (4.1.4) and perhaps a different version of gcc installed on it (2.7.2), but it may be that the "-fpic" flag is causing the problem, because the netCDF objects are made with "-fpic" but the gcc libraries such as libgcc.a aren't. To test if this is the case, try invoking the link line that fails from inside the /usr/local/netcdf-2.4.3/src/xdr/ directory, but *without* the "-fpic" option: gcc -o xdrtest -O xdrtest.o If this works, then that's the answer. I then have to figure out how to get the "configure" script to not add the "-fpic" option to gcc, which I'll do if you confirm this as the problem. It's strange that "ncdump", "ncgen", and "nctest" programs were apparently linked with no problems during the "make all", even though the same problem should have been encountered with them as with "xdrtest". _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu