From efb50c12e3f1057c5f8c39f07fde0fb4ed6de28a Mon Sep 17 00:00:00 2001 From: "H. Joe Lee" Date: Thu, 17 Dec 2020 15:22:44 -0600 Subject: [PATCH 1/3] close #195. (#196) * Update HDF5PluginMacros.cmake * Update HDF5PluginMacros.cmake --- config/cmake/HDF5PluginMacros.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/cmake/HDF5PluginMacros.cmake b/config/cmake/HDF5PluginMacros.cmake index 3c0e12c1f39..a858353f37f 100644 --- a/config/cmake/HDF5PluginMacros.cmake +++ b/config/cmake/HDF5PluginMacros.cmake @@ -57,8 +57,8 @@ macro (EXTERNAL_PLUGIN_LIBRARY compress_type) endif () if (ENABLE_SZF) add_dependencies (h5szf ${HDF5_LIBSH_TARGET}) - add_dependencies (h5ex_d_szf ${HDF5_LIBSH_TARGET}) - target_include_directories (h5ex_d_szf PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR}") + add_dependencies (h5ex_d_sz ${HDF5_LIBSH_TARGET}) + target_include_directories (h5ex_d_sz PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR}") endif () if (ENABLE_ZFP) add_dependencies (h5zfp ${HDF5_LIBSH_TARGET}) From a032262734943f6f7ae98e8eb5a422f8e8384b4d Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Tue, 29 Dec 2020 15:43:49 -0600 Subject: [PATCH 2/3] Modify temporary rpath for testing in java example scripts. (#230) --- java/examples/datasets/JavaDatasetExample.sh.in | 10 +++++++++- java/examples/datatypes/JavaDatatypeExample.sh.in | 10 +++++++++- java/examples/groups/JavaGroupExample.sh.in | 12 ++++++++++-- java/examples/intro/JavaIntroExample.sh.in | 10 +++++++++- 4 files changed, 37 insertions(+), 5 deletions(-) diff --git a/java/examples/datasets/JavaDatasetExample.sh.in b/java/examples/datasets/JavaDatasetExample.sh.in index ae794166fa8..7c47002e838 100644 --- a/java/examples/datasets/JavaDatasetExample.sh.in +++ b/java/examples/datasets/JavaDatasetExample.sh.in @@ -15,6 +15,7 @@ top_builddir=@top_builddir@ top_srcdir=@top_srcdir@ srcdir=@srcdir@ +IS_DARWIN="@H5_IS_DARWIN@" USE_FILTER_SZIP="@USE_FILTER_SZIP@" USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@" @@ -36,8 +37,8 @@ nerrors=0 # where the libs exist HDFLIB_HOME="$top_srcdir/java/lib" -BLDLIBDIR="$top_builddir/hdf5/lib" BLDDIR="." +BLDLIBDIR="$BLDDIR/testlibs" HDFTEST_HOME="$top_srcdir/java/examples/datasets" JARFILE=jar@PACKAGE_TARNAME@-@PACKAGE_VERSION@.jar TESTJARFILE=jar@PACKAGE_TARNAME@datasets.jar @@ -113,6 +114,13 @@ COPY_LIBFILES_TO_BLDLIBDIR() fi fi done + if [ "$IS_DARWIN" = "yes" ]; then + (cd $BLDLIBDIR; \ + install_name_tool -add_rpath @loader_path libhdf5_java.dylib; \ + exist_path=` otool -l libhdf5_java.dylib | grep libhdf5 | grep -v java | awk '{print $2}'`; \ + echo $exist_path; \ + install_name_tool -change $exist_path @rpath/libhdf5.dylib libhdf5_java.dylib) + fi # copy jar files. Used -f to make sure get a new copy for tstfile in $COPY_JARTESTFILES do diff --git a/java/examples/datatypes/JavaDatatypeExample.sh.in b/java/examples/datatypes/JavaDatatypeExample.sh.in index 447512a42f8..6a4581a8edb 100644 --- a/java/examples/datatypes/JavaDatatypeExample.sh.in +++ b/java/examples/datatypes/JavaDatatypeExample.sh.in @@ -15,6 +15,7 @@ top_builddir=@top_builddir@ top_srcdir=@top_srcdir@ srcdir=@srcdir@ +IS_DARWIN="@H5_IS_DARWIN@" TESTNAME=EX_Datatypes EXIT_SUCCESS=0 @@ -33,8 +34,8 @@ nerrors=0 # where the libs exist HDFLIB_HOME="$top_srcdir/java/lib" -BLDLIBDIR="$top_builddir/hdf5/lib" BLDDIR="." +BLDLIBDIR="$BLDDIR/testlibs" HDFTEST_HOME="$top_srcdir/java/examples/datatypes" JARFILE=jar@PACKAGE_TARNAME@-@PACKAGE_VERSION@.jar TESTJARFILE=jar@PACKAGE_TARNAME@datatypes.jar @@ -110,6 +111,13 @@ COPY_LIBFILES_TO_BLDLIBDIR() fi fi done + if [ "$IS_DARWIN" = "yes" ]; then + (cd $BLDLIBDIR; \ + install_name_tool -add_rpath @loader_path libhdf5_java.dylib; \ + exist_path=` otool -l libhdf5_java.dylib | grep libhdf5 | grep -v java | awk '{print $2}'`; \ + echo $exist_path; \ + install_name_tool -change $exist_path @rpath/libhdf5.dylib libhdf5_java.dylib) + fi # copy jar files. Used -f to make sure get a new copy for tstfile in $COPY_JARTESTFILES do diff --git a/java/examples/groups/JavaGroupExample.sh.in b/java/examples/groups/JavaGroupExample.sh.in index acc606f64a4..f32947a9253 100644 --- a/java/examples/groups/JavaGroupExample.sh.in +++ b/java/examples/groups/JavaGroupExample.sh.in @@ -15,6 +15,7 @@ top_builddir=@top_builddir@ top_srcdir=@top_srcdir@ srcdir=@srcdir@ +IS_DARWIN="@H5_IS_DARWIN@" TESTNAME=EX_Groups EXIT_SUCCESS=0 @@ -33,9 +34,9 @@ nerrors=0 # where the libs exist HDFLIB_HOME="$top_srcdir/java/lib" -BLDLIBDIR="$top_builddir/hdf5/lib" -BLDITERDIR="./groups" BLDDIR="." +BLDLIBDIR="$BLDDIR/testlibs" +BLDITERDIR="./groups" HDFTEST_HOME="$top_srcdir/java/examples/groups" JARFILE=jar@PACKAGE_TARNAME@-@PACKAGE_VERSION@.jar TESTJARFILE=jar@PACKAGE_TARNAME@groups.jar @@ -105,6 +106,13 @@ COPY_LIBFILES_TO_BLDLIBDIR() fi fi done + if [ "$IS_DARWIN" = "yes" ]; then + (cd $BLDLIBDIR; \ + install_name_tool -add_rpath @loader_path libhdf5_java.dylib; \ + exist_path=` otool -l libhdf5_java.dylib | grep libhdf5 | grep -v java | awk '{print $2}'`; \ + echo $exist_path; \ + install_name_tool -change $exist_path @rpath/libhdf5.dylib libhdf5_java.dylib) + fi # copy jar files. Used -f to make sure get a new copy for tstfile in $COPY_JARTESTFILES do diff --git a/java/examples/intro/JavaIntroExample.sh.in b/java/examples/intro/JavaIntroExample.sh.in index 1886485ad86..7f7dabf6e08 100644 --- a/java/examples/intro/JavaIntroExample.sh.in +++ b/java/examples/intro/JavaIntroExample.sh.in @@ -15,6 +15,7 @@ top_builddir=@top_builddir@ top_srcdir=@top_srcdir@ srcdir=@srcdir@ +IS_DARWIN="@H5_IS_DARWIN@" TESTNAME=EX_Intro EXIT_SUCCESS=0 @@ -33,8 +34,8 @@ nerrors=0 # where the libs exist HDFLIB_HOME="$top_srcdir/java/lib" -BLDLIBDIR="$top_builddir/hdf5/lib" BLDDIR="." +BLDLIBDIR="$BLDDIR/testlibs" HDFTEST_HOME="$top_srcdir/java/examples/intro" JARFILE=jar@PACKAGE_TARNAME@-@PACKAGE_VERSION@.jar TESTJARFILE=jar@PACKAGE_TARNAME@intro.jar @@ -99,6 +100,13 @@ COPY_LIBFILES_TO_BLDLIBDIR() fi fi done + if [ "$IS_DARWIN" = "yes" ]; then + (cd $BLDLIBDIR; \ + install_name_tool -add_rpath @loader_path libhdf5_java.dylib; \ + exist_path=` otool -l libhdf5_java.dylib | grep libhdf5 | grep -v java | awk '{print $2}'`; \ + echo $exist_path; \ + install_name_tool -change $exist_path @rpath/libhdf5.dylib libhdf5_java.dylib) + fi # copy jar files. Used -f to make sure get a new copy for tstfile in $COPY_JARTESTFILES do From 8c9eeff9a9e6e9470f528c591ded8991c4e9a174 Mon Sep 17 00:00:00 2001 From: Dana Robinson <43805+derobins@users.noreply.github.com> Date: Fri, 8 Jan 2021 04:52:08 -0800 Subject: [PATCH 3/3] Fixes Autotools detection of the st_blocks field in stat (#246) * Fixes Autotools detection of the st_blocks field in stat The Autotools and CMake will now both correctly determine if the stat struct has the st_blocks field and set H5_HAVE_STAT_ST_BLOCKS appropriately. * Fixes a typo in configure.ac --- configure.ac | 4 ++-- release_docs/RELEASE.txt | 11 ++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index fcafdbbf05e..e91f06ff2a4 100644 --- a/configure.ac +++ b/configure.ac @@ -1962,10 +1962,10 @@ esac ## ---------------------------------------------------------------------- -## Does the struct stat have the st_blocks field? This field is not Posix. +## Does the struct stat have the st_blocks field? This field is not POSIX. ## AC_MSG_CHECKING([for st_blocks in struct stat]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM[[ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include ]],[[struct stat sb; sb.st_blocks=0;]])], [AC_DEFINE([HAVE_STAT_ST_BLOCKS], [1], [Define if struct stat has the st_blocks field]) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 8b26c7052d2..c69f1ed45f2 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -183,7 +183,16 @@ Bug Fixes since HDF5-1.10.7 release Configuration ------------- - - + - Fixes Autotools determination of the stat struct having an st_blocks field + + A missing parenthesis in an autoconf macro prevented building the test + code used to determine if the stat struct contains the st_blocks field. + Now that the test functions correctly, the H5_HAVE_STAT_ST_BLOCKS #define + found in H5pubconf.h will be defined correctly on both the Autotools and + CMake. This #define is only used in the tests and does not affect the + HDF5 C library. + + (DER - 2021/07/01, HDFFV-11201) Performance -------------