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

[netCDF #ZYQ-786138]: netcdf4 - hdf5-zip



Hi Katharina,

> I like to use netcdf with hdf5 and zip
> I do not know if I need zlib-1.2.3 too?
> I use an Ubuntu computer

You do need some version of zlib to use netcdf with hdf5, because zlib
is the default compression library for compressing data chunks.  It
doesn't have to be zlib-1.2.3, more recent versions up to zlib-1.2.8
are currently available, and all will work with hdf5 and netcdf4.  If
zlib is already installed in a standard place on your system, such as
/usr/lib/libz.a or /usr/lib/libz.so, the configure script will find
it.

The szip library is not needed, unless you know that you will need to
read data that has been compressed with szip, such as hdf5 data that
is not netcdf-4 data.  NetCDF-4 can only read szip-compressed data,
but will not encode and write such data due to software licensing
issues.  We may add a free software plugin for writing and reading
szip-compressed data in the future, but currently there is no support
for that.

> I did:
> cd szip-2.1/
> sudo ./configure --prefix=/home/ed/local
> sudo make check install

The directory "/home/ed/local" used in the installation documentation
was just an example directory of a programmer named "Ed", who wrote
that documentation.  It should not be used unless you are also named
"Ed" and want to install the netCDF libraries there.  The default
directory prefix, "/usr/local", is usually more appropriate if several
users will be making use of the library on your system.  If you're the
only one using it, you could certainly install it in a private
directory, such as "/home/kat/netcdf".

Also, using "sudo" for anything but the final "make install" step is
not recommended, because in many Unix systems, values of environment
variables such as CPFLAGS, LDFLAGS, and LD_LIBRARY_PATH are not passed
into the sudo environment, for security.  We recommend just doing
"make check" as an ordinary user and only using sudo for "sudo make
install".

Also, if you are installing in a private directory in which you have
write permissions, there is no need to use sudo at all, even with
"make install".

> cd ../hdf5-1.8.8/
> sudo ./configure --with-szlib=/home/ed/local --prefix=/home/ed/local
> sudo make check install
> cd ../netcdf-4.2/
> sudo CPPFLAGS=-I/home/ed/local/include LDFLAGS=-L/home/ed/local/lib
> ./configure --prefix=/home/ed/loca

On your Ubuntu system, sudo probably doesn't pass the environment
veriables to the configure script, but you can also pass these as
configure arguments instead by using something like:

  ./configure CPPFLAGS=-I/home/ed/local/include LDFLAGS=-L/home/ed/local/lib 
--prefix=/home/ed/local

that would even work with sudo.  But as noted above, it's better to
only use sudo for "make install" if you're installing in a directory
where you don't have write permissions.

If you still have problems, send us the config.log and the full output
from the make command in which the error occurs.

--Russ

> ake[2]: *** [check-TESTS] Fehler 1
> make[2]: Verlasse Verzeichnis
> '/home/katharina/Downloads/libs4cdo-0.0.10/netcdf-4.2/nc_test4'
> make[1]: *** [check-am] Fehler 2
> make[1]: Verlasse Verzeichnis
> '/home/katharina/Downloads/libs4cdo-0.0.10/netcdf-4.2/nc_test4'
> make: *** [check-recursive] Fehler 1
> 
> 
> Thank you for your help
> Katharina Bülow
> address@hidden
> 
> 
Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: ZYQ-786138
Department: Support netCDF
Priority: Normal
Status: Closed