]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/hdf.hdf5lib/README.md
Importing of spreadsheets
[simantics/platform.git] / bundles / hdf.hdf5lib / README.md
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
4 linking.\r
5 \r
6 ## Building HDF5 Linux native libraries\r
7 \r
8 Current libraries have been using the 1.10.2 source code release.\r
9 \r
10 * Get source code from https://www.hdfgroup.org/downloads/hdf5/source-code/\r
11   * The configure-version, not the CMake source\r
12 \r
13 * Extract source code package\r
14 \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
18 \r
19       ./configure --enable-java --enable-build-mode=production --without-zlib --without-szlib --disable-sharedlib-rpath\r
20 \r
21   and you'll get a listing like this in the end:\r
22 \r
23 ~~~\r
24             SUMMARY OF THE HDF5 CONFIGURATION\r
25             =================================\r
26 \r
27 General Information:\r
28 -------------------\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
36 \r
37 Compiling Options:\r
38 ------------------\r
39                      Build Mode: production\r
40               Debugging Symbols: no\r
41                         Asserts: no\r
42                       Profiling: no\r
43              Optimization Level: high\r
44 \r
45 Linking Options:\r
46 ----------------\r
47                       Libraries: static, shared\r
48   Statically Linked Executables:\r
49                         LDFLAGS:\r
50                      H5_LDFLAGS:\r
51                      AM_LDFLAGS:\r
52                 Extra libraries: -ldl -lm\r
53                        Archiver: ar\r
54                        AR_FLAGS: cr\r
55                          Ranlib: ranlib\r
56                                                  \r
57 Languages:\r
58 ----------\r
59                               C: yes\r
60                      C Compiler: /usr/bin/gcc\r
61                        CPPFLAGS:\r
62                     H5_CPPFLAGS: -D_GNU_SOURCE -D_POSIX_C_SOURCE=200112L   -DNDEBUG -UH5_DEBUG_API\r
63                     AM_CPPFLAGS:\r
64                         C Flags:\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
66                      AM C Flags:\r
67                Shared C Library: yes\r
68                Static C Library: yes\r
69 \r
70 \r
71                         Fortran: no\r
72 \r
73                             C++: no\r
74 \r
75                            Java: yes\r
76                   Java Compiler: /usr/bin/java (openjdk 1.8.0_162)\r
77 \r
78 \r
79 Features:\r
80 ---------\r
81                   Parallel HDF5: no\r
82              High-level library: yes\r
83                    Threadsafety: no\r
84             Default API mapping: v110\r
85  With deprecated public symbols: yes\r
86          I/O filters (external):\r
87                             MPE: no\r
88                      Direct VFD: no\r
89                         dmalloc: no\r
90  Packages w/ extra debug output: none\r
91                     API tracing: no\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
98 \r
99 ~~~\r
100 \r
101 * Build the library and utilities: `make -j -l6`\r
102 \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
106 \r
107 * IMPORTANT:\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
112 \r
113 ## Building HDF5 Windows native libraries\r
114 \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
117   \r
118 Here's our version in a nutshell:\r
119   \r
120 * Unpack CMake-hdf5-1.10.2.zip and step into the extracted directory \r
121 * Edit HDF5options.cmake\r
122   * Release build\r
123     ~~~\r
124     set(CTEST_BUILD_CONFIGURATION "Release")\r
125     ~~~\r
126   * Build shared libraries:\r
127     ~~~\r
128     set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=ON")\r
129     ~~~\r
130   * Disable C++ library:\r
131     ~~~\r
132     set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=OFF")\r
133     ~~~\r
134   * Enable Java:\r
135     ~~~\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
141     ~~~\r
142   * Disable zlib and szip\r
143     ~~~\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
149         ~~~\r
150   * Disable packaging\r
151     ~~~\r
152     #############################################################################################\r
153     ### disable packaging\r
154 \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
158     ~~~\r
159 * Run build-VS2015-64.bat and wait\r
160 * Copy build\bin\hdf5_java.dll into this directory