I am trying to compile HDF5-1.14.6 with Intel 2024, but I still get issues with the ZLIB and libaec dependencies.
The idea would be to link them statically, so that I can link statically all the HDF5 dependency in my simulation code.
I am trying to compile with this configuration
cmake
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_C_COMPILER=mpiicx -DCMAKE_CXX_COMPILER=mpiicpx -DCMAKE_Fortran_COMPILER=mpiifort
-DHDF5_ENABLE_PARALLEL=ON
-DCMAKE_INSTALL_PREFIX=~/hdf5-1.14.6-intel-parallel
-DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING="GIT"
-DSZIP_USE_EXTERNAL=ON -DHDF5_USE_LIBAEC_STATIC=ON -DLIBAEC_GIT_URL:STRING="https://github.com/MathisRosenhauer/libaec" -DLIBAEC_GIT_BRANCH="v1.1.3"
-DZLIB_USE_EXTERNAL=ON -DHDF5_USE_ZLIB_STATIC=ON -DZLIB_GIT_URL:STRING="https://github.com/madler/zlib" -DZLIB_GIT_BRANCH="v1.3.1"
..
I was expecting that this configuration would allow parallel build with automatic download of the ZLIB and libaec dependencies.
Unfortunately, it seems that the CMake options are not working as expected, since I am getting these errors.
-- Renaming
-- [...]/hdf5/build/_deps/hdf5_zlib-src/zconf.h
-- to 'zconf.h.included' because this file is included with zlib
-- but CMake generates it automatically in the build directory.
CMake Error at config/cmake/HDFLibMacros.cmake:40 (add_library):
add_library cannot create ALIAS target "zlib-static" because another target
with the same name already exists.
Call Stack (most recent call first):
CMakeFilters.cmake:140 (EXTERNAL_ZLIB_LIBRARY)
CMakeLists.txt:921 (include)
CMake Warning at CMakeFilters.cmake:163 (message):
ZLib support in HDF5 was enabled but not found
Call Stack (most recent call first):
CMakeLists.txt:921 (include)
-- Performing Test HAVE_DECL___BUILTIN_CLZLL
-- Performing Test HAVE_DECL___BUILTIN_CLZLL - Success
-- Looking for snprintf
-- Looking for snprintf - found
-- Final: share
CMake Error at config/cmake/HDFLibMacros.cmake:78 (add_library):
add_library cannot create ALIAS target "szaec-static" because another
target with the same name already exists.
Call Stack (most recent call first):
CMakeFilters.cmake:200 (EXTERNAL_SZIP_LIBRARY)
CMakeLists.txt:921 (include)
CMake Warning at CMakeFilters.cmake:221 (message):
SZIP support in HDF5 was enabled but not found
Call Stack (most recent call first):
CMakeLists.txt:921 (include)
Do you have any suggestion on how to fix? Are there any correction to be made on th CMake configuration and/or definition?
Thank you!