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.
Matthew <address@hidden> writes: > Hi Ed, > > I've double checked that the C compiler I'm specifying for netcdf, > gcc, > works on my machine. I'm actually on a G4 with MacOS X 10.3.9. The C > compilers are GCC 3.3 and GCC 4.0 - do you have any > idea why netcdf would be stumbling over this?" > > Matthew Fulakeza > > Try setting F77, F90, and CXX to '', and not setting any flags, and see what happens. If it can build the C api, then the problem is with some of the flags you are setting... Ed > > > At 11:13 AM 1/10/2006 -0700, you wrote: >>Unidata Support <address@hidden> writes: >> >>> ------- Forwarded Message >>> >>>>To: address@hidden >>>>From: "Matthew Fulakeza" <address@hidden> >>>>Subject: netCDF Fortran (77 + 90) - can not run 'make' during > installation >>>>Organization: UCAR/Unidata >>>>Keywords: 200601101649.k0AGntOc020474 >>> >>> Institution: CSSR , Columbia University >>> Package Version: 3.6.1-beta3 >>> Operating System: Mac OSX 10.3.9 >>> Hardware Information: G4 >>> Inquiry: Hi, >>> >>> I'm trying to install netcdf on my Mac G4 (OS X 10.3.9). I've > looked at the different scripts available on your site for help and > used similar environment variables. Specifically, I looked at >>> > http://www.unidata.ucar.edu/software/netcdf/docs/other-builds.html#absoft >>> >>> Looking at the script there, I set my flags as follows: >>> >>> setenv MAKE /usr/bin/gnumake >>> >>> setenv CC /usr/bin/cc >>> setenv CPPFLAGS "-DAbsoftProFortran" >>> setenv CFLAGS "-O" >>> setenv CXX /usr/bin/c++ >>> setenv CXXFLAGS "-O" >>> >>> setenv FC /Applications/Absoft/bin/f90 >>> setenv F77 /Applications/Absoft/bin/f77 >>> setenv F90 /Applications/Absoft/bin/f90 >>> setenv FFLAGS "-g -w" >>> setenv F90FLAGS "-g -w" >>> setenv FLIBS "-lU77" >>> >>> Then I run the configure command as follows, >>> >>> [storms:netcdf/netcdf-3.6.1-beta3/src] fula% sudo ./configure > --prefix=/usr/local/netcdf >>> Password: >>> checking build system type... powerpc-apple-darwin7.9.0 >>> checking host system type... powerpc-apple-darwin7.9.0 >>> configure: WARNING: FFLAGS=-g -w >>> checking Where to put large files... . >>> checking for top-level > source-directory... /usr/local/netcdf/netcdf-3.6.1-beta3/src >>> checking for C compiler default output file name... a.out >>> checking whether the C compiler works... yes >>> checking whether we are cross compiling... no >>> checking for suffix of executables... >>> checking for suffix of object files... o >>> checking whether we are using the GNU C compiler... yes >>> checking whether /usr/bin/cc accepts -g... yes >>> checking for /usr/bin/cc option to accept ANSI C... none needed >>> checking whether we are using the GNU C++ compiler... yes >>> checking whether /usr/bin/c++ accepts -g... yes >>> checking C++ compiler "/usr/bin/c++"... configure: WARNING: > /usr/bin/c++ failed on standard C++ test program >>> configure: WARNING: darwin7.9.0 FC=darwin7.9.0 > /Applications/Absoft/bin/f90 >>> checking if we need special ifort options on Linux... F90FLAGS=-g > -w >>> checking if we need special f90 options on AIX with > xlf90... F90LAGS= >>> checking whether we are using the GNU Fortran compiler... yes >>> checking whether /Applications/Absoft/bin/f90 accepts -g... yes >>> configure: WARNING: FC=/Applications/Absoft/bin/f90 > CPPFLAGS=-DAbsoftProFortran >>> checking if Fortran-related pre-processor flag > needed... -DAbsoftProFortran >>> checking user-defined Fortran-90 compiler > "/Applications/Absoft/bin/f90"... works >>> configure: checking for m4 preprocessor... >>> checking for m4... no >>> checking for gm4... no >>> checking m4 flags... -B10000 >>> checking how to make dependencies... false >>> checking if we need to set _LARGE_FILES despite results of previous > tests... >>> checking for special C compiler options needed for large > files... no >>> checking for _FILE_OFFSET_BITS value needed for large files... no >>> checking for _LARGE_FILES value needed for large files... no >>> configure: checking for ar utility... >>> checking for ar... ar >>> checking ar flags... cru >>> configure: checking for nm utility... >>> checking for nm... nm >>> checking nm flags... >>> checking for ranlib... ranlib >>> checking for a BSD-compatible install... /usr/bin/install -c >>> checking CPPFLAGS... -DAbsoftProFortran >>> checking CC CFLAGS... /usr/bin/cc -O >>> checking type /usr/bin/cc... /usr/bin/cc is /usr/bin/cc >>> checking CXX... unset >>> checking FC... /Applications/Absoft/bin/f90 >>> checking FFLAGS... -g -w >>> checking type > /Applications/Absoft/bin/f90... /Applications/Absoft/bin/f90 is > /Applications/Absoft/bin/f90 >>> checking F90... /Applications/Absoft/bin/f90 >>> checking F90FLAGS... -g -w >>> checking type > /Applications/Absoft/bin/f90... /Applications/Absoft/bin/f90 is > /Applications/Absoft/bin/f90 >>> checking AR... ar >>> checking ARFLAGS... cru >>> checking type ar... ar is /usr/bin/ar >>> checking NM... nm >>> checking NMFLAGS... >>> checking type nm... nm is /usr/bin/nm >>> checking for SunOS Fortran -ftrap= option... >>> checking how to run the C preprocessor... /lib/cpp >>> configure: error: C preprocessor "/lib/cpp" fails sanity check >>> See `config.log' for more details. >>> >> >>If you look in config.log, you will see that, as it says, the c >>pre-processor has failed some basic test. Without a working c >>pre-processor, netCDF cannot be built, so the configure stops. The >>necessary makefiles cannot be constructed. >> >>So you need to sort out your C compiler. Do you have the gnu compiler >>installed? >> >>Ed Hartnett >> >> >> >>-- >>Ed Hartnett -- address@hidden >> >> >> > > > > Matthew Fulakeza Ph.D. > Columbia University > Center for Climate System Research > NASA/GISS > 2880 Broadway, > New York, NY 10025, USA > Tel: 212 678 5572, Fax: 212 678 5552 > -- Ed Hartnett -- address@hidden