From c6f2205abefa1a098bbb2b38a0318596fbb16eb3 Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Thu, 2 Jul 2020 14:14:53 -0500 Subject: Merge pull request #2670 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:develop to develop * commit 'fc69de0e8ae30e80c1c3c542b156226a75444525': Lib files needed are now copied to a subdirectory in the java/test directory, and on Macs the loader path for libhdf5.xxxs.so is changed in the temporary copy of libhdf5_java.dylib. Fix for HDFFV-11063 --- configure.ac | 7 ++++--- java/test/junit.sh.in | 8 ++++++++ release_docs/RELEASE.txt | 8 +++++++- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 74dd933..632906f 100644 --- a/configure.ac +++ b/configure.ac @@ -1149,12 +1149,13 @@ AC_CHECK_HEADERS([stdint.h], [C9x=yes]) AC_CHECK_HEADERS([stdbool.h]) ## Darwin -AC_CHECK_HEADERS([mach/mach_time.h]) -## Also need to detect Darwin for pubconf +AC_SUBST([H5_IS_DARWIN]) +H5_IS_DARWIN="no" case $host_os in darwin*) AC_DEFINE([HAVE_DARWIN], [1], [Define if Darwin or Mac OS X]) - ;; + H5_IS_DARWIN="yes" + ;; esac ## Windows diff --git a/java/test/junit.sh.in b/java/test/junit.sh.in index 125ea46..1a6a5c8 100644 --- a/java/test/junit.sh.in +++ b/java/test/junit.sh.in @@ -21,6 +21,7 @@ USE_FILTER_SZIP="@USE_FILTER_SZIP@" USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@" USE_ROS3_VFD="@HAVE_ROS3_VFD@" USE_HDFS_VFD="@HAVE_LIBHDFS@" +IS_DARWIN="@H5_IS_DARWIN@" TESTNAME=JUnitInterface EXIT_SUCCESS=0 @@ -145,6 +146,13 @@ COPY_LIBFILES_TO_BLDLIBDIR() fi fi done + if [ "$IS_DARWIN" = "yes" ]; then + (cd testlibs; \ + 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.1000.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/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index ab601f5..7241567 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -530,7 +530,13 @@ Bug Fixes since HDF5-1.10.5 release Testing ------- - - + - Stopped java/test/junit.sh.in installing libs for testing under ${prefix} + + Lib files needed are now copied to a subdirectory in the java/test + directory, and on Macs the loader path for libhdf5.xxxs.so is changed + in the temporary copy of libhdf5_java.dylib. + + (LRK, 2020/7/2, HDFFV-11063) Supported Platforms -- cgit v0.12 From 713b575c24a07499b58b392ea0e95cab81fda633 Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Mon, 29 Jun 2020 21:18:27 -0500 Subject: Merge pull request #2667 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:develop to develop * commit '32c483cb86031962a09ecdb49dcb331d28dddee9': Copy lib files for junit.sh to temporary subdirectory of /java/test instead of to the prefix/lib directory. Fix for HDFFV-11063. --- java/test/junit.sh.in | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/java/test/junit.sh.in b/java/test/junit.sh.in index 1a6a5c8..75e9f88 100644 --- a/java/test/junit.sh.in +++ b/java/test/junit.sh.in @@ -15,7 +15,6 @@ top_builddir=@top_builddir@ top_srcdir=@top_srcdir@ srcdir=@srcdir@ -prefix=@prefix@ USE_FILTER_SZIP="@USE_FILTER_SZIP@" USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@" @@ -44,8 +43,8 @@ myos=`uname -s` # where the libs exist HDFLIB_HOME="$top_srcdir/java/lib" -BLDLIBDIR="$prefix/lib" BLDDIR="." +BLDLIBDIR="$BLDDIR/testlibs" HDFTEST_HOME="$top_srcdir/java/test" JARFILE=jar@PACKAGE_TARNAME@-@PACKAGE_VERSION@.jar TESTJARFILE=jar@PACKAGE_TARNAME@test.jar @@ -211,10 +210,7 @@ CLEAN_LIBFILES_AND_BLDLIBDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - for tstfile in $COPY_JARTESTFILES - do - $RM $BLDLIBDIR/tstfile - done + $RM -rf $BLDLIBDIR fi } -- cgit v0.12 From c0702f601eb4e0b4116a7ed02999746c20420cad Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Tue, 7 Jul 2020 10:48:08 -0500 Subject: Change load path in libhdf5_java.dylib to unversioned libhdf5.dylib for junit tests on Macs. --- java/test/junit.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/test/junit.sh.in b/java/test/junit.sh.in index 75e9f88..a074e30 100644 --- a/java/test/junit.sh.in +++ b/java/test/junit.sh.in @@ -150,7 +150,7 @@ COPY_LIBFILES_TO_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.1000.dylib libhdf5_java.dylib) + 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 -- cgit v0.12