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: address@hidden >Subject: Problems building netCDF >Organization: NOAA Aircraft Operations Center >Keywords: 199810061210.GAA07415 Hi John, > I am trying to build netCDF-3.4 on my linux box. I am running Red Hat 5.1 > (Linux 2.0.34). When I run make I get some errors in the "Fortran" section > of the build. I am using gcc ver.2.8.1 and g77 ver. 0.5.23. Thanks for > any help you can provide. > > See attached files. I couldn't find any indication of the errors you saw in the Fortran section of the build from the files you sent. The `make.log' file contained no error messages: ... Making `all' in directory /home/local/netcdf-3.4/src/fortran make[2]: Entering directory `/home/local/netcdf-3.4/src/fortran' cc -c -O -I../libsrc -DNDEBUG fort-attio.c make[2]: Leaving directory `/home/local/netcdf-3.4/src/fortran' make[1]: Leaving directory `/home/local/netcdf-3.4/src' and the `configur.log' file indicates that the configure script completed with no problems. However, I see no evidence that you used any of the recommended environment variable settings for Linux that are specified in the INSTALL file before running the configure script. Did you set the environment variable CPPFLAGS to "-Df2cFortran", for example? If not, then try deleting the `config.cache' file, invoking `make clean', and then starting over, specifying one of the set of environment variables for Linux that are described in the INSTALL file. The way you set an environment variable differs, depending on which shell you are using. For sh, ksh, or bash, you can just use something like export CC=gcc export CPPFLAGS=-Df2cFortran ... but you need to use a different syntax for csh or tcsh, something like setenv CC gcc setenv CPPFLAGS -Df2cFortran ... Also, if you are seeing error messages that aren't getting into the `make.log' file, maybe you need to make sure you are redirecting both standard error and standard output to the file `make.log'. Again, the way you do this depends on what shell you are using, but for sh and ksh, it's just make > make.log 2>&1 for example. --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu