]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/hdf.hdf5lib/README.md
Upgraded HDF5 library to 1.10.2 and added linux support
[simantics/platform.git] / bundles / hdf.hdf5lib / README.md
index ea6445a44ea8d153fa3e306a29ebf2197bd94d1f..a7a2b9aa73ac2d0b59db3737e2bc396e8e56a8ae 100644 (file)
@@ -1,4 +1,160 @@
 The Java HDF5 interface library and the accompanying hdf5_java.dll JNI library\r
 are built without both separately licensed ZLIB and SZIP open source libraries.\r
 The native library (DLL) has been compiled with Visual Studio 2015 and dynamic\r
 The Java HDF5 interface library and the accompanying hdf5_java.dll JNI library\r
 are built without both separately licensed ZLIB and SZIP open source libraries.\r
 The native library (DLL) has been compiled with Visual Studio 2015 and dynamic\r
-linking.
\ No newline at end of file
+linking.\r
+\r
+## Building HDF5 Linux native libraries\r
+\r
+Current libraries have been using the 1.10.2 source code release.\r
+\r
+* Get source code from https://www.hdfgroup.org/downloads/hdf5/source-code/\r
+  * The configure-version, not the CMake source\r
+\r
+* Extract source code package\r
+\r
+* According to the build instructions at\r
+  https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.2/src/unpacked/release_docs/INSTALL\r
+  configure the source using:\r
+\r
+      ./configure --enable-java --enable-build-mode=production --without-zlib --without-szlib --disable-sharedlib-rpath\r
+\r
+  and you'll get a listing like this in the end:\r
+\r
+~~~\r
+            SUMMARY OF THE HDF5 CONFIGURATION\r
+            =================================\r
+\r
+General Information:\r
+-------------------\r
+                   HDF5 Version: 1.10.2\r
+                  Configured on: Fri Apr  6 15:13:51 EEST 2018\r
+                  Configured by: lehtonen@dev2\r
+                    Host system: x86_64-unknown-linux-gnu\r
+              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\r
+                       Byte sex: little-endian\r
+             Installation point: /home/lehtonen/hdf/hdf5-1.10.2/hdf5\r
+\r
+Compiling Options:\r
+------------------\r
+                     Build Mode: production\r
+              Debugging Symbols: no\r
+                        Asserts: no\r
+                      Profiling: no\r
+             Optimization Level: high\r
+\r
+Linking Options:\r
+----------------\r
+                      Libraries: static, shared\r
+  Statically Linked Executables:\r
+                        LDFLAGS:\r
+                     H5_LDFLAGS:\r
+                     AM_LDFLAGS:\r
+                Extra libraries: -ldl -lm\r
+                       Archiver: ar\r
+                       AR_FLAGS: cr\r
+                         Ranlib: ranlib\r
+                                                \r
+Languages:\r
+----------\r
+                              C: yes\r
+                     C Compiler: /usr/bin/gcc\r
+                       CPPFLAGS:\r
+                    H5_CPPFLAGS: -D_GNU_SOURCE -D_POSIX_C_SOURCE=200112L   -DNDEBUG -UH5_DEBUG_API\r
+                    AM_CPPFLAGS:\r
+                        C Flags:\r
+                     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\r
+                     AM C Flags:\r
+               Shared C Library: yes\r
+               Static C Library: yes\r
+\r
+\r
+                        Fortran: no\r
+\r
+                            C++: no\r
+\r
+                           Java: yes\r
+                  Java Compiler: /usr/bin/java (openjdk 1.8.0_162)\r
+\r
+\r
+Features:\r
+---------\r
+                  Parallel HDF5: no\r
+             High-level library: yes\r
+                   Threadsafety: no\r
+            Default API mapping: v110\r
+ With deprecated public symbols: yes\r
+         I/O filters (external):\r
+                            MPE: no\r
+                     Direct VFD: no\r
+                        dmalloc: no\r
+ Packages w/ extra debug output: none\r
+                    API tracing: no\r
+           Using memory checker: no\r
+Memory allocation sanity checks: no\r
+            Metadata trace file: no\r
+         Function stack tracing: no\r
+      Strict file format checks: no\r
+   Optimization instrumentation: no\r
+\r
+~~~\r
+\r
+* Build the library and utilities: `make -j -l6`\r
+\r
+* Copy the artifacts from the source tree into this directory:\r
+  * Hdf5 library: `hdf5-1.10.2/src/.libs/libhdf5.so.101`\r
+  * Hdf5 JNI library: `hdf5-1.10.2/java/src/jni/.libs/libhdf5_java.so`\r
+\r
+* IMPORTANT:\r
+  * Linux .so files do not automatically look at the same directory they exist in for required .so files.\r
+  * We can add this behaviour with the "patchelf" commandline tool:\r
+  * apt-get update && apt-get install patchelf\r
+  * patchelf --set-rpath \$ORIGIN libhdf5_java.so\r
+\r
+## Building HDF5 Windows native libraries\r
+\r
+* Get CMake source code for Windows from https://www.hdfgroup.org/downloads/hdf5/source-code/#cmake\r
+* Build instructions are at https://portal.hdfgroup.org/display/support/Building+HDF5+with+CMake\r
+  \r
+Here's our version in a nutshell:\r
+  \r
+* Unpack CMake-hdf5-1.10.2.zip and step into the extracted directory \r
+* Edit HDF5options.cmake\r
+  * Release build\r
+    ~~~\r
+    set(CTEST_BUILD_CONFIGURATION "Release")\r
+    ~~~\r
+  * Build shared libraries:\r
+    ~~~\r
+    set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=ON")\r
+    ~~~\r
+  * Disable C++ library:\r
+    ~~~\r
+    set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=OFF")\r
+    ~~~\r
+  * Enable Java:\r
+    ~~~\r
+    #############################################################################################\r
+    ####      java enabled      ####\r
+    set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=ON")\r
+    ####      java disabled      ####\r
+    #set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=OFF")\r
+    ~~~\r
+  * Disable zlib and szip\r
+    ~~~\r
+       ### disable ext zlib building\r
+    set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF")\r
+    ### disable ext szip building\r
+    set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF")\r
+    set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_ENCODING:BOOL=OFF")\r
+       ~~~\r
+  * Disable packaging\r
+    ~~~\r
+    #############################################################################################\r
+    ### disable packaging\r
+\r
+    set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_NO_PACKAGES:BOOL=ON")\r
+    ### Create install package with external libraries (szip, zlib)\r
+    #set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_EXTLIBS:BOOL=ON")\r
+    ~~~\r
+* Run build-VS2015-64.bat and wait\r
+* Copy build\bin\hdf5_java.dll into this directory
\ No newline at end of file