ess-dmsc / h5cpp

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

Does h5cpp work with libhdf5 1.10.5 ? #408

Closed jkotan closed 4 years ago

jkotan commented 5 years ago

Hi,

If anyone has tried to build h5cpp with libhdf5 1.10.5?

My college Vijay has tried to do it and he has got:


h5cpp/src/h5cpp/file/direct_driver.cpp:80:48: error: invalid static_cast from type ‘const hdf5::property::FileAccessList’ to type ‘hid_t {aka long int}’
   if(H5Pset_fapl_direct(static_cast<hid_t>(fapl),alignment_,
                                                ^
make[2]: *** [src/h5cpp/CMakeFiles/h5cpp.dir/build.make:453: src/h5cpp/CMakeFiles/h5cpp.dir/file/direct_driver.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:203: src/h5cpp/CMakeFiles/h5cpp.dir/all] Error 2
make: *** [Makefile:130: all] Error 2```
eugenwintersberger commented 5 years ago

Hi Jan. I just built h5cpp with libhdf5 1.10.4 on Debian Buster and the build works along with all tests.

eugenwintersberger commented 5 years ago

From what I see. The code which causes the failure is only built if the library was built with the direct driver enabled. This is, at least on Debian systems, usually not the case. Can you provide a bit more details about your colleges system configuration?

jkotan commented 5 years ago

He compiled h5cpp on centos7.6 (on Maxwell) with modules for: g++ 6.3, libhdf5 1.10.5

eugenwintersberger commented 5 years ago

Can you try to figure out which flags where used when building the HDF5 library?

jkotan commented 5 years ago

To build hdf5/1.10.5 :

./configure --with-szlib=/opt/hdf5/szip --enable-cxx --enable-java --enable-fortran2003 --enable-fortran --prefix=/opt/hdf5/hdf5-1.10.5