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.
>To: address@hidden >From: "W.R. Graham" <address@hidden> >Subject: Problem making netCDF >Organization: . >Keywords: 199906231220.GAA19189 Hi Will, > The failure is during 'make' - items A-F are included below. As far > as I can tell, the -Df2cFortran flag isn't being picked up; I've > checked CPPFLAGS with "$CPPFLAGS", and it appears to be set correctly. ... > [wrg@eric wrg]$ uname -a > Linux eric.eng.cam.ac.uk 2.0.30 #1 Tue Apr 22 10:49:45 EDT 1997 i686 unknown > > [wrg@eric src]$ more VERSION > 3.4 > > [wrg@eric src]$ which cc > /usr/bin/cc > [wrg@eric src]$ which gcc > /usr/bin/gcc > [wrg@eric src]$ which fort77 > /usr/bin/fort77 > [wrg@eric src]$ which c++ > (no path returned) These all look OK, but the first line from the output of make > cc -c -O -I. -DNDEBUG attr.c which should be cc -c -O -I. -DNDEBUG -Df2cFortran attr.c and indicates that you are right that the value of the CPPFLAGS environment variable in use is "-DNDEBUG" rather than "-DNDEBUG -Df2cFortran". Maybe you are using csh, and you have set the CPPFLAGS shell variable, using "set", rather than the CPPFLAGS environment variable, using "setenv". For example, with csh $ set CPPFLAGS="-DNDEBUG -Df2cFortran" $ setenv CPPFLAGS -DNDEBUG $ echo $CPPFLAGS -DNDEBUG -Df2cFortran $ env | grep CPPFLAGS CPPFLAGS=-DNDEBUG shows a shell variable and an environment variable, both named CPPFLAGS, but with two different values. This is a cause of confusion with csh. From the csh man page: Unlike the Bourne shell, the C shell maintains a distinction between environment variables, which are automatically exported to processes it invokes, and shell variables, which are not. This is just a guess since I don't know what shell you are using, but if it's csh, try using "setenv" to set the environment variables. We have added a new section on setting environment variables to the version of INSTALL that will appear in the next release, because this is a common cause of problems. The new INSTALL file is available at http://www.unidata.ucar.edu/packages/netcdf/INSTALL --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu