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.
Mary, > To: address@hidden (Return requested) > cc: Mary Cairns <address@hidden> > From: Mary Cairns <address@hidden> > Subject: Problems Compiling netcdf > Organization: NOAA > Keywords: 199707031902.NAA19781 In the above message, you wrote: > I have recently downloaded your version netcdf-3.3.1, and have > problems compiling. I am trying to compile on an HP 715/64 with 82mb > RAM, running HP-UX 10.2. I have just recently upgraded the operating > system from 9.07, and installed both ancsi-C and fortran 77 compilers. We don't have an HP-UX 10.2 system in-house, but I'll try to help. > Below is listed the command I used to try to configure netcdf, along > with the output. I also tried to separately compile the problem file, > and have the output shown here also. > > ***************************************************************** > > > delmar: 21 % ./configure --prefix=/usr/local > loading cache ./config.cache > checking for m4... (cached) m4 > checking user-defined C compiler "cc" > checking C compiler... works > checking how to make dependencies... false > checking for CC... no > checking for cxx... no > checking for c++... no > checking for g++... no > checking for gcc... no > configure: warning: Could not find working C++ compiler > configure: warning: Setting CXX to the empty string > configure: warning: The C++ interface will not be built > checking how to run the C preprocessor... (cached) cc -E > checking user-defined FORTRAN compiler "fort77"... works > checking for FORTRAN .F compiler... > checking if FORTRAN compiler handles *.F files... yes > 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"... configure: error: Could not > compile conftest.c > > delmar: 22 % cc conftest.c > cc: "conftest.c", line 2: warning 5: "signed" will become a keyword. > cc: "conftest.c", line 2: error 1000: Unexpected symbol: "signed". > > > ******************************************************************* > > > I don't understand how to fix this. I am a meteorologist, and not a > systems person. I have no help here in my office. > > Is there a fix for the problem of defining the "char" between the C > compiler and the fortran compiler? > > > Thank you very much in advance for your help. I've been able to duplicate this problem on our HP-UX A.09.05 system. It appears that the "cc" C compiler is unable to handle the "signed" keyword. The solution is to use the "c89" C compiler instead. Try the following: 1. Go to the top-level source directory. 2. Remove the file "config.cache" if it exists. 3. Set the following environment variables to the indicated values: CPPFLAGS=-DNDEBUG CC=c89 CFLAGS=-O FC=fort77 FFLAGS='-O -w' CXX=CC If the C++ compiler "CC" doesn't exist, then set the "CXX" environment variable to the empty string. 4. Re-execute the configure script. Please let me know if this helps. -------- Steve Emmerson <http://www.unidata.ucar.edu>