From 5b42956f9479753f746b6aa55a1bb6c61fe17ef3 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 7 Nov 2024 16:14:59 -0600 Subject: [PATCH 01/16] Rework compression lib search to match documented process --- CMakeFilters.cmake | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake index 7bf152aa357..569615d1300 100644 --- a/CMakeFilters.cmake +++ b/CMakeFilters.cmake @@ -77,6 +77,12 @@ endif () # Option for ZLib support #----------------------------------------------------------------------------- set(H5_ZLIB_FOUND FALSE) +if(NOT DEFINED ZLIB_PACKAGE_NAME) + set(ZLIB_PACKAGE_NAME "zlib") +endif () +if(NOT DEFINED ZLIBNG_PACKAGE_NAME) + set(ZLIBNG_PACKAGE_NAME "zlib-ng") +endif () option (HDF5_ENABLE_ZLIB_SUPPORT "Enable Zlib Filters" ON) if (HDF5_ENABLE_ZLIB_SUPPORT) if (NOT H5_ZLIB_HEADER) @@ -92,7 +98,8 @@ if (HDF5_ENABLE_ZLIB_SUPPORT) else () set(ZLIB_SEACH_TYPE shared) endif () - find_package (ZLIB NAMES ${PACKAGE_NAME} COMPONENTS ${ZLIB_SEACH_TYPE}) + # Search pure Config mode first + find_package (ZLIB NAMES ${PACKAGE_NAME} OPTIONAL_COMPONENTS ${ZLIB_SEACH_TYPE}) if (NOT ZLIB_FOUND) if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0") set(ZLIB_USE_STATIC_LIBS ${HDF5_USE_ZLIB_STATIC}) @@ -140,7 +147,7 @@ if (HDF5_ENABLE_ZLIB_SUPPORT) message (VERBOSE "Filter HDF5_ZLIB is ON") else () set (HDF5_ENABLE_ZLIB_SUPPORT OFF CACHE BOOL "" FORCE) - message (WARNING " ZLib support in HDF5 was enabled but not found") + message (FATAL_ERROR " ZLib support in HDF5 was enabled but not found") endif () message(STATUS "H5_ZLIB_HEADER=${H5_ZLIB_HEADER}") endif () @@ -149,6 +156,9 @@ endif () # Option for SzLib support #----------------------------------------------------------------------------- set(H5_SZIP_FOUND FALSE) +if(NOT DEFINED LIBAEC_PACKAGE_NAME) + set(LIBAEC_PACKAGE_NAME "libaec") +endif () option (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" ON) if (HDF5_ENABLE_SZIP_SUPPORT) option (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" ON) @@ -160,9 +170,10 @@ if (HDF5_ENABLE_SZIP_SUPPORT) endif () set(libaec_USE_STATIC_LIBS ${HDF5_USE_LIBAEC_STATIC}) set(SZIP_FOUND FALSE) - find_package (SZIP NAMES ${LIBAEC_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS ${LIBAEC_SEARCH_TYPE}) + # Search pure Config mode first + find_package (SZIP NAMES ${LIBAEC_PACKAGE_NAME}${HDF_PACKAGE_EXT} OPTIONAL_COMPONENTS ${LIBAEC_SEARCH_TYPE}) if (NOT SZIP_FOUND) - find_package (SZIP) # Legacy find + find_package (${LIBAEC_PACKAGE_NAME}) endif () set(H5_SZIP_FOUND ${SZIP_FOUND}) if (H5_SZIP_FOUND) @@ -193,6 +204,6 @@ if (HDF5_ENABLE_SZIP_SUPPORT) endif () else () set (HDF5_ENABLE_SZIP_SUPPORT OFF CACHE BOOL "" FORCE) - message (WARNING "SZIP support in HDF5 was enabled but not found") + message (FATAL_ERROR "SZIP support in HDF5 was enabled but not found") endif () endif () From 37feafbc5dfb20dba1e76890b12a5459027aa9ac Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 7 Nov 2024 16:29:44 -0600 Subject: [PATCH 02/16] Revert for legacy szip --- CMakeFilters.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake index 569615d1300..226a7cacd8a 100644 --- a/CMakeFilters.cmake +++ b/CMakeFilters.cmake @@ -173,7 +173,7 @@ if (HDF5_ENABLE_SZIP_SUPPORT) # Search pure Config mode first find_package (SZIP NAMES ${LIBAEC_PACKAGE_NAME}${HDF_PACKAGE_EXT} OPTIONAL_COMPONENTS ${LIBAEC_SEARCH_TYPE}) if (NOT SZIP_FOUND) - find_package (${LIBAEC_PACKAGE_NAME}) + find_package (SZIP) # Legacy find endif () set(H5_SZIP_FOUND ${SZIP_FOUND}) if (H5_SZIP_FOUND) From 18af7243987a809b2908fa029a4bee09580a0539 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 7 Nov 2024 16:34:00 -0600 Subject: [PATCH 03/16] Return the legacy find module --- CMakeFilters.cmake | 2 +- config/cmake/FindSZIP.cmake | 127 ++++++++++++++++++++++++++++++++++++ 2 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 config/cmake/FindSZIP.cmake diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake index 226a7cacd8a..cd6535a8adf 100644 --- a/CMakeFilters.cmake +++ b/CMakeFilters.cmake @@ -173,7 +173,7 @@ if (HDF5_ENABLE_SZIP_SUPPORT) # Search pure Config mode first find_package (SZIP NAMES ${LIBAEC_PACKAGE_NAME}${HDF_PACKAGE_EXT} OPTIONAL_COMPONENTS ${LIBAEC_SEARCH_TYPE}) if (NOT SZIP_FOUND) - find_package (SZIP) # Legacy find + find_package (SZIP) # Legacy find which requires the legacy find module endif () set(H5_SZIP_FOUND ${SZIP_FOUND}) if (H5_SZIP_FOUND) diff --git a/config/cmake/FindSZIP.cmake b/config/cmake/FindSZIP.cmake new file mode 100644 index 00000000000..170c8c145b0 --- /dev/null +++ b/config/cmake/FindSZIP.cmake @@ -0,0 +1,127 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://www.hdfgroup.org/licenses. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# +######################################################################### + +# - Derived from the FindTiff.cmake and FindJPEG.cmake that is included with cmake +# FindSZIP + +# Find the legacy SZIP includes and library + +# Imported targets +################## + +# This module defines the following :prop_tgt:`IMPORTED` targets: +# +# SZIP::SZIP +# The SZIP library, if found. +# +# Result variables +################### + +# This module will set the following variables in your project: + +# SZIP_FOUND, true if the SZIP headers and libraries were found. +# SZIP_INCLUDE_DIR, the directory containing the SZIP headers. +# SZIP_INCLUDE_DIRS, the directory containing the SZIP headers. +# SZIP_LIBRARIES, libraries to link against to use SZIP. + +# Cache variables +################# + +# The following variables may also be set: + +# SZIP_LIBRARY, where to find the SZIP library. +# SZIP_LIBRARY_DEBUG - Debug version of SZIP library +# SZIP_LIBRARY_RELEASE - Release Version of SZIP library + +# message (STATUS "Finding SZIP library and headers..." ) +######################################################################### + + +find_path(SZIP_INCLUDE_DIR szlib.h) + +set(szip_names ${SZIP_NAMES} sz szip szip-static libsz libszip libszip-static) +foreach(name ${szip_names}) + list (APPEND szip_names_debug "${name}d") +endforeach() + +if(NOT SZIP_LIBRARY) + find_library(SZIP_LIBRARY_RELEASE NAMES ${szip_names}) + find_library(SZIP_LIBRARY_DEBUG NAMES ${szip_names_debug}) + include(SelectLibraryConfigurations) + select_library_configurations(SZIP) + mark_as_advanced(SZIP_LIBRARY_RELEASE SZIP_LIBRARY_DEBUG) +endif() +unset(szip_names) +unset(szip_names_debug) + +if(SZIP_INCLUDE_DIR AND EXISTS "${SZIP_INCLUDE_DIR}/SZconfig.h") + file(STRINGS "${SZIP_INCLUDE_DIR}/SZconfig.h" szip_version_str + REGEX "^#define[\t ]+SZIP_PACKAGE_VERSION[\t ]+.*") + + string(REGEX REPLACE "^#define[\t ]+SZIP_PACKAGE_VERSION[\t ]+([0-9]+).*" + "\\1" SZIP_VERSION "${szip_version_str}") + unset(szip_version_str) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(SZIP + REQUIRED_VARS SZIP_LIBRARY SZIP_INCLUDE_DIR + VERSION_VAR SZIP_VERSION) + +if(SZIP_FOUND) + set(SZIP_LIBRARIES ${SZIP_LIBRARY}) + set(SZIP_INCLUDE_DIRS "${SZIP_INCLUDE_DIR}") + + if(NOT TARGET SZIP::SZIP) + add_library(SZIP::SZIP UNKNOWN IMPORTED) + if(SZIP_INCLUDE_DIRS) + set_target_properties(SZIP::SZIP PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${SZIP_INCLUDE_DIRS}") + endif() + if(EXISTS "${SZIP_LIBRARY}") + set_target_properties(SZIP::SZIP PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${SZIP_LIBRARY}") + endif() + if(EXISTS "${SZIP_LIBRARY_RELEASE}") + set_property(TARGET SZIP::SZIP APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(SZIP::SZIP PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C" + IMPORTED_LOCATION_RELEASE "${SZIP_LIBRARY_RELEASE}") + endif() + if(EXISTS "${SZIP_LIBRARY_DEBUG}") + set_property(TARGET SZIP::SZIP APPEND PROPERTY + IMPORTED_CONFIGURATIONS DEBUG) + set_target_properties(SZIP::SZIP PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C" + IMPORTED_LOCATION_DEBUG "${SZIP_LIBRARY_DEBUG}") + endif() + endif() +endif() + +mark_as_advanced(SZIP_LIBRARY SZIP_INCLUDE_DIR) + +# Report the results. +if (NOT SZIP_FOUND) + set (SZIP_DIR_MESSAGE + "SZip was not found. Make sure SZIP_LIBRARY and SZIP_INCLUDE_DIR are set or set the SZIP_INSTALL environment variable." + ) + if (NOT SZIP_FIND_QUIETLY) + message (VERBOSE "${SZIP_DIR_MESSAGE}") + else () + if (SZIP_FIND_REQUIRED) + message (FATAL_ERROR "SZip was NOT found and is Required by this project") + endif () + endif () +endif () From 3433678228b425c1c9619893480b27d461dc9f58 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 7 Nov 2024 16:35:07 -0600 Subject: [PATCH 04/16] Remove the entire legacy SZIP find --- CMakeFilters.cmake | 3 - config/cmake/FindSZIP.cmake | 127 ------------------------------------ 2 files changed, 130 deletions(-) delete mode 100644 config/cmake/FindSZIP.cmake diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake index cd6535a8adf..64bc289a3b2 100644 --- a/CMakeFilters.cmake +++ b/CMakeFilters.cmake @@ -172,9 +172,6 @@ if (HDF5_ENABLE_SZIP_SUPPORT) set(SZIP_FOUND FALSE) # Search pure Config mode first find_package (SZIP NAMES ${LIBAEC_PACKAGE_NAME}${HDF_PACKAGE_EXT} OPTIONAL_COMPONENTS ${LIBAEC_SEARCH_TYPE}) - if (NOT SZIP_FOUND) - find_package (SZIP) # Legacy find which requires the legacy find module - endif () set(H5_SZIP_FOUND ${SZIP_FOUND}) if (H5_SZIP_FOUND) set (H5_SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR}) diff --git a/config/cmake/FindSZIP.cmake b/config/cmake/FindSZIP.cmake deleted file mode 100644 index 170c8c145b0..00000000000 --- a/config/cmake/FindSZIP.cmake +++ /dev/null @@ -1,127 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -######################################################################### - -# - Derived from the FindTiff.cmake and FindJPEG.cmake that is included with cmake -# FindSZIP - -# Find the legacy SZIP includes and library - -# Imported targets -################## - -# This module defines the following :prop_tgt:`IMPORTED` targets: -# -# SZIP::SZIP -# The SZIP library, if found. -# -# Result variables -################### - -# This module will set the following variables in your project: - -# SZIP_FOUND, true if the SZIP headers and libraries were found. -# SZIP_INCLUDE_DIR, the directory containing the SZIP headers. -# SZIP_INCLUDE_DIRS, the directory containing the SZIP headers. -# SZIP_LIBRARIES, libraries to link against to use SZIP. - -# Cache variables -################# - -# The following variables may also be set: - -# SZIP_LIBRARY, where to find the SZIP library. -# SZIP_LIBRARY_DEBUG - Debug version of SZIP library -# SZIP_LIBRARY_RELEASE - Release Version of SZIP library - -# message (STATUS "Finding SZIP library and headers..." ) -######################################################################### - - -find_path(SZIP_INCLUDE_DIR szlib.h) - -set(szip_names ${SZIP_NAMES} sz szip szip-static libsz libszip libszip-static) -foreach(name ${szip_names}) - list (APPEND szip_names_debug "${name}d") -endforeach() - -if(NOT SZIP_LIBRARY) - find_library(SZIP_LIBRARY_RELEASE NAMES ${szip_names}) - find_library(SZIP_LIBRARY_DEBUG NAMES ${szip_names_debug}) - include(SelectLibraryConfigurations) - select_library_configurations(SZIP) - mark_as_advanced(SZIP_LIBRARY_RELEASE SZIP_LIBRARY_DEBUG) -endif() -unset(szip_names) -unset(szip_names_debug) - -if(SZIP_INCLUDE_DIR AND EXISTS "${SZIP_INCLUDE_DIR}/SZconfig.h") - file(STRINGS "${SZIP_INCLUDE_DIR}/SZconfig.h" szip_version_str - REGEX "^#define[\t ]+SZIP_PACKAGE_VERSION[\t ]+.*") - - string(REGEX REPLACE "^#define[\t ]+SZIP_PACKAGE_VERSION[\t ]+([0-9]+).*" - "\\1" SZIP_VERSION "${szip_version_str}") - unset(szip_version_str) -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(SZIP - REQUIRED_VARS SZIP_LIBRARY SZIP_INCLUDE_DIR - VERSION_VAR SZIP_VERSION) - -if(SZIP_FOUND) - set(SZIP_LIBRARIES ${SZIP_LIBRARY}) - set(SZIP_INCLUDE_DIRS "${SZIP_INCLUDE_DIR}") - - if(NOT TARGET SZIP::SZIP) - add_library(SZIP::SZIP UNKNOWN IMPORTED) - if(SZIP_INCLUDE_DIRS) - set_target_properties(SZIP::SZIP PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${SZIP_INCLUDE_DIRS}") - endif() - if(EXISTS "${SZIP_LIBRARY}") - set_target_properties(SZIP::SZIP PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES "C" - IMPORTED_LOCATION "${SZIP_LIBRARY}") - endif() - if(EXISTS "${SZIP_LIBRARY_RELEASE}") - set_property(TARGET SZIP::SZIP APPEND PROPERTY - IMPORTED_CONFIGURATIONS RELEASE) - set_target_properties(SZIP::SZIP PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C" - IMPORTED_LOCATION_RELEASE "${SZIP_LIBRARY_RELEASE}") - endif() - if(EXISTS "${SZIP_LIBRARY_DEBUG}") - set_property(TARGET SZIP::SZIP APPEND PROPERTY - IMPORTED_CONFIGURATIONS DEBUG) - set_target_properties(SZIP::SZIP PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C" - IMPORTED_LOCATION_DEBUG "${SZIP_LIBRARY_DEBUG}") - endif() - endif() -endif() - -mark_as_advanced(SZIP_LIBRARY SZIP_INCLUDE_DIR) - -# Report the results. -if (NOT SZIP_FOUND) - set (SZIP_DIR_MESSAGE - "SZip was not found. Make sure SZIP_LIBRARY and SZIP_INCLUDE_DIR are set or set the SZIP_INSTALL environment variable." - ) - if (NOT SZIP_FIND_QUIETLY) - message (VERBOSE "${SZIP_DIR_MESSAGE}") - else () - if (SZIP_FIND_REQUIRED) - message (FATAL_ERROR "SZip was NOT found and is Required by this project") - endif () - endif () -endif () From 954645806dfb8ffd7ecf53024f36de9023eb0241 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 7 Nov 2024 16:36:58 -0600 Subject: [PATCH 05/16] Clarify which library is built --- CMakeFilters.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake index 64bc289a3b2..9b2cae4fa88 100644 --- a/CMakeFilters.cmake +++ b/CMakeFilters.cmake @@ -181,8 +181,7 @@ if (HDF5_ENABLE_SZIP_SUPPORT) else () if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") EXTERNAL_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${HDF5_ENABLE_SZIP_ENCODING}) - message (VERBOSE "Filter SZIP is built") - message (VERBOSE "... with library AEC") + message (VERBOSE "Filter SZIP is built using library AEC") set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${H5_SZIP_STATIC_LIBRARY}) endif () endif () From 9deb725fdbd8f5b43b9257f7d3729a75b35cda59 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 8 Nov 2024 07:45:58 -0600 Subject: [PATCH 06/16] Added release note. --- CMakeFilters.cmake | 2 +- release_docs/RELEASE.txt | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake index 9b2cae4fa88..e7df309ede7 100644 --- a/CMakeFilters.cmake +++ b/CMakeFilters.cmake @@ -170,7 +170,7 @@ if (HDF5_ENABLE_SZIP_SUPPORT) endif () set(libaec_USE_STATIC_LIBS ${HDF5_USE_LIBAEC_STATIC}) set(SZIP_FOUND FALSE) - # Search pure Config mode first + # Search pure Config mode, there is not a FindSZIP module available find_package (SZIP NAMES ${LIBAEC_PACKAGE_NAME}${HDF_PACKAGE_EXT} OPTIONAL_COMPONENTS ${LIBAEC_SEARCH_TYPE}) set(H5_SZIP_FOUND ${SZIP_FOUND}) if (H5_SZIP_FOUND) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index b9540269b21..ea312a4b977 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -499,6 +499,12 @@ Bug Fixes since HDF5-2.0.0 release Configuration ------------- + - Removed the module search find_package for szip library + + There is not a szip module file to use, so the find_package only uses + find_package in config mode. The choice then is to either build szip, with libaec, + inline or find a system installed szip library, built with CMake. + - Changed name of libhdf5hl_fortran installed by autotools to libhdf5_hl_fortran. The new name is consistent with the name of the lib when installed by CMake and with the other hl libs. From ed9dfd66b5f258f9aa6cc7e9df6af0da24a35d34 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 20 Nov 2024 15:36:47 -0600 Subject: [PATCH 07/16] Add release note about NOT FOUND lib error message. --- release_docs/RELEASE.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 18729a4bf5f..3af9b48b26b 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -510,6 +510,12 @@ Bug Fixes since HDF5-2.0.0 release Configuration ------------- + - Changed the zlib/szip compression find message to FATAL ERROR + + The message was changed to indicate that zlib/szip compression was requested and + that it was not found. If an option is requested, not finding it should always + be an error. + - Removed the module search find_package for szip library There is not a szip module file to use, so the find_package only uses From cf3b44f6acb5ca2f036cefdf832da6ecae190cdb Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 21 Nov 2024 11:17:37 -0600 Subject: [PATCH 08/16] Convert default ZLIB option to OFF --- CMakeFilters.cmake | 2 +- HDF5Examples/C/H5FLT/tfiles/h5ex_d_zfp.ddl | 2 +- config/cmake/scripts/HDF5options.cmake | 4 ++-- release_docs/INSTALL_CMake.txt | 4 ++-- release_docs/RELEASE.txt | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake index e7df309ede7..5f74b7647ac 100644 --- a/CMakeFilters.cmake +++ b/CMakeFilters.cmake @@ -83,7 +83,7 @@ endif () if(NOT DEFINED ZLIBNG_PACKAGE_NAME) set(ZLIBNG_PACKAGE_NAME "zlib-ng") endif () -option (HDF5_ENABLE_ZLIB_SUPPORT "Enable Zlib Filters" ON) +option (HDF5_ENABLE_ZLIB_SUPPORT "Enable Zlib Filters" OFF) if (HDF5_ENABLE_ZLIB_SUPPORT) if (NOT H5_ZLIB_HEADER) if (NOT ZLIB_USE_EXTERNAL) diff --git a/HDF5Examples/C/H5FLT/tfiles/h5ex_d_zfp.ddl b/HDF5Examples/C/H5FLT/tfiles/h5ex_d_zfp.ddl index a8e66c08054..8dadf939143 100644 --- a/HDF5Examples/C/H5FLT/tfiles/h5ex_d_zfp.ddl +++ b/HDF5Examples/C/H5FLT/tfiles/h5ex_d_zfp.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32013 - COMMENT H5Z-ZFP-1.1.1 (ZFP-1.0.0) github.com/LLNL/H5Z-ZFP + COMMENT H5Z-ZFP-1.1.1 (ZFP-1.0.1) github.com/LLNL/H5Z-ZFP PARAMS { XXXX } } } diff --git a/config/cmake/scripts/HDF5options.cmake b/config/cmake/scripts/HDF5options.cmake index 50bdd844e70..0eed84f764b 100644 --- a/config/cmake/scripts/HDF5options.cmake +++ b/config/cmake/scripts/HDF5options.cmake @@ -66,8 +66,8 @@ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRIN #set(ENV{SZIP_ROOT} "some_location") #set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DH5_SZIP_LIBRARY:FILEPATH=some_location/lib/szlib.lib -DH5_SZIP_INCLUDE_DIR:PATH=some_location/include") -### disable using ext zlib -#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_ZLIB_SUPPORT:BOOL=OFF") +### enable using ext zlib +#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_ZLIB_SUPPORT:BOOL=ON") ### disable using ext szip #set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF") #set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_ENCODING:BOOL=OFF") diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 149c7ba6295..12a7e1eec25 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -68,7 +68,7 @@ Download from https://github.com/HDFGroup/hdf5/blob/develop/config/cmake/scripts External compression plugin libraries from https://github.com/HDFGroup/hdf5_plugins: hdf5_plugins.tar.gz -External compression szip and zlib libraries: +External compression szip and zlib libraries:0 ZLIB "https://github.com/madler/zlib/releases/download/v1.3.1/zlib-1.3.1.tar.gz" ZLIBNG "https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.2.2.tar.gz" LIBAEC "https://github.com/MathisRosenhauer/libaec/releases/download/v1.1.3/libaec-1.1.3.tar.gz" @@ -939,7 +939,7 @@ if (BUILD_TESTING) HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO GIT TGZ)" "NO" HDF5_ENABLE_PLUGIN_SUPPORT "Enable PLUGIN Filters" OFF HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF -HDF5_ENABLE_ZLIB_SUPPORT "Enable Zlib Filters" ON +HDF5_ENABLE_ZLIB_SUPPORT "Enable Zlib Filters" OFF if (HDF5_USE_ZLIB_NG) ZLIBNG_USE_EXTERNAL "Use External Library Building for ZLIBNG" OFF diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 3af9b48b26b..ecb6340e7fc 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -50,7 +50,7 @@ New Features - Renamed the option: HDF5_ENABLE_Z_LIB_SUPPORT The option has been renamed to HDF5_ENABLE_ZLIB_SUPPORT to be consistent - with the naming of other options. + with the naming of other options. Also, the option defaults to OFF. - Added support for MinGW + MSYS2 when building with CMake From 5bcf394fbaf50f254c998120e1dd6e84f711e0f7 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 21 Nov 2024 11:40:22 -0600 Subject: [PATCH 09/16] Correct spelling --- CMakeFilters.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake index 5f74b7647ac..928a678a063 100644 --- a/CMakeFilters.cmake +++ b/CMakeFilters.cmake @@ -94,12 +94,12 @@ if (HDF5_ENABLE_ZLIB_SUPPORT) endif () set(ZLIB_FOUND FALSE) if (HDF5_USE_ZLIB_STATIC) - set(ZLIB_SEACH_TYPE static) + set(ZLIB_SEARCH_TYPE static) else () - set(ZLIB_SEACH_TYPE shared) + set(ZLIB_SEARCH_TYPE shared) endif () # Search pure Config mode first - find_package (ZLIB NAMES ${PACKAGE_NAME} OPTIONAL_COMPONENTS ${ZLIB_SEACH_TYPE}) + find_package (ZLIB NAMES ${PACKAGE_NAME} OPTIONAL_COMPONENTS ${ZLIB_SEARCH_TYPE}) if (NOT ZLIB_FOUND) if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0") set(ZLIB_USE_STATIC_LIBS ${HDF5_USE_ZLIB_STATIC}) From f912eeb137fe8670c94bc9cba3f62a40831f4cd5 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 21 Nov 2024 12:13:47 -0600 Subject: [PATCH 10/16] netcdf requires zlib --- .github/workflows/netcdf.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/netcdf.yml b/.github/workflows/netcdf.yml index e23e45fea4b..14a3a858da3 100644 --- a/.github/workflows/netcdf.yml +++ b/.github/workflows/netcdf.yml @@ -52,6 +52,7 @@ jobs: -DHDF5_BUILD_DOC:BOOL=OFF \ -DLIBAEC_USE_LOCALCONTENT:BOOL=OFF \ -DZLIB_USE_LOCALCONTENT:BOOL=OFF \ + -DHDF5_ENABLE_ZLIB_SUPPORT:BOOL=ON \ -DH5_NO_DEPRECATED_SYMBOLS:BOOL=OFF \ -DBUILD_TESTING:BOOL=OFF \ -DCMAKE_INSTALL_PREFIX:PATH=/usr/local \ From 4d3a788a3fdbdc3485b31f7a5c55c6b21fb0b7c7 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 21 Nov 2024 13:01:16 -0600 Subject: [PATCH 11/16] Match zlib setting to szip setting in workflows --- .github/workflows/aocc-cmake.yml | 1 + .github/workflows/i386-cmake.yml | 1 + .github/workflows/julia-cmake.yml | 1 + .github/workflows/nvhpc-cmake.yml | 1 + .github/workflows/vol_adios2.yml | 1 + .github/workflows/vol_async.yml | 1 + .github/workflows/vol_cache.yml | 1 + .github/workflows/vol_ext_passthru.yml | 1 + .github/workflows/vol_log.yml | 1 + .github/workflows/vol_rest.yml | 2 +- 10 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/aocc-cmake.yml b/.github/workflows/aocc-cmake.yml index d4cff890e63..15d1e79411b 100644 --- a/.github/workflows/aocc-cmake.yml +++ b/.github/workflows/aocc-cmake.yml @@ -70,6 +70,7 @@ jobs: CC=mpicc cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake -G Ninja \ -DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \ -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF \ + -DHDF5_ENABLE_ZLIB_SUPPORT:BOOL=OFF \ -DHDF5_ENABLE_PARALLEL:BOOL=ON \ -DHDF5_ENABLE_SUBFILING_VFD:BOOL=ON \ -DHDF5_BUILD_CPP_LIB:BOOL=OFF \ diff --git a/.github/workflows/i386-cmake.yml b/.github/workflows/i386-cmake.yml index b7aa4cd3417..9867c70558e 100644 --- a/.github/workflows/i386-cmake.yml +++ b/.github/workflows/i386-cmake.yml @@ -38,6 +38,7 @@ jobs: cmake -C ../config/cmake/cacheinit.cmake -G "Unix Makefiles" \ --log-level=VERBOSE \ -DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \ + -DHDF5_ENABLE_ZLIB_SUPPORT:BOOL=OFF \ -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF \ -DHDF5_BUILD_CPP_LIB:BOOL=OFF \ -DLIBAEC_USE_LOCALCONTENT:BOOL=OFF \ diff --git a/.github/workflows/julia-cmake.yml b/.github/workflows/julia-cmake.yml index 1d7791b310d..55524f955ff 100644 --- a/.github/workflows/julia-cmake.yml +++ b/.github/workflows/julia-cmake.yml @@ -34,6 +34,7 @@ jobs: cd "${{ runner.workspace }}/build" cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake -G Ninja \ -DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \ + -DHDF5_ENABLE_ZLIB_SUPPORT:BOOL=OFF \ -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF \ -DHDF5_ENABLE_PARALLEL:BOOL=OFF \ -DHDF5_BUILD_CPP_LIB:BOOL=OFF \ diff --git a/.github/workflows/nvhpc-cmake.yml b/.github/workflows/nvhpc-cmake.yml index dbd0e36f4b2..ae25effc982 100644 --- a/.github/workflows/nvhpc-cmake.yml +++ b/.github/workflows/nvhpc-cmake.yml @@ -52,6 +52,7 @@ jobs: cd "${{ runner.workspace }}/build" cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake -G Ninja \ -DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \ + -DHDF5_ENABLE_ZLIB_SUPPORT:BOOL=OFF \ -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF \ -DHDF5_ENABLE_PARALLEL:BOOL=ON \ -DMPIEXEC_NUMPROC_FLAG:STRING=-np \ diff --git a/.github/workflows/vol_adios2.yml b/.github/workflows/vol_adios2.yml index ad781c10a28..835e7e020fe 100644 --- a/.github/workflows/vol_adios2.yml +++ b/.github/workflows/vol_adios2.yml @@ -43,6 +43,7 @@ jobs: -DHDF5_ENABLE_PARALLEL:BOOL=ON \ -DHDF5_ENABLE_THREADSAFE:BOOL=ON \ -DHDF5_ALLOW_UNSUPPORTED:BOOL=ON \ + -DHDF5_ENABLE_ZLIB_SUPPORT:BOOL=OFF \ -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF \ ${{ github.workspace }}/hdf5 cat src/libhdf5.settings diff --git a/.github/workflows/vol_async.yml b/.github/workflows/vol_async.yml index cd631ff4def..a48838ffeb4 100644 --- a/.github/workflows/vol_async.yml +++ b/.github/workflows/vol_async.yml @@ -55,6 +55,7 @@ jobs: -DHDF5_ENABLE_PARALLEL:BOOL=ON \ -DHDF5_ENABLE_THREADSAFE:BOOL=ON \ -DHDF5_ALLOW_UNSUPPORTED:BOOL=ON \ + -DHDF5_ENABLE_ZLIB_SUPPORT:BOOL=OFF \ -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF \ -DHDF5_VOL_ALLOW_EXTERNAL:STRING="GIT" \ -DHDF5_VOL_URL01:STRING="https://github.com/HDFGroup/vol-async.git" \ diff --git a/.github/workflows/vol_cache.yml b/.github/workflows/vol_cache.yml index 4f6a55ad04a..58eecfc0d5d 100644 --- a/.github/workflows/vol_cache.yml +++ b/.github/workflows/vol_cache.yml @@ -83,6 +83,7 @@ jobs: -DHDF5_ENABLE_PARALLEL:BOOL=ON \ -DHDF5_ENABLE_THREADSAFE:BOOL=ON \ -DHDF5_ALLOW_UNSUPPORTED:BOOL=ON \ + -DHDF5_ENABLE_ZLIB_SUPPORT:BOOL=OFF \ -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF \ -DHDF5_VOL_ALLOW_EXTERNAL:STRING="GIT" \ -DHDF5_VOL_URL01:STRING="https://github.com/HDFGroup/vol-async.git" \ diff --git a/.github/workflows/vol_ext_passthru.yml b/.github/workflows/vol_ext_passthru.yml index b9579063638..629f24cab11 100644 --- a/.github/workflows/vol_ext_passthru.yml +++ b/.github/workflows/vol_ext_passthru.yml @@ -42,6 +42,7 @@ jobs: -DBUILD_STATIC_LIBS=OFF \ -DHDF5_TEST_API:BOOL=ON \ -DHDF5_ENABLE_PARALLEL:BOOL=ON \ + -DHDF5_ENABLE_ZLIB_SUPPORT:BOOL=OFF \ -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF \ -DHDF5_VOL_ALLOW_EXTERNAL:STRING="GIT" \ -DHDF5_VOL_URL01:STRING="https://github.com/hpc-io/vol-external-passthrough.git" \ diff --git a/.github/workflows/vol_log.yml b/.github/workflows/vol_log.yml index 20c4a816ed9..287cf6c1ffb 100644 --- a/.github/workflows/vol_log.yml +++ b/.github/workflows/vol_log.yml @@ -41,6 +41,7 @@ jobs: -DHDF5_ENABLE_PARALLEL:BOOL=ON \ -DHDF5_ENABLE_THREADSAFE:BOOL=ON \ -DHDF5_ALLOW_UNSUPPORTED:BOOL=ON \ + -DHDF5_ENABLE_ZLIB_SUPPORT:BOOL=OFF \ -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF \ ${{ github.workspace }}/hdf5 cat src/libhdf5.settings diff --git a/.github/workflows/vol_rest.yml b/.github/workflows/vol_rest.yml index fe964453a4c..3e5d0713016 100644 --- a/.github/workflows/vol_rest.yml +++ b/.github/workflows/vol_rest.yml @@ -57,8 +57,8 @@ jobs: -DHDF5_BUILD_HL_LIB:BOOL=ON \ -DHDF5_TEST_API:BOOL=ON \ -DHDF5_ALLOW_UNSUPPORTED:BOOL=ON \ - -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF \ -DHDF5_ENABLE_ZLIB_SUPPORT:BOOL=OFF \ + -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF \ -DHDF5_VOL_ALLOW_EXTERNAL:STRING="GIT" \ -DHDF5_VOL_URL01:STRING="https://github.com/HDFGroup/vol-rest.git" \ -DHDF5_VOL_VOL-REST_BRANCH:STRING="master" \ From 9c658afcd7169cb6993ecddfb97c1972a3208c6c Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 21 Nov 2024 13:28:44 -0600 Subject: [PATCH 12/16] Revert accidental file check-in --- HDF5Examples/C/H5FLT/tfiles/h5ex_d_zfp.ddl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HDF5Examples/C/H5FLT/tfiles/h5ex_d_zfp.ddl b/HDF5Examples/C/H5FLT/tfiles/h5ex_d_zfp.ddl index 8dadf939143..a8e66c08054 100644 --- a/HDF5Examples/C/H5FLT/tfiles/h5ex_d_zfp.ddl +++ b/HDF5Examples/C/H5FLT/tfiles/h5ex_d_zfp.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32013 - COMMENT H5Z-ZFP-1.1.1 (ZFP-1.0.1) github.com/LLNL/H5Z-ZFP + COMMENT H5Z-ZFP-1.1.1 (ZFP-1.0.0) github.com/LLNL/H5Z-ZFP PARAMS { XXXX } } } From d578c40d0df598ed7055d91736a8ece7b3f2324f Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Thu, 21 Nov 2024 15:39:37 -0600 Subject: [PATCH 13/16] Update CMakeFilters.cmake --- CMakeFilters.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake index 928a678a063..c9f2858c658 100644 --- a/CMakeFilters.cmake +++ b/CMakeFilters.cmake @@ -159,7 +159,7 @@ set(H5_SZIP_FOUND FALSE) if(NOT DEFINED LIBAEC_PACKAGE_NAME) set(LIBAEC_PACKAGE_NAME "libaec") endif () -option (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" ON) +option (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF) if (HDF5_ENABLE_SZIP_SUPPORT) option (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" ON) if (NOT SZIP_USE_EXTERNAL) From 4ce8adaa4697a671376184ccf22f6e2c59a286da Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 22 Nov 2024 07:46:51 -0600 Subject: [PATCH 14/16] Move variable declaration inside ifdef block --- test/dsets.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/dsets.c b/test/dsets.c index e64ed4441b7..55c9d9248f5 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -2845,13 +2845,14 @@ test_missing_filter(hid_t file) size_t i, j; /* Local index variables */ herr_t ret; /* Generic return value */ const char *testfile = H5_get_srcdir_filename(FILE_DEFLATE_NAME); /* Corrected test file name */ - H5CX_node_t api_ctx = {{0}, NULL}; /* API context node to push */ bool api_ctx_pushed = false; /* Whether API context pushed */ TESTING("dataset access with missing filter"); /* Unregister the deflate filter */ #ifdef H5_HAVE_FILTER_DEFLATE + H5CX_node_t api_ctx = {{0}, NULL}; /* API context node to push */ + /* Verify deflate filter is registered currently */ if (H5Zfilter_avail(H5Z_FILTER_DEFLATE) != true) { H5_FAILED(); From 183524a69023ff870c3fee7c33ec17995cecb333 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 14:03:07 +0000 Subject: [PATCH 15/16] Committing clang-format changes --- test/dsets.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/dsets.c b/test/dsets.c index 55c9d9248f5..88eee7297d3 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -2851,7 +2851,7 @@ test_missing_filter(hid_t file) /* Unregister the deflate filter */ #ifdef H5_HAVE_FILTER_DEFLATE - H5CX_node_t api_ctx = {{0}, NULL}; /* API context node to push */ + H5CX_node_t api_ctx = {{0}, NULL}; /* API context node to push */ /* Verify deflate filter is registered currently */ if (H5Zfilter_avail(H5Z_FILTER_DEFLATE) != true) { From cd902ad42ec7ce3dbcf70100772415bb13494a6b Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 25 Nov 2024 10:29:09 -0600 Subject: [PATCH 16/16] Correct plugins ref --- config/cmake/cacheinit.cmake | 2 +- release_docs/INSTALL_CMake.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake index 851e7c5987e..58319a68b6e 100644 --- a/config/cmake/cacheinit.cmake +++ b/config/cmake/cacheinit.cmake @@ -79,7 +79,7 @@ set (KWSYS_USE_LOCALCONTENT OFF CACHE BOOL "Use local file for KWSYS FetchConten # filter plugin options ######################## -set (PLUGIN_TGZ_ORIGPATH "https://github.com/HDFGroup/hdf5_plugins/releases/download/snapshots" CACHE STRING "Use PLUGINS from original location" FORCE) +set (PLUGIN_TGZ_ORIGPATH "https://github.com/HDFGroup/hdf5_plugins/releases/download/snapshot" CACHE STRING "Use PLUGINS from original location" FORCE) set (PLUGIN_TGZ_NAME "hdf5_plugins-master.tar.gz" CACHE STRING "Use PLUGINS from compressed file" FORCE) set (PLUGIN_USE_LOCALCONTENT ON CACHE BOOL "Use local file for PLUGIN FetchContent" FORCE) set (PLUGIN_PACKAGE_NAME "pl" CACHE STRING "Name of PLUGIN package" FORCE) diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 7a075f34fb3..4500f8dde27 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -556,7 +556,7 @@ These five steps are described in detail below. ######################## # filter plugin options ######################## - set (PLUGIN_TGZ_ORIGPATH "https://github.com/HDFGroup/hdf5_plugins/releases/download/snapshots" CACHE STRING "Use PLUGINS from original location" FORCE) + set (PLUGIN_TGZ_ORIGPATH "https://github.com/HDFGroup/hdf5_plugins/releases/download/snapshot" CACHE STRING "Use PLUGINS from original location" FORCE) set (PLUGIN_TGZ_NAME "hdf5_plugins-master.tar.gz" CACHE STRING "Use PLUGINS from compressed file" FORCE) set (PLUGIN_USE_LOCALCONTENT ON CACHE BOOL "Use local file for PLUGIN FetchContent" FORCE) set (PLUGIN_PACKAGE_NAME "pl" CACHE STRING "Name of PLUGIN package" FORCE)