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: Russ Rew <address@hidden> >From: "Paul Kucera" <address@hidden> >Subject: Problems install netcdf >Organization: Goddard Space Flight Center >Keywords: 199612112204.AA00492 Paul, > >You can either find out what's needed to get the c++ compiler to compile > >and link the above program first, or just disable the compilation and > >testing of the netCDF C++ interface by setting > > > >CXX="" > > > >in your CUSTOMIZE file before invoking the configure script. > > > >(Our configure script should probably be made smarter, to make sure that > >that if there is a C++ compiler, it can successfully compile and link a > >trivial C++ program.) > > I made the following changes to my CUSTOMIZE file and re-compiled netcdf. I > didn't receive any errors this time, buy when I ran make test I received the > following errors: > > 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 -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 > > I was thinking that this error was caused by turning off the C++ > interface when compiling netcdf. Is this true? No, I think it may be an artifact of not running "make clean" first. 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". Please let us know if this doesn't work at address@hidden. --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu