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.
Olivier, > >To: address@hidden > >cc: address@hidden, > >cc: address@hidden > >From: address@hidden > >Subject: Problem compiling netCDF source files on Unix > >Organization: UCAR/Unidata > >Keywords: 200208301657.g7UGvbZ08774 The above message contained the following: > I got the source files for the netCDF library 3.5 on a mirror site in > japan > (your ftp server ftp.unidata.ucar.edu does not seem to work) and I did not > succeed in compiling them correctly. > Could you give me a piece of advice, please? > > Here are the element A to F of the reporting problems sections of the install > file > > A : uname command > > SunOS calix01 5.8 Generic_108528-09 sun4u sparc SUNW,Ultra-80 > > B: version file > > 3.5.0 > > C: pathnames of compilers > > export CC=/opt/forte6/SUNWspro/bin/cc > export FC=/opt/forte6/SUNWspro/bin/f77 > export F90=/opt/forte6/SUNWspro/bin/f90 > export CXX=/opt/forte6/SUNWspro/bin/cpp > > D: configure.log file > > creating cache ./config.cache > checking for top-level source-directory > /data/MarsDATA/netCDF/netcdf-3.5.0/src > checking for m4 preprocessor > checking for m4... m4 > checking m4 flags... -B10000 > checking C compiler "/opt/forte6/SUNWspro/bin/cc"... works > checking how to make dependencies... cc -xM > checking for /opt/forte6/SUNWspro/bin/cpp... /opt/forte6/SUNWspro/bin/cpp > checking C++ compiler "/opt/forte6/SUNWspro/bin/cpp"... checking how to run > the > C preprocessor... /opt/forte6/SUNWspro/bin/cc -E > checking user-defined Fortran-77 compiler "/opt/forte6/SUNWspro/bin/f77"... > works > checking for Fortran .F compiler... > checking if Fortran-77 compiler handles *.F files... yes > checking user-defined Fortran-90 compiler "/opt/forte6/SUNWspro/bin/f90"... > works > checking for nm utility > checking for nm... nm > checking nm flags... > checking for C-equivalent to Fortran routine "SUB"... sub_ > checking for Fortran "byte"... yes > checking for Fortran "integer*2"... yes > checking if Fortran "byte" is C "signed char"... no Odd. I would have expected that the Fortran "byte" type would be a C "signed char". I note from your "config.log" file that the configure script couldn't execute the test program: ... > configure:1933: checking if Fortran "byte" is C "signed char" > configure:1942: /opt/forte6/SUNWspro/bin/cc -c -DNDEBUG -O conftest.c > configure:1944: /opt/forte6/SUNWspro/bin/f77 -c conftestf.f > conftestf.f: > MAIN: > configure:1946: /opt/forte6/SUNWspro/bin/f77 -o conftest conftestf.o > conftest.o > configure:1948: ./conftest > ./configure: ./conftest: cannot execute This indicates a problem with your environment that must be fixed before you can build the netCDF package. I suggest that you modify the configure script just after the above point so that you can manually test the compilation, linking, and execution. Beginning at line 1968 of the configure script, change the following done rm -f conftest* to done exit 1 rm -f conftest* This will terminate the configure script without removing the test files. You should then try to execute the test program manually, e.g. ./conftest Try to determine why the system won't execute this file. Good luck. Please let me know what you discover. Regards, Steve Emmerson <http://www.unidata.ucar.edu>