Open jbensabat opened 5 months ago
What version are you using? Can you tell us exactly which CMake install you're using? If you have any logs, could you possibly include those as well? Thank you!
Good morning I am using the archive CMake-hdf5-1.14.3.zip downloaded from https://www.hdfgroup.org/downloads/hdf5/source-code/
when you expand the archive you have the following tree structure
there you see two archives: LIBAEC.tar.gz and ZLib.tar.gz. it is said that by the default the batch build-vs2022-64 for example, build the lib with zlib support. As is it will not happen. I digged into the cmakefiles and I found out that in the following file: C:\software\CMake-hdf5-1.14.3\hdf5-1.14.3\config\cmake\cacheinit.cmake
#
#
#
#########################
#########################
set (CMAKE_INSTALL_FRAMEWORK_PREFIX "Library/Frameworks" CACHE STRING "Frameworks installation directory" FORCE)
set (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE)
set (HDF_PACKAGE_NAMESPACE "hdf5::" CACHE STRING "Name for HDF package namespace (can be empty)" FORCE)
set (HDF5_BUILD_CPP_LIB ON CACHE BOOL "Build C++ support" FORCE)
set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE)
set (HDF5_BUILD_JAVA ON CACHE BOOL "Build JAVA support" FORCE)
set (HDF5_INSTALL_MOD_FORTRAN "NO" CACHE STRING "Copy FORTRAN mod files to include directory (NO SHARED STATIC)" FORCE) set_property (CACHE HDF5_INSTALL_MOD_FORTRAN PROPERTY STRINGS NO SHARED STATIC)
set (HDF5_BUILD_GENERATORS ON CACHE BOOL "Build Test Generators" FORCE)
set (MPIEXEC_MAX_NUMPROCS "4" CACHE STRING "Minimum number of processes for HDF parallel tests" FORCE)
set (HDF5_ENABLE_ALL_WARNINGS ON CACHE BOOL "Enable all warnings" FORCE)
set (HDF_TEST_EXPRESS "2" CACHE STRING "Control testing framework (0-3)" FORCE)
set (HDF5_MINGW_STATIC_GCC_LIBS ON CACHE BOOL "Statically link libgcc/libstdc++" FORCE)
set (HDF5_ALLOW_EXTERNAL_SUPPORT "TGZ" CACHE STRING "Allow External Library Building (NO GIT TGZ)" FORCE) set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT TGZ)
########################
######################## set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE) set (ZLIB_TGZ_NAME "zlib-1.3.tar.gz" CACHE STRING "Use HDF5_ZLib from compressed file" FORCE) set (ZLIB_TGZ_ORIGPATH "https://github.com/madler/zlib/releases/download/v1.3" CACHE STRING "Use ZLIB from original location" FORCE) set (ZLIB_USE_LOCALCONTENT ON CACHE BOOL "Use local file for ZLIB FetchContent" FORCE)
set (LIBAEC_PACKAGE_NAME "libaec" CACHE STRING "Name of AEC SZIP package" FORCE) set (LIBAEC_TGZ_NAME "libaec-1.0.6.tar.gz" CACHE STRING "Use SZip AEC from compressed file" FORCE) set (LIBAEC_TGZ_ORIGPATH "https://github.com/MathisRosenhauer/libaec/releases/download/v1.0.6" CACHE STRING "Use LIBAEC from original location" FORCE) set (LIBAEC_USE_LOCALCONTENT ON CACHE BOOL "Use local file for LIBAEC FetchContent" FORCE)
the name of zlib and libaec archives are different "zlib-1.3.tar.gz" and "libaec-1.0.6.tar.gz" do not match with the names of the supplied archives. The build will complete with no errors and or warning and there will be no support for these libs. also the HDF5Options.cmake does not seem to have any impact on the bulid. Prior to understanding the reason of the problem, I tried to supply a zlib path as this can be done in this file, but this is ignored. In fact none of the options in HDF5Option.cmake is taken into consideration.
best jac
Yes, I see the issue - we obviously missed updating that CMake source package. Note that we are dropping that package approach to use Github more.
hi thanks what I do not understand is why the hDF5ptions.cmake is not taken into consideration
HDF5Options file should overwrite the names - because I usually overwrite a lot of variables during testing. Make sure the option name matches the cacheinit file or change cacheinit to match the names.
I appreciate your efforts on HDF. I have been trying and failing miserably to get the cmake installation to work. The directions are quite long and confusing and nothing seems to work. Please find a simpler way to address this.
The find_package fails despite the packages being in the LD_LIBRAY_PATH and explicitly providing paths.
Hello I posted a question regarding a problem building hdf5 with zlib using the cmake installation I solved the problem and I hope it can be of some help. There is a bug in the installation. in the hdfXXXX directory there are two archives libaec.tar.gz and zlib.tar.gz During the installation, cmake looks for the files libaec-1.XXX.tar.gz and zlib-XXX.tar.gz (cacheinit.cmake in the config directory). due to the mismatch between the files names the installation goes on without any error or warning message but does not build with zlib. I solved the problem by changing the names of the archives so there are identical to the ones in the cacheinit.cmake file best jac
Describe the bug A clear and concise description of what the bug is.
Expected behavior A clear and concise description of what you expected to happen.
Platform (please complete the following information)
Additional context Add any other context about the problem here.