From: Tuukka Lehtonen Date: Sun, 8 Apr 2018 22:01:52 +0000 (+0300) Subject: Upgraded HDF5 library to 1.10.2 and added linux support X-Git-Tag: v1.43.0~136^2~500 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=ce3c9f00e2cd5a41c668afb699f294897b6c4b66;p=simantics%2Fplatform.git Upgraded HDF5 library to 1.10.2 and added linux support Amend by Miro: Ran patchelf -set-rpath \$ORIGIN libhdf5_java.so and updated README refs #7858 Change-Id: Ibe6d56443b8d02c4e2896adaed9b76f86e042f6e --- diff --git a/bundles/hdf.hdf5lib/.classpath b/bundles/hdf.hdf5lib/.classpath index 3d5627760..f0eb4b56a 100644 --- a/bundles/hdf.hdf5lib/.classpath +++ b/bundles/hdf.hdf5lib/.classpath @@ -1,6 +1,6 @@ - + diff --git a/bundles/hdf.hdf5lib/META-INF/MANIFEST.MF b/bundles/hdf.hdf5lib/META-INF/MANIFEST.MF index c7ef8a4da..91af25057 100644 --- a/bundles/hdf.hdf5lib/META-INF/MANIFEST.MF +++ b/bundles/hdf.hdf5lib/META-INF/MANIFEST.MF @@ -2,14 +2,15 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Java HDF5 Interface (JHI5) Bundle-SymbolicName: hdf.hdf5lib -Bundle-Version: 1.10.0.patch1 +Bundle-Version: 1.10.2 Bundle-Vendor: Semantum Oy Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ClassPath: ., - jarhdf5-1.10.0.jar + jarhdf5-1.10.2.jar Export-Package: hdf.hdf5lib, hdf.hdf5lib.callbacks, hdf.hdf5lib.exceptions, hdf.hdf5lib.structs -Bundle-NativeCode: hdf5_java.dll; processor=x86_64; osname=win32 +Bundle-NativeCode: hdf5_java.dll; processor=x86_64; osname=win32, + libhdf5.so.101; libhdf5_java.so; processor=x86_64; osname=linux Require-Bundle: org.slf4j.api;bundle-version="1.7.2" diff --git a/bundles/hdf.hdf5lib/README.md b/bundles/hdf.hdf5lib/README.md index ea6445a44..a7a2b9aa7 100644 --- a/bundles/hdf.hdf5lib/README.md +++ b/bundles/hdf.hdf5lib/README.md @@ -1,4 +1,160 @@ The Java HDF5 interface library and the accompanying hdf5_java.dll JNI library are built without both separately licensed ZLIB and SZIP open source libraries. The native library (DLL) has been compiled with Visual Studio 2015 and dynamic -linking. \ No newline at end of file +linking. + +## Building HDF5 Linux native libraries + +Current libraries have been using the 1.10.2 source code release. + +* Get source code from https://www.hdfgroup.org/downloads/hdf5/source-code/ + * The configure-version, not the CMake source + +* Extract source code package + +* According to the build instructions at + https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.2/src/unpacked/release_docs/INSTALL + configure the source using: + + ./configure --enable-java --enable-build-mode=production --without-zlib --without-szlib --disable-sharedlib-rpath + + and you'll get a listing like this in the end: + +~~~ + SUMMARY OF THE HDF5 CONFIGURATION + ================================= + +General Information: +------------------- + HDF5 Version: 1.10.2 + Configured on: Fri Apr 6 15:13:51 EEST 2018 + Configured by: lehtonen@dev2 + Host system: x86_64-unknown-linux-gnu + Uname information: Linux dev2 4.4.0-96-generic #119-Ubuntu SMP Tue Sep 12 14:59:54 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux + Byte sex: little-endian + Installation point: /home/lehtonen/hdf/hdf5-1.10.2/hdf5 + +Compiling Options: +------------------ + Build Mode: production + Debugging Symbols: no + Asserts: no + Profiling: no + Optimization Level: high + +Linking Options: +---------------- + Libraries: static, shared + Statically Linked Executables: + LDFLAGS: + H5_LDFLAGS: + AM_LDFLAGS: + Extra libraries: -ldl -lm + Archiver: ar + AR_FLAGS: cr + Ranlib: ranlib + +Languages: +---------- + C: yes + C Compiler: /usr/bin/gcc + CPPFLAGS: + H5_CPPFLAGS: -D_GNU_SOURCE -D_POSIX_C_SOURCE=200112L -DNDEBUG -UH5_DEBUG_API + AM_CPPFLAGS: + C Flags: + H5 C Flags: -std=c99 -pedantic -Wall -Wextra -Wbad-function-cast -Wc++-compat -Wcast-align -Wcast-qual -Wconversion -Wdeclaration-after-statement -Wdisabled-optimization -Wfloat-equal -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wundef -Wunused-macros -Wunsafe-loop-optimizations -Wwrite-strings -Wlogical-op -Wlarger-than=2048 -Wvla -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat -Wstrict-overflow=5 -Wjump-misses-init -Wunsuffixed-float-constants -Wdouble-promotion -Wtrampolines -Wstack-usage=8192 -Wvector-operation-performance -Wdate-time -Warray-bounds=2 -Wc99-c11-compat -fstdarg-opt -s -Wno-inline -Wno-aggregate-return -Wno-missing-format-attribute -Wno-missing-noreturn -Wno-suggest-attribute=const -Wno-suggest-attribute=pure -Wno-suggest-attribute=noreturn -Wno-suggest-attribute=format -O3 + AM C Flags: + Shared C Library: yes + Static C Library: yes + + + Fortran: no + + C++: no + + Java: yes + Java Compiler: /usr/bin/java (openjdk 1.8.0_162) + + +Features: +--------- + Parallel HDF5: no + High-level library: yes + Threadsafety: no + Default API mapping: v110 + With deprecated public symbols: yes + I/O filters (external): + MPE: no + Direct VFD: no + dmalloc: no + Packages w/ extra debug output: none + API tracing: no + Using memory checker: no +Memory allocation sanity checks: no + Metadata trace file: no + Function stack tracing: no + Strict file format checks: no + Optimization instrumentation: no + +~~~ + +* Build the library and utilities: `make -j -l6` + +* Copy the artifacts from the source tree into this directory: + * Hdf5 library: `hdf5-1.10.2/src/.libs/libhdf5.so.101` + * Hdf5 JNI library: `hdf5-1.10.2/java/src/jni/.libs/libhdf5_java.so` + +* IMPORTANT: + * Linux .so files do not automatically look at the same directory they exist in for required .so files. + * We can add this behaviour with the "patchelf" commandline tool: + * apt-get update && apt-get install patchelf + * patchelf --set-rpath \$ORIGIN libhdf5_java.so + +## Building HDF5 Windows native libraries + +* Get CMake source code for Windows from https://www.hdfgroup.org/downloads/hdf5/source-code/#cmake +* Build instructions are at https://portal.hdfgroup.org/display/support/Building+HDF5+with+CMake + +Here's our version in a nutshell: + +* Unpack CMake-hdf5-1.10.2.zip and step into the extracted directory +* Edit HDF5options.cmake + * Release build + ~~~ + set(CTEST_BUILD_CONFIGURATION "Release") + ~~~ + * Build shared libraries: + ~~~ + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=ON") + ~~~ + * Disable C++ library: + ~~~ + set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=OFF") + ~~~ + * Enable Java: + ~~~ + ############################################################################################# + #### java enabled #### + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=ON") + #### java disabled #### + #set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=OFF") + ~~~ + * Disable zlib and szip + ~~~ + ### disable ext zlib building + set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF") + ### disable ext szip building + 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") + ~~~ + * Disable packaging + ~~~ + ############################################################################################# + ### disable packaging + + set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_NO_PACKAGES:BOOL=ON") + ### Create install package with external libraries (szip, zlib) + #set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_EXTLIBS:BOOL=ON") + ~~~ +* Run build-VS2015-64.bat and wait +* Copy build\bin\hdf5_java.dll into this directory \ No newline at end of file diff --git a/bundles/hdf.hdf5lib/about.html b/bundles/hdf.hdf5lib/about.html index 80b486768..af353e432 100644 --- a/bundles/hdf.hdf5lib/about.html +++ b/bundles/hdf.hdf5lib/about.html @@ -7,16 +7,16 @@

About This Content

-

August 29th, 2016

+

April 9th, 2018

License

Third Party Content

The Content includes items that have been sourced from third parties as set out below.

- Java HDF5 Interface (JHI5), version 1.10.0-patch1

+ Java HDF5 Interface (JHI5), version 1.10.2

This library has been obtained from the HDF Group - (https://www.hdfgroup.org/HDF5/release/obtain5110.html) unmodified. + (https://www.hdfgroup.org/downloads/hdf5/) unmodified. See file COPYING for more information on the license.

- \ No newline at end of file + diff --git a/bundles/hdf.hdf5lib/build.properties b/bundles/hdf.hdf5lib/build.properties index 4a873ef6e..391232811 100644 --- a/bundles/hdf.hdf5lib/build.properties +++ b/bundles/hdf.hdf5lib/build.properties @@ -2,8 +2,10 @@ source.. = src/ output.. = bin/ bin.includes = META-INF/,\ .,\ - jarhdf5-1.10.0.jar,\ + jarhdf5-1.10.2.jar,\ hdf5_java.dll,\ + libhdf5.so.101,\ + libhdf5_java.so,\ COPYING,\ README.md,\ about.html diff --git a/bundles/hdf.hdf5lib/hdf5-src.zip b/bundles/hdf.hdf5lib/hdf5-src.zip new file mode 100644 index 000000000..8004458fd Binary files /dev/null and b/bundles/hdf.hdf5lib/hdf5-src.zip differ diff --git a/bundles/hdf.hdf5lib/hdf5_java.dll b/bundles/hdf.hdf5lib/hdf5_java.dll index aed8a7705..915096b8e 100644 Binary files a/bundles/hdf.hdf5lib/hdf5_java.dll and b/bundles/hdf.hdf5lib/hdf5_java.dll differ diff --git a/bundles/hdf.hdf5lib/jarhdf5-1.10.0.jar b/bundles/hdf.hdf5lib/jarhdf5-1.10.0.jar deleted file mode 100644 index 1fcdb3261..000000000 Binary files a/bundles/hdf.hdf5lib/jarhdf5-1.10.0.jar and /dev/null differ diff --git a/bundles/hdf.hdf5lib/jarhdf5-1.10.2.jar b/bundles/hdf.hdf5lib/jarhdf5-1.10.2.jar new file mode 100644 index 000000000..780a5c1d5 Binary files /dev/null and b/bundles/hdf.hdf5lib/jarhdf5-1.10.2.jar differ diff --git a/bundles/hdf.hdf5lib/libhdf5.so.101 b/bundles/hdf.hdf5lib/libhdf5.so.101 new file mode 100755 index 000000000..7f0641ee9 Binary files /dev/null and b/bundles/hdf.hdf5lib/libhdf5.so.101 differ diff --git a/bundles/hdf.hdf5lib/libhdf5_java.so b/bundles/hdf.hdf5lib/libhdf5_java.so new file mode 100755 index 000000000..1ce6a1f82 Binary files /dev/null and b/bundles/hdf.hdf5lib/libhdf5_java.so differ diff --git a/bundles/hdf.hdf5lib/pom.xml b/bundles/hdf.hdf5lib/pom.xml index 5c00b7ab1..a64ceb4bc 100644 --- a/bundles/hdf.hdf5lib/pom.xml +++ b/bundles/hdf.hdf5lib/pom.xml @@ -3,7 +3,7 @@ 4.0.0 hdf.hdf5lib eclipse-plugin - 1.10.0.patch1 + 1.10.2 org.simantics @@ -23,10 +23,14 @@ win32 x86_64 + + linux + x86_64 + - \ No newline at end of file + diff --git a/features/hdf.hdf5.feature/feature.xml b/features/hdf.hdf5.feature/feature.xml index d0cd9a1d5..0e47915d1 100644 --- a/features/hdf.hdf5.feature/feature.xml +++ b/features/hdf.hdf5.feature/feature.xml @@ -2,7 +2,7 @@ @@ -118,7 +118,7 @@ in HDF Products” (www.hdfgroup.org/doc_resource/SZIP/) for further details.