[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #HWN-721444]: installing netcdf4

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.


  • Subject: [netCDF #HWN-721444]: installing netcdf4
  • Date: Wed, 04 Feb 2015 21:56:21 -0700

Hi Raul,

> I have zlib and HDF5 installed. Then, within the netcdf source file, I run:
> 
> raul@raul-ubuntu:~/Downloads/netcdf-4.0$ LDFLAGS=-L/usr/local/lib
> CPPFLAGS=-I/usr/local/include ./configure --enable-netcdf-4 --enable-dap
> --enable-shared --prefix=/usr/local --with-hdf5=/usr/local
> --with-zlib=/usr/local
> 
> which seems to finish normally. However, after running make I get:
> 
> libtool: compile:  cc -DHAVE_CONFIG_H -I. -I.. -I../fortran -I../libsrc
> -I/usr/local/include -I/usr/local/include -I/usr/local/include -g -O2 -MT
> nc4hdf.lo -MD -MP -MF .deps/nc4hdf.Tpo -c nc4hdf.c -o nc4hdf.o >/dev/null
> 2>&1
> make[1]: *** No rule to make target `../libnc-dap/libnc-dap.la', needed by `
> libnetcdf.la'.  Stop.
> make[1]: Leaving directory `/home/raul/Downloads/netcdf-4.0/libsrc4'
> make: *** [check-recursive] Error 1
> raul@raul-ubuntu:~/Downloads/netcdf-4.0$

First, if you are trying to build netCDF version 4.0 (an old version from June 
2008)
from source, please start with a newer version, such as the current release of
netCDF-C, version 4.3.2. Many problems have been fixed since netCDF 4.0, 
including
bug, portability problems, and performance problems.

Also, if you can use a prebuilt version of netCDF for Ubuntu, you can get it 
from
Ubuntu package management sites and save yourself the trouble of building from
source.

Otherwise, the instructions for building the netCDF-C library, either using 
configure 
or cmake, are here:

  http://www.unidata.ucar.edu/netcdf/docs/getting_and_building_netcdf.html

You can still use the HDF5 and zlib you have installed in /usr/local/, assuming
they are recent enough. If you have problems with a recent netCDF source
distribution, please send the config.log file produced by running configure
(or the output from running cmake), so we can diagnose the problem.

Thanks!

--Russ

Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: HWN-721444
Department: Support netCDF
Priority: Normal
Status: Closed