Project

General

Profile

compiling cdo 2.4.2

Added by Manfred Schwarb 6 months ago

I tried to compile cdo 2.4.2 and got the following error:


[   41s] cdf_write.c:28:7: error: unknown type name 'NC_H5_Filterspec

seems my netcdf library (4.7.4) is too old. This is however not documented nor caught in
configure:


[   31s] checking for netcdf.h... yes
[   31s] checking for netcdf_meta.h... yes
[   31s] checking for library containing nc_open... -lnetcdf
[   31s] checking for nc-config... nc-config
[   31s] checking netcdf's OpenDAP support... yes
[   31s] checking netcdf's nc2 support... yes
[   31s] checking netcdf's nc4 support... yes
[   31s] checking netcdf's nc4/hdf5 support... yes
...
[   32s] checking for netcdf.h... (cached) yes
[   32s] checking for library containing nc_open... (cached) -lnetcdf
[   32s] checking for nc-config... (cached) nc-config
[   32s] checking netcdf's OpenDAP support... yes
[   32s] checking netcdf's Zarr support... no
[   32s] checking netcdf's nc2 support... yes
[   32s] checking netcdf's nc4 support... yes
[   32s] checking netcdf's nc4/hdf5 support... yes
[   32s] checking netcdf's nc4/szlib support... no

Could you either document and catch this, or, even better,
add some compat code to support older netcdf libraries?
Version 2.4.1 compiled fine in my environment.

Thanks!


Replies (3)

RE: compiling cdo 2.4.2 - Added by Ralf Mueller 6 months ago

hi Manfred!

thx for the report. I will try to reproduce this. can u provide more information about the underlying hdf5 version and how your netcdf installation is configured, please?

the output of nc-config --all would be a good start

cheers
ralf

RE: compiling cdo 2.4.2 - Added by Manfred Schwarb 6 months ago

This is a default openSUSE 15.6 installation, which has
netcdf 4.7.4 and hdf5 1.10.8

used configure command for cdo is


./configure --host=x86_64-suse-linux-gnu --build=x86_64-suse-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/lib --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --disable-dependency-tracking --with-netcdf --with-proj --with-zlib --with-hdf5 --with-curl --enable-grib --with-eccodes --with-szlib --with-magics --with-libxml2 --with-udunits2 LOGNAME=abuild HOST=OBS


nc-config --all

This netCDF 4.7.4 has been built with the following features:

  --cc            -> gcc
  --cflags        -> -I/usr/include
  --libs          -> -L/usr/lib64 -lnetcdf
  --static        -> -lhdf5_hl -lhdf5 -lm -lz -lcurl

  --has-c++       -> no
  --cxx           ->

  --has-c++4      -> no
  --cxx4          ->

  --has-fortran   -> no
  --has-dap       -> yes
  --has-dap2      -> yes
  --has-dap4      -> yes
  --has-nc2       -> yes
  --has-nc4       -> yes
  --has-hdf5      -> yes
  --has-hdf4      -> no
  --has-logging   -> no
  --has-pnetcdf   -> no
  --has-szlib     -> no
  --has-cdf5      -> yes
  --has-parallel4 -> no
  --has-parallel  -> no

  --prefix        -> /usr
  --includedir    -> /usr/include
  --libdir        -> /usr/lib64
  --version       -> netCDF 4.7.4

RE: compiling cdo 2.4.2 - Added by Uwe Schulzweida 6 months ago

CDO uses the NetCDF 4.8 function NC_H5_Filterspec(). Unfortunately, this was not tested correctly. We will fix this problem in the next CDO release!

    (1-3/3)