I'm trying to build 10.7.p02 with HDF5 support on a Mac running Big Sur (11.5.2); hdf5 is v1.12.1 installed via homebrew. I pass "-DGEANT4_USE_HDF5=ON" to cmake and it appears to find hdf5, the cmake output includes the following lines that mention HDF5: -- HDF5 C compiler wrapper is unable to compile a minimal HDF5 program. -- Found HDF5: /usr/local/lib/libhdf5.dylib (found suitable version "1.12.1", minimum required is "1.8") ... GEANT4_USE_HDF5: Building Geant4 analysis library with HDF5 support The first line looks worrying, but cmake at least finds HDF5. However when I then try to "make" the build halts at: [ 27%] Built target G4digits_hits source/CMakeFiles/G4analysis.dir/build.make:1232: *** target pattern contains no `%'. Stop. Line 1232 of source/CMakeFiles/G4analysis.dir/build.make reads: BuildProducts/lib/libG4analysis.dylib: Geant4::HDF5-NOTFOUND This conflicts with cmake claiming it found HDF5 just fine. It looks like something in cmake is broken.
Created attachment 731 [details] Patch to fix issues with HDF5 variables/targets Applying this to the 10.7.2 source tree should fix the problem. Note that I was unable to reproduce on a Catalina system with Homebrew-ed HDF5 1.12.1 and CMake 3.21.2, but we have seen the issue on Linux. This is already fixed on the master and patches branches, so will be in release 11.0.0 and 10.7.3 this December.
Thank you -- with the patch, Geant4 now compiles for me.