NCAR / pynio

PyNIO is a multi-format data I/O package with a NetCDF-style interface
http://www.pyngl.ucar.edu/Nio.shtml
Apache License 2.0
112 stars 37 forks source link

build of h5reader.c fails when compiling against hdf5-openmpi 1.12.0 #44

Open g-voelker opened 3 years ago

g-voelker commented 3 years ago

I have been trying to set up a package of pynio on archlinux with the following package versions:

pynio 1.5.5 python 3.9.1-2 ncl 6.6.2-1 hdf-eos2 2.20-1 hdf-eos5 1.16-2 hdf4 4.2.15-1 hdf5-openmpi 1.12.0-2

Trying to build pynio I encountered the following errors:

libsrc/h5reader.c:42:14: error: too few arguments to function ‘H5Oget_info_by_name3’
   42 |     status = H5Oget_info_by_name(fid, root_name, &oi, H5P_DEFAULT);

libsrc/h5reader.c:2491:83: error: ‘H5O_info2_t’ has no member named ‘addr’
 2491 |             if(NULL == (already_visited = _NclHDF5_addr_visited(udata->seen, oinfo.addr)))

libsrc/h5reader.c:2693:12: error: too few arguments to function ‘H5Oget_info3’
 2693 |         if(H5Oget_info(type, &oi) >= 0)

libsrc/h5reader.c:4486:8: error: too few arguments to function ‘H5Oget_info_by_name3’
 4486 |     if(H5Oget_info_by_name(fid, grp_name, &oinfo, H5P_DEFAULT) < 0)

and similar repetitions. This looks to me like a version incompatibility or a bug in pynio's h5reader.c. All of the errors point to a discrepancy to the header files associated to my hdf5 installation (with openmpi support). Has anyone else encountered this problem?

Any information on a fix would be very much appreciated.

fulminemizzega commented 2 years ago

Take a look here https://www.hdfgroup.org/downloads/hdf5/ I've managed to build the package pynio on conda-forge by adding -DH5_USE_110_API

g-voelker commented 2 years ago

Great find @fulminemizzega ! Thanks for pointing this out. That actually means that this is an out-of-date issue for a dependency of pynio as one is required to use the legacy extension of HDF 5, version 1.10 (as opposed to the now up-to-date version 1.12).