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, > How are you,I am trying to install netCDF(version 3.4) on my PC > with Redhat Linux 7.1,the gcc,g++ and pgf90 are all working well,but > the 'make' is failed although I have used the appended cfortran.h and > set environmental variables as the updated version of INSTALL > file.Please check the files > (cfortran.h,config.log,make.log,.bash_profile,.cshrc)I send to you and > give me some suggestion on solving the problem.I am looking forward to > your help.Thank you! I don't think your .bash_profile or .cshrc was read before you ran the "configure" script, because it looks like the CPPFLAGS environment variable setting CPPFLAGS='-DNDEBUG -DpgiFortran' wasn't used. If it had been used, it would cause these flags to appear when compiling, after invoking "make". But the "make.log" file you sent showed: ... make[2]: Entering directory `/home/project/cmaq/hzw/tools/netCDF/netcdf-3.4/src/fortran' cc -c -O -I../libsrc -DNDEBUG fort-attio.c which doesn't have the "-DpgiFortran" macro defined. If the CPPFLAGS had been set and exported, the above line should have appeared as cc -c -O -I../libsrc -DNDEBUG -DpgiFortran fort-attio.c I'm not sure why the CPPFLAGS isn't getting set correctly, but maybe export it manually in bash (or csh), along with the other environment variables you need, before invoking the configure script: export CPPFLAGS='-DNDEBUG -DpgiFortran' rm config.cache make clean ./configure make Also, if you are following the current INSTALL.html instructions at http://www.unidata.ucar.edu/packages/netcdf/INSTALL.html you should be using netCDF version 3.5 instead of version 3.4, as these settings may not have been tested with version 3.4. Please let us know if this doesn't get you by the problem you are seeing. --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu