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.
Tom, > To: address@hidden > From: address@hidden (Thomas Reed) > Subject: netCDF and gcc > Organization: . > Keywords: 199601301127.AA19610 In the above message you wrote: > I'm trying to compile netcdf on a SUN 20, running solaris 2.4 > we have gcc, and make some headway, but not enough. > > To wit: > > ld: fatal: file ../libsrc/libnetcdf.a: unknown type, unable to process > using elf(3E) libraries > ld: fatal: File processing errors. No output written to ncdump > make[1]: *** [ncdump] Error 1 > make[1]: Leaving directory `/opt/OIC/Other/NETCDF/netcdf-232pl4/ncdump' > make: *** [ncdump/all] Error 1 > > > I hate to be dense, but any input would be greatly appreciated. That error message from ld(1) is pretty odd. It indicates that that the netCDF library (libsrc/libnetcdf.a) has an unknown format. I suggest using gcc(1) as the linker. Try the following: 1. Go to the top-level source directory. 2. Execute the command `make clean'. 3. Ensure that the file `config.cache' does *not* exist. 4. Set the environment variable `LD' to `gcc'. 5. Execute the configure script. Trap the output. 6. If the above fails, then send me its output and the file `config.log' and stop here. 7. Execute the command `grep LD config.status'. Trap the output and send it to me. 8. Execute the command `make'. Trap the output. 9. If the above fails, then send me its output and stop here. 10. Execute the command `make test'. Trap the output. 11. If the above fails, then send me its output. -------- Steve Emmerson <address@hidden>