From d597f00496b48c134e29d68dff2afa0aac8b7fa6 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 16 Dec 2024 12:27:27 -0600 Subject: [PATCH 01/10] Use the ${LIBAEC_PACKAGE_NAME} variable instead of SZIP --- CMakeFilters.cmake | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake index 2b5297f198d..f755d0a676f 100644 --- a/CMakeFilters.cmake +++ b/CMakeFilters.cmake @@ -173,13 +173,18 @@ if (HDF5_ENABLE_SZIP_SUPPORT) set(libaec_USE_STATIC_LIBS ${HDF5_USE_LIBAEC_STATIC}) set(SZIP_FOUND FALSE) # 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}) + find_package ({LIBAEC_PACKAGE_NAME} NAMES ${LIBAEC_PACKAGE_NAME}${HDF_PACKAGE_EXT} OPTIONAL_COMPONENTS ${LIBAEC_SEARCH_TYPE}) + set(H5_SZIP_FOUND ${{LIBAEC_PACKAGE_NAME}_FOUND}) if (H5_SZIP_FOUND) set (H5_SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR}) set (H5_SZIP_INCLUDE_DIRS ${H5_SZIP_INCLUDE_DIRS} ${SZIP_INCLUDE_DIR}) - set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_LIBRARIES}) + if(LIBAEC_PACKAGE_NAME STREQUAL "libaec") + set (LINK_COMP_LIBS ${LINK_COMP_LIBS} libaec::sz libaec::aec) + else () + set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_LIBRARIES}) + endif () endif () + message (VERBOSE "H5_SZIP_FOUND=${SZIP_FOUND} and LINK_COMP_LIBS=${LINK_COMP_LIBS}") 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}) @@ -187,6 +192,7 @@ if (HDF5_ENABLE_SZIP_SUPPORT) set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${H5_SZIP_STATIC_LIBRARY}) endif () endif () + message (VERBOSE "LINK_COMP_LIBS=${LINK_COMP_LIBS}") if (H5_SZIP_FOUND) set (H5_HAVE_FILTER_SZIP 1) set (H5_HAVE_SZLIB_H 1) From 426a7e8de1fd60fa5c9acd46f01279f27ed82c88 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 16 Dec 2024 12:40:36 -0600 Subject: [PATCH 02/10] Update documentation --- release_docs/INSTALL_CMake.txt | 4 +++- release_docs/RELEASE.txt | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 1a855b60396..9ecd7aee1e7 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -285,7 +285,7 @@ IV. Further considerations web site. The HDF5 2."X"."Y" product requires a minimum CMake version 3.18. If you are using VS2022, the CMake minimum version is 3.21. - 2. If you plan to use Zlib or Szip: + 2. If you plan to use Zlib or Szip (libaec): A. Download the binary packages and install them in a central location. For example on Windows, create a folder extlibs and install the packages there. Add the following CMake options: @@ -295,10 +295,12 @@ IV. Further considerations -DSZIP_LIBRARY:FILEPATH=some_location/lib/szlib.lib -DSZIP_INCLUDE_DIR:PATH=some_location/include -DSZIP_USE_EXTERNAL:BOOL=OFF + (For libaec use -Dlibaec_* options) where "some_location" is the full path to the extlibs folder. Also the appropriate environment variable must be set; set(ENV{ZLIB_ROOT} "some_location") set(ENV{SZIP_ROOT} "some_location") + set(ENV{libaec_ROOT} "some_location") B. Use source packages from an GIT server by adding the following CMake options: diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 3a4a705d443..f2d2a6abf81 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -530,6 +530,14 @@ Bug Fixes since HDF5-2.0.0 release Configuration ------------- + - Use pre-installed libaec compression library + + The CMake logic for finding the libaec compression library has been + modified for a system-installed version of the library. Two options + must be set, HDF5_ALLOW_EXTERNAL_SUPPORT:STRING=NO and *_USE_EXTERNAL:BOOL=OFF. + Note that disables building all plugins and external libraries in-line with the + HDF5 library. + - Changed the zlib/szip compression find message to FATAL ERROR The message was changed to indicate that zlib/szip compression was requested and From 52a957e391350805178989f61152b5562b6e4234 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 16 Dec 2024 12:41:57 -0600 Subject: [PATCH 03/10] Add to note --- release_docs/RELEASE.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index f2d2a6abf81..f5b3e405409 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -536,7 +536,7 @@ Bug Fixes since HDF5-2.0.0 release modified for a system-installed version of the library. Two options must be set, HDF5_ALLOW_EXTERNAL_SUPPORT:STRING=NO and *_USE_EXTERNAL:BOOL=OFF. Note that disables building all plugins and external libraries in-line with the - HDF5 library. + HDF5 library. In addition, the *_ROOT environment variables must be set. - Changed the zlib/szip compression find message to FATAL ERROR From 9d8da391e53d4adbae27f3e5455b4c8e30289021 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 16 Dec 2024 12:43:41 -0600 Subject: [PATCH 04/10] Add help note --- release_docs/INSTALL_CMake.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 9ecd7aee1e7..f66fe187bc7 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -302,6 +302,9 @@ IV. Further considerations set(ENV{SZIP_ROOT} "some_location") set(ENV{libaec_ROOT} "some_location") + Note that if there is a problem finding the libraries, try adding the + CMake variable CMAKE_FIND_DEBUG_MODE:BOOL=ON to the command line. + B. Use source packages from an GIT server by adding the following CMake options: HDF5_ALLOW_EXTERNAL_SUPPORT:STRING="GIT" From 5bd5b3e3dc2b4d39c58cb01ad5a6eebfe1910078 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 17 Dec 2024 10:26:23 -0600 Subject: [PATCH 05/10] Update doc notes --- release_docs/INSTALL_CMake.txt | 2 +- release_docs/RELEASE.txt | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index f66fe187bc7..d4a06ff9b4c 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -295,7 +295,7 @@ IV. Further considerations -DSZIP_LIBRARY:FILEPATH=some_location/lib/szlib.lib -DSZIP_INCLUDE_DIR:PATH=some_location/include -DSZIP_USE_EXTERNAL:BOOL=OFF - (For libaec use -Dlibaec_* options) + (For libaec use -Dlibaec_* options instead of -DSZIP_* options) where "some_location" is the full path to the extlibs folder. Also the appropriate environment variable must be set; set(ENV{ZLIB_ROOT} "some_location") diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 155727cf82f..ed93c615b3e 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -544,9 +544,15 @@ Bug Fixes since HDF5-2.0.0 release The CMake logic for finding the libaec compression library has been modified for a system-installed version of the library. Two options - must be set, HDF5_ALLOW_EXTERNAL_SUPPORT:STRING=NO and *_USE_EXTERNAL:BOOL=OFF. - Note that disables building all plugins and external libraries in-line with the - HDF5 library. In addition, the *_ROOT environment variables must be set. + must be set; + HDF5_ALLOW_EXTERNAL_SUPPORT:STRING=NO + _USE_EXTERNAL:BOOL=OFF + where is one of ZLIB, ZLIBNG, SZIP, PLUGIN. + Note that HDF5_ALLOW_EXTERNAL_SUPPORT:STRING=NO disables building all plugins + and external libraries in-line with the HDF5 library. In addition, the + _ROOT environment variables must be set, where + is one of ZLIB, ZLIBNG, SZIP, libaec, PLUGIN. Note that libaec is the + expected name for using the libaec library in place of original szip. - Changed the zlib/szip compression find message to FATAL ERROR From 543f38f5fd27af41f540e4acbfa3abe93112a568 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 20 Dec 2024 11:40:19 -0600 Subject: [PATCH 06/10] Update docs and some syntax errors --- CMakeFilters.cmake | 4 ++-- CMakeInstallation.cmake | 7 ++++--- config/cmake/scripts/HDF5options.cmake | 2 ++ release_docs/INSTALL_CMake.txt | 15 +++++++++++---- 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake index f755d0a676f..eb44584f073 100644 --- a/CMakeFilters.cmake +++ b/CMakeFilters.cmake @@ -173,8 +173,8 @@ if (HDF5_ENABLE_SZIP_SUPPORT) set(libaec_USE_STATIC_LIBS ${HDF5_USE_LIBAEC_STATIC}) set(SZIP_FOUND FALSE) # Search pure Config mode, there is not a FindSZIP module available - find_package ({LIBAEC_PACKAGE_NAME} NAMES ${LIBAEC_PACKAGE_NAME}${HDF_PACKAGE_EXT} OPTIONAL_COMPONENTS ${LIBAEC_SEARCH_TYPE}) - set(H5_SZIP_FOUND ${{LIBAEC_PACKAGE_NAME}_FOUND}) + find_package (${LIBAEC_PACKAGE_NAME} NAMES ${LIBAEC_PACKAGE_NAME}${HDF_PACKAGE_EXT} OPTIONAL_COMPONENTS ${LIBAEC_SEARCH_TYPE}) + set(H5_SZIP_FOUND ${${LIBAEC_PACKAGE_NAME}_FOUND}) if (H5_SZIP_FOUND) set (H5_SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR}) set (H5_SZIP_INCLUDE_DIRS ${H5_SZIP_INCLUDE_DIRS} ${SZIP_INCLUDE_DIR}) diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake index 6211c959e99..7d9199f1fa2 100644 --- a/CMakeInstallation.cmake +++ b/CMakeInstallation.cmake @@ -465,11 +465,12 @@ The HDF5 data model, file format, API, library, and tools are open and distribut endif () endif () if (H5_SZIP_FOUND AND SZIP_USE_EXTERNAL) + set (SZIP_PROJNAME "${LIBAEC_PACKAGE_NAME}") if (WIN32) - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${H5_SZIP_INCLUDE_DIR_GEN};SZIP;ALL;/") + set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${H5_SZIP_INCLUDE_DIR_GEN};${SZIP_PROJNAME};ALL;/") else () - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${H5_SZIP_INCLUDE_DIR_GEN};SZIP;libraries;/") - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${H5_SZIP_INCLUDE_DIR_GEN};SZIP;configinstall;/") + set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${H5_SZIP_INCLUDE_DIR_GEN};${SZIP_PROJNAME};libraries;/") + set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${H5_SZIP_INCLUDE_DIR_GEN};${SZIP_PROJNAME};configinstall;/") endif () endif () if (PLUGIN_FOUND AND PLUGIN_USE_EXTERNAL) diff --git a/config/cmake/scripts/HDF5options.cmake b/config/cmake/scripts/HDF5options.cmake index 79373b95b88..0da95c87f6f 100644 --- a/config/cmake/scripts/HDF5options.cmake +++ b/config/cmake/scripts/HDF5options.cmake @@ -65,6 +65,8 @@ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRIN #set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_LIBRARY:FILEPATH=some_location/lib/zlib.lib -DZLIB_INCLUDE_DIR:PATH=some_location/include") #set(ENV{SZIP_ROOT} "some_location") #set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSZIP_LIBRARY:FILEPATH=some_location/lib/szlib.lib -DSZIP_INCLUDE_DIR:PATH=some_location/include") +#set(ENV{libaec_ROOT} "some_location") +#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -Dlibaec_LIBRARY:FILEPATH=some_location/lib/libaec.lib -Dlibaec_INCLUDE_DIR:PATH=some_location/include") ### disable using ext zlib #set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_ZLIB_SUPPORT:BOOL=OFF") diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index d4a06ff9b4c..22b23bed0d0 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -285,19 +285,20 @@ IV. Further considerations web site. The HDF5 2."X"."Y" product requires a minimum CMake version 3.18. If you are using VS2022, the CMake minimum version is 3.21. - 2. If you plan to use Zlib or Szip (libaec): + 2. If you plan to use Zlib or Szip (aka libaec): A. Download the binary packages and install them in a central location. For example on Windows, create a folder extlibs and install the packages there. Add the following CMake options: -DZLIB_LIBRARY:FILEPATH=some_location/lib/zlib.lib -DZLIB_INCLUDE_DIR:PATH=some_location/include -DZLIB_USE_EXTERNAL:BOOL=OFF - -DSZIP_LIBRARY:FILEPATH=some_location/lib/szlib.lib + -DSZIP_LIBRARY:FILEPATH=some_location/lib/libszaec.lib -DSZIP_INCLUDE_DIR:PATH=some_location/include + -Dlibaec_LIBRARY:FILEPATH=some_location/lib/libaec.lib + -Dlibaec_INCLUDE_DIR:PATH=some_location/include -DSZIP_USE_EXTERNAL:BOOL=OFF - (For libaec use -Dlibaec_* options instead of -DSZIP_* options) where "some_location" is the full path to the extlibs folder. - Also the appropriate environment variable must be set; + Also if the appropriate environment variable is set, the above options are not required; set(ENV{ZLIB_ROOT} "some_location") set(ENV{SZIP_ROOT} "some_location") set(ENV{libaec_ROOT} "some_location") @@ -312,6 +313,8 @@ IV. Further considerations ZLIB_GIT_BRANCH="some_branch" SZIP_GIT_URL:STRING="https://some_location/szip" SZIP_GIT_BRANCH="some_branch" + LIBAEC_GIT_URL:STRING="https://some_location/liaec" + LIBAEC_GIT_BRANCH="some_branch" where "some_location" is the URL to the GIT repository and "some_branch" is a branch in the repository, usually the default. Also set CMAKE_BUILD_TYPE to the configuration type. @@ -510,6 +513,8 @@ These five steps are described in detail below. is: * SZIP_INCLUDE_DIR:PATH= * SZIP_LIBRARY:FILEPATH= + * libaec_INCLUDE_DIR:PATH= + * libaec_LIBRARY:FILEPATH= * ZLIB_INCLUDE_DIR:PATH= * ZLIB_LIBRARY:FILEPATH= * :BOOL=[ON | OFF] @@ -734,6 +739,8 @@ These five steps are described in detail below. ZLIB_GIT_BRANCH="${git_branch}" SZIP_GIT_URL:STRING="https://${git_url}/szip" SZIP_GIT_BRANCH="${git_branch}" + LIBAEC_GIT_URL:STRING="https://${git_url}/libaec" + LIBAEC_GIT_BRANCH="${git_branch}" PLUGIN_GIT_URL:STRING="https://${git_url}/plugin" PLUGIN_GIT_BRANCH="${git_branch}" ${git_url} should be changed to your location and ${git_branch} is From c036550cb749c3964b2858fad8d80c458cc11fbc Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 20 Dec 2024 13:38:31 -0600 Subject: [PATCH 07/10] Correct typo --- release_docs/INSTALL_CMake.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 22b23bed0d0..5e27a06587f 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -313,7 +313,7 @@ IV. Further considerations ZLIB_GIT_BRANCH="some_branch" SZIP_GIT_URL:STRING="https://some_location/szip" SZIP_GIT_BRANCH="some_branch" - LIBAEC_GIT_URL:STRING="https://some_location/liaec" + LIBAEC_GIT_URL:STRING="https://some_location/libaec" LIBAEC_GIT_BRANCH="some_branch" where "some_location" is the URL to the GIT repository and "some_branch" is a branch in the repository, usually the default. Also set From b1c5e2ffb8053ba0d75a350ccc09a85dae09bc1f Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 30 Dec 2024 07:44:59 -0600 Subject: [PATCH 08/10] Update release note --- release_docs/RELEASE.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index ed93c615b3e..a0f428e3758 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -554,6 +554,8 @@ Bug Fixes since HDF5-2.0.0 release is one of ZLIB, ZLIBNG, SZIP, libaec, PLUGIN. Note that libaec is the expected name for using the libaec library in place of original szip. + See INSTALL_CMake.txt for more detailed information. + - Changed the zlib/szip compression find message to FATAL ERROR The message was changed to indicate that zlib/szip compression was requested and From db1dcaee33de7f63f9f9580e47407dbbf196ec22 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 30 Dec 2024 07:46:41 -0600 Subject: [PATCH 09/10] Adjust paragraph --- release_docs/RELEASE.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index a0f428e3758..d2e035c7de8 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -549,7 +549,9 @@ Bug Fixes since HDF5-2.0.0 release _USE_EXTERNAL:BOOL=OFF where is one of ZLIB, ZLIBNG, SZIP, PLUGIN. Note that HDF5_ALLOW_EXTERNAL_SUPPORT:STRING=NO disables building all plugins - and external libraries in-line with the HDF5 library. In addition, the + and external libraries in-line with the HDF5 library. + + In addition, the _ROOT environment variables must be set, where is one of ZLIB, ZLIBNG, SZIP, libaec, PLUGIN. Note that libaec is the expected name for using the libaec library in place of original szip. From 123e06ba360e5877cc3999bd10f94d2cd2d1e86d Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 30 Dec 2024 07:47:35 -0600 Subject: [PATCH 10/10] Adjust whitespace format --- release_docs/RELEASE.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index d2e035c7de8..827b40493af 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -551,10 +551,9 @@ Bug Fixes since HDF5-2.0.0 release Note that HDF5_ALLOW_EXTERNAL_SUPPORT:STRING=NO disables building all plugins and external libraries in-line with the HDF5 library. - In addition, the - _ROOT environment variables must be set, where - is one of ZLIB, ZLIBNG, SZIP, libaec, PLUGIN. Note that libaec is the - expected name for using the libaec library in place of original szip. + In addition, the _ROOT environment variables must be set, + where is one of ZLIB, ZLIBNG, SZIP, libaec, PLUGIN. + Note that libaec is the expected name for using the libaec library in place of original szip. See INSTALL_CMake.txt for more detailed information.