ess-dmsc / h5cpp

C++ wrapper for the HDF5 C-library
https://ess-dmsc.github.io/h5cpp/
GNU Lesser General Public License v2.1
118 stars 19 forks source link

h5cpp does not compile with hdf5 >= 1.13 #621

Closed jkotan closed 1 year ago

jkotan commented 1 year ago

Starting from hdf5 1.13.0 hsize_t was changed from long long unsigned int to uint64_t therefore we can see

[ 22%] Building CXX object src/h5cpp/CMakeFiles/h5cpp.dir/node/dataset.cpp.o
[ 22%] Building CXX object src/h5cpp/CMakeFiles/h5cpp.dir/node/functions.cpp.o
/__w/h5cpp/h5cpp/src/h5cpp/node/dataset.cpp: In member function 'long long unsigned int hdf5::node::Dataset::chunk_storage_size(std::vector<long long unsigned int>) const':
/__w/h5cpp/h5cpp/src/h5cpp/node/dataset.cpp:199:43: error: invalid conversion from 'long long unsigned int*' to 'const hsize_t*' {aka 'const long unsigned int*'} [-fpermissive]
  199 |                                offset.data(),
      |                                ~~~~~~~~~~~^~
      |                                           |
      |                                           long long unsigned int*
In file included from /github/home/.conan2/p/hdf5a21fda4faa24a/p/include/hdf5/hdf5.h:24,
                 from /__w/h5cpp/h5cpp/src/h5cpp/core/hdf5_capi.hpp:44,
                 from /__w/h5cpp/h5cpp/src/h5cpp/core/object_handle.hpp:30,
                 from /__w/h5cpp/h5cpp/src/h5cpp/node/node.hpp:28,
                 from /__w/h5cpp/h5cpp/src/h5cpp/node/dataset.hpp:30,
                 from /__w/h5cpp/h5cpp/src/h5cpp/node/dataset.cpp:32:
/github/home/.conan2/p/hdf5a21fda4faa24a/p/include/hdf5/H5Dpublic.h:606:71: note:   initializing argument 2 of 'herr_t H5Dget_chunk_storage_size(hid_t, const hsize_t*, hsize_t*)'
  606 | H5_DLL herr_t H5Dget_chunk_storage_size(hid_t dset_id, const hsize_t *offset, hsize_t *chunk_bytes);
      |                                                        ~~~~~~~~~~~~~~~^~~~~~
/__w/h5cpp/h5cpp/src/h5cpp/node/dataset.cpp:200:32: error: invalid conversion from 'long long unsigned int*' to 'hsize_t*' {aka 'long unsigned int*'} [-fpermissive]
  200 |                                &storage_size)<0)
      |                                ^~~~~~~~~~~~~
      |                                |
      |                                long long unsigned int*
In file included from /github/home/.conan2/p/hdf5a21fda4faa24a/p/include/hdf5/hdf5.h:24,
                 from /__w/h5cpp/h5cpp/src/h5cpp/core/hdf5_capi.hpp:44,
                 from /__w/h5cpp/h5cpp/src/h5cpp/core/object_handle.hpp:30,
                 from /__w/h5cpp/h5cpp/src/h5cpp/node/node.hpp:28,
                 from /__w/h5cpp/h5cpp/src/h5cpp/node/dataset.hpp:30,
                 from /__w/h5cpp/h5cpp/src/h5cpp/node/dataset.cpp:32:
/github/home/.conan2/p/hdf5a21fda4faa24a/p/include/hdf5/H5Dpublic.h:606:88: note:   initializing argument 3 of 'herr_t H5Dget_chunk_storage_size(hid_t, const hsize_t*, hsize_t*)'
  606 | H5_DLL herr_t H5Dget_chunk_storage_size(hid_t dset_id, const hsize_t *offset, hsize_t *chunk_bytes);
      |                                                                               ~~~~~~~~~^~~~~~~~~~~
src/h5cpp/CMakeFiles/h5cpp.dir/build.make:647: recipe for target 'src/h5cpp/CMakeFiles/h5cpp.dir/node/dataset.cpp.o' failed
make[2]: *** [src/h5cpp/CMakeFiles/h5cpp.dir/node/dataset.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:173: recipe for target 'src/h5cpp/CMakeFiles/h5cpp.dir/all' failed
make[1]: *** [src/h5cpp/CMakeFiles/h5cpp.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2