Hi Christian, > I'm working in the DRIHM project (www.drihm.eu), where we need netCDF > for several tools. > > Unfortunately, none of the regular installation types works: > > 1) using a package manager > apt-get install libnetcdf6 netcdf-bin netcdf-dbg netcdf-doc > Installs netCDF, but some files, for instance "netcdf.inc", are missing. > Those files are necessary for our tools "netcdf.inc" is part of the netcdf-fortran release, which is a separate and distinct release from the netCDF C software release. If you are building from source, you would first get, build, and install the netCDF C release, then if you also needed the netCDF Fortran library, you would get that source distribution (which depends on the C netCDF library), configure it to specify where the netCDF C library is installed, and build and install it. The instructions for this two-step process are here: http://www.unidata.ucar.edu/netcdf/docs/ http://www.unidata.ucar.edu/netcdf/docs/building.html http://www.unidata.ucar.edu/netcdf/docs/netcdf-fortran-install.html Some of the package managers that offer the latest netCDF software release for C libraries also offer a separate netcdf-fortran release for the Fortran libraries. > 2) manual installation > cd /usr/local > wget http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-4.2.1.1.tar.gz > tar xfvz netcdf-4.2.1.1.tar.gz > mv netcdf-4.2.1.1 netcdf > cd netcdf > ./configure --prefix=/usr/local/netcdf --disable-netcdf-4 > make check install > > A lot of tests pass, but three tests do not pass: > make[2]: *** [install-includeHEADERS] Error 1 > make[2]: Leaving directory `/usr/local/netcdf/include' > make[1]: *** [install-am] Error 2 > make[1]: Leaving directory `/usr/local/netcdf/include' > make: *** [install-recursive] Error 1 > > Is that a problem? "Error 1" is not a very verbose output... This problem may be a symptom of specifying the installation prefix (/usr/local/netcdf) to the same directory where you are trying to build and test the netcdf software. Those have to be separate directories, although the installation documentation doesn't make that clear. If they are the same, source files get overwritten by installed files, and you get inscrutable error messages from make, such as the above. Thanks for pointing out this problem. We need to add a test that prevents using the source directory as the installation directory. I've made this a Jira ticket, in case you want to follow progress on the fix for the problem: https://www.unidata.ucar.edu/jira/browse/NCF-215 > Additionally, I want to install netCDF Fortran libraries. In the > documentation, there is this sentence: "to link Fortran software with the > installed Fortran library, You could also use the "nf-config" utility > installed in {DIR1}/bin." but this binary is not located in the bin > directory. Instead, it is located in /usr/local/netcdf?! That sounds like another symptom of specifying the installation location as the same directory in which the source for building the libraries is located. Also, "nf-config" is part of the netcdf-fortran software, so would not be installed by the netCDF C release. > So how can I install the netCDF libraries to work with them? It sounds like it would be best to build from source if the package management system you are using hasn't been updated to recognize that the C and Fortran distributions are separate software releases. I hope the URLs above can help make it clear how to build and install the software from source. --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: ESN-802630 Department: Support netCDF Priority: Normal Status: Closed
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.