tbeu / matio

MATLAB MAT File I/O Library
https://matio.sourceforge.io
BSD 2-Clause "Simplified" License
330 stars 97 forks source link

Failing CMake build with HDF5 1.10.9 on Travis CI #193

Closed tbeu closed 1 year ago

tbeu commented 1 year ago

After enabling Travis CI again, the CMake build with HDF5 1.10.9 fails: https://app.travis-ci.com/github/tbeu/matio/jobs/584041829#L777

This is the corresponding configuration:

https://github.com/tbeu/matio/blob/5dcaccc19d2c79348ce5a86ea97875787dddc546/.travis.yml#L159-L166

@MaartenBent @nim65s could you please have a look at it? Thank you!

MaartenBent commented 1 year ago

Looks like the location of the CMake files inside the HDF5 package has changed. Older versions used CMake-hdf5-1.10.8/HDF5-1.10.8-Linux/HDF_Group/HDF5/1.10.8/share/cmake For new versions it is located in CMake-hdf5-1.10.9/HDF5-1.10.9-Linux/HDF_Group/HDF5/1.10.9/cmake

Probably got broken when HDF5 was updated to 1.10.9. Removing share in this path should fix it. https://github.com/tbeu/matio/blob/5dcaccc19d2c79348ce5a86ea97875787dddc546/.ci/travis_before_script.sh#L26

If you want to keep support for older HDF5 versions in the ci scripts, you can also add two paths to CMAKE_PREFIX_PATH (" seems to be required): CMAKE_PREFIX_PATH=-DCMAKE_PREFIX_PATH=\"$HDF5_DIR/share/cmake;$HDF5_DIR/cmake\"

tbeu commented 1 year ago

Thank you for figuring it out. Fixed by 2f7c9cc. Only your first proposal worked out though.