2016-08-24 12:54 GMT+01:00 Andreas Tille <[email protected]>: > Hi Ghislain, > > when trying to build shark I get: > > ... > [ 42%] Building CXX object Test/CMakeFiles/Data_HDF5.dir/ > Data/HDF5Tests.cpp.o > cd /build/shark-3.1.1+ds1/obj-x86_64-linux-gnu/Test && /usr/bin/c++ > -DBOOST_ALL_DYN_LINK -DBOOST_FILESYSTEM_VERSION=3 > -DBOOST_PARAMETER_MAX_ARITY=15 -DBOOST_TEST_DYN_LINK > -I/build/shark-3.1.1+ds1/include > -I/build/shark-3.1.1+ds1/obj-x86_64-linux-gnu/include > -g -O2 -fdebug-prefix-map=/build/shark-3.1.1+ds1=. -fPIE > -fstack-protector-strong -Wformat -Werror=format-security -Wall -pedantic > -Wdate-time -D_FORTIFY_SOURCE=2 -fopenmp -o > CMakeFiles/Data_HDF5.dir/Data/HDF5Tests.cpp.o -c > /build/shark-3.1.1+ds1/Test/Data/HDF5Tests.cpp > In file included from /build/shark-3.1.1+ds1/Test/Data/HDF5Tests.cpp:3:0: > /build/shark-3.1.1+ds1/include/shark/Data/HDF5.h:48:64: fatal error: > hdf5.h: No such file or directory > #include <hdf5.h> // This must come before #include <hdf5_hl.h> > ^ > compilation terminated. > Test/CMakeFiles/Data_HDF5.dir/build.make:65: recipe for target > 'Test/CMakeFiles/Data_HDF5.dir/Data/HDF5Tests.cpp.o' failed > make[3]: *** [Test/CMakeFiles/Data_HDF5.dir/Data/HDF5Tests.cpp.o] Error 1 > make[3]: Leaving directory '/build/shark-3.1.1+ds1/obj-x86_64-linux-gnu' > CMakeFiles/Makefile2:4611: recipe for target > 'Test/CMakeFiles/Data_HDF5.dir/all' > failed > make[2]: *** [Test/CMakeFiles/Data_HDF5.dir/all] Error 2 > make[2]: Leaving directory '/build/shark-3.1.1+ds1/obj-x86_64-linux-gnu' > Makefile:163: recipe for target 'all' failed > > Kind regards > > Andreas. > > -- > http://fam-tille.de >
Hmmm, interesting and somewhat scary. It was working before, but before was with CMake v3.5.x until the 21st of August. It seems that CMake v3.5.x -> v3.6.x broke the HDF5 detection in some subtle ways. First the HDF5_INCLUDE_DIR variable does not work anymore. It is deprecated anyway, so better patch this and provide upstream. But even with this fixed, I now get linking errors, which means they really did change something else. After a little digging, it seems they have truly separated the low and high-level bindings in the CMake discovery and that HDF5_LIBRARIES should not be used blindly anymore. So if you are maintaining projects using CMake and relying on HDF5 detection, there could be some troubles ahead. I'll let you know once this is fixed. Ghis

