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.
> Hi Ed, > > No, I didn't get netCDF to build. But I haven't tried much since then. I > am sure I'm not setting CPPFLAGS. Here's what I've set and the configure > command: > > export FC='/usr/local/bin/gfortran' > export CC='/usr/local/bin/gcc' > export CFLAGS='-g -O2' > export FFLAGS='-g -O2' > ./configure --prefix=/Users/tiago/codes/netcdf --disable-cxx > > > In fact, netCDF builds. But make check fails in the fortran part, when > linking it says symbols not found. Maybe something is wrong with the > gfortran I use? (from hpc.sourceforge.net) > > I'm attaching the config.log, make.log and also make_check.log. > > Cheers, > > Tiago > OK, now I see what is going on. The configure script is looking for a fortran compiler called "gfortran" and you are giving it one called "/usr/local/bin/gfortran". Try this: export PATH="/usr/local/bin:$PATH" FC=gfortran ./configure --prefix=/Users/tiago/codes/netcdf --disable-cxx I don't think you really want to set the CFLAGS and FFLAGS that way. You probably don't really want to be able to debug netCDF library code (that is, the code inside the library). And some good optimization for GNU will be turned on by default by the configure script, so best not to set that either, unless you have some specific reason to do so. Please let me know if this works... Meanwhile, I have changed the code base. Once this change makes it through testing it will be part of the daily snapshot releases, and part of future netCDF releases, so other users will not experience this problem. Thanks, Ed Then set Ticket Details =================== Ticket ID: XJP-840947 Department: Support netCDF Priority: Normal Status: Open