1 The Java HDF5 interface library and the accompanying hdf5_java.dll JNI library
\r
2 are built without both separately licensed ZLIB and SZIP open source libraries.
\r
3 The native library (DLL) has been compiled with Visual Studio 2015 and dynamic
\r
6 ## Building HDF5 Linux native libraries
\r
8 Current libraries have been using the 1.10.2 source code release.
\r
10 * Get source code from https://www.hdfgroup.org/downloads/hdf5/source-code/
\r
11 * The configure-version, not the CMake source
\r
13 * Extract source code package
\r
15 * According to the build instructions at
\r
16 https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.2/src/unpacked/release_docs/INSTALL
\r
17 configure the source using:
\r
19 ./configure --enable-java --enable-build-mode=production --without-zlib --without-szlib --disable-sharedlib-rpath
\r
21 and you'll get a listing like this in the end:
\r
24 SUMMARY OF THE HDF5 CONFIGURATION
\r
25 =================================
\r
27 General Information:
\r
29 HDF5 Version: 1.10.2
\r
30 Configured on: Fri Apr 6 15:13:51 EEST 2018
\r
31 Configured by: lehtonen@dev2
\r
32 Host system: x86_64-unknown-linux-gnu
\r
33 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
34 Byte sex: little-endian
\r
35 Installation point: /home/lehtonen/hdf/hdf5-1.10.2/hdf5
\r
39 Build Mode: production
\r
40 Debugging Symbols: no
\r
43 Optimization Level: high
\r
47 Libraries: static, shared
\r
48 Statically Linked Executables:
\r
52 Extra libraries: -ldl -lm
\r
60 C Compiler: /usr/bin/gcc
\r
62 H5_CPPFLAGS: -D_GNU_SOURCE -D_POSIX_C_SOURCE=200112L -DNDEBUG -UH5_DEBUG_API
\r
65 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
67 Shared C Library: yes
\r
68 Static C Library: yes
\r
76 Java Compiler: /usr/bin/java (openjdk 1.8.0_162)
\r
82 High-level library: yes
\r
84 Default API mapping: v110
\r
85 With deprecated public symbols: yes
\r
86 I/O filters (external):
\r
90 Packages w/ extra debug output: none
\r
92 Using memory checker: no
\r
93 Memory allocation sanity checks: no
\r
94 Metadata trace file: no
\r
95 Function stack tracing: no
\r
96 Strict file format checks: no
\r
97 Optimization instrumentation: no
\r
101 * Build the library and utilities: `make -j -l6`
\r
103 * Copy the artifacts from the source tree into this directory:
\r
104 * Hdf5 library: `hdf5-1.10.2/src/.libs/libhdf5.so.101`
\r
105 * Hdf5 JNI library: `hdf5-1.10.2/java/src/jni/.libs/libhdf5_java.so`
\r
108 * Linux .so files do not automatically look at the same directory they exist in for required .so files.
\r
109 * We can add this behaviour with the "patchelf" commandline tool:
\r
110 * apt-get update && apt-get install patchelf
\r
111 * patchelf --set-rpath \$ORIGIN libhdf5_java.so
\r
113 ## Building HDF5 Windows native libraries
\r
115 * Get CMake source code for Windows from https://www.hdfgroup.org/downloads/hdf5/source-code/#cmake
\r
116 * Build instructions are at https://portal.hdfgroup.org/display/support/Building+HDF5+with+CMake
\r
118 Here's our version in a nutshell:
\r
120 * Unpack CMake-hdf5-1.10.2.zip and step into the extracted directory
\r
121 * Edit HDF5options.cmake
\r
124 set(CTEST_BUILD_CONFIGURATION "Release")
\r
126 * Build shared libraries:
\r
128 set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=ON")
\r
130 * Disable C++ library:
\r
132 set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=OFF")
\r
136 #############################################################################################
\r
137 #### java enabled ####
\r
138 set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=ON")
\r
139 #### java disabled ####
\r
140 #set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=OFF")
\r
142 * Disable zlib and szip
\r
144 ### disable ext zlib building
\r
145 set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF")
\r
146 ### disable ext szip building
\r
147 set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF")
\r
148 set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_ENCODING:BOOL=OFF")
\r
150 * Disable packaging
\r
152 #############################################################################################
\r
153 ### disable packaging
\r
155 set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_NO_PACKAGES:BOOL=ON")
\r
156 ### Create install package with external libraries (szip, zlib)
\r
157 #set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_EXTLIBS:BOOL=ON")
\r
159 * Run build-VS2015-64.bat and wait
\r
160 * Copy build\bin\hdf5_java.dll into this directory