]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Merge "Refactoring CHR handling code"
authorHannu Niemistö <hannu.niemisto@semantum.fi>
Thu, 12 Apr 2018 10:04:44 +0000 (13:04 +0300)
committerGerrit Code Review <gerrit2@www.simantics.org>
Thu, 12 Apr 2018 10:04:44 +0000 (13:04 +0300)
15 files changed:
bundles/hdf.hdf5lib/.classpath
bundles/hdf.hdf5lib/META-INF/MANIFEST.MF
bundles/hdf.hdf5lib/README.md
bundles/hdf.hdf5lib/about.html
bundles/hdf.hdf5lib/build.properties
bundles/hdf.hdf5lib/hdf5-src.zip [new file with mode: 0644]
bundles/hdf.hdf5lib/hdf5_java.dll
bundles/hdf.hdf5lib/jarhdf5-1.10.0.jar [deleted file]
bundles/hdf.hdf5lib/jarhdf5-1.10.2.jar [new file with mode: 0644]
bundles/hdf.hdf5lib/libhdf5.so.101 [new file with mode: 0755]
bundles/hdf.hdf5lib/libhdf5_java.so [new file with mode: 0755]
bundles/hdf.hdf5lib/pom.xml
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/DisposingPolicy.java
bundles/org.simantics.scenegraph/lib/svgSalamander-tiny.jar
features/hdf.hdf5.feature/feature.xml

index 3d562776027966d08664beeea98c9f572d6e2f61..f0eb4b56abb59f7d0032b4434b70a25c10865c25 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>\r
 <classpath>\r
-       <classpathentry exported="true" kind="lib" path="jarhdf5-1.10.0.jar" sourcepath="C:/work/hdf5/CMake-hdf5-1.10.0-patch1/hdf5-1.10.0-patch1/java/src"/>\r
+       <classpathentry exported="true" kind="lib" path="jarhdf5-1.10.2.jar" sourcepath="hdf5-src.zip"/>\r
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>\r
        <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
        <classpathentry kind="src" path="src"/>\r
index c7ef8a4dad92a5cf1cc0717f5cc298e7174005c8..566d3bad20318ff7d2a6b4e43a15e83584586d1a 100644 (file)
@@ -2,14 +2,16 @@ 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
+Eclipse-BundleShape: dir
 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"
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
-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
index 80b486768c4019eac9661c007b3ddb213e37877b..af353e432bcd31b844301226ac59f2829314b5d6 100644 (file)
@@ -7,16 +7,16 @@
 <body lang="EN-US">\r
 <h2>About This Content</h2>\r
  \r
-<p>August 29th, 2016</p>\r
+<p>April 9th, 2018</p>\r
 <h3>License</h3>\r
 \r
                <h3>Third Party Content</h3>\r
                <p>The Content includes items that have been sourced from third parties as set out below.</p>\r
                <p><em>\r
-               <strong>Java HDF5 Interface (JHI5), version 1.10.0-patch1</strong> <br><br>\r
+               <strong>Java HDF5 Interface (JHI5), version 1.10.2</strong> <br><br>\r
                        This library has been obtained from the HDF Group\r
-                       (https://www.hdfgroup.org/HDF5/release/obtain5110.html) unmodified.\r
+                       (https://www.hdfgroup.org/downloads/hdf5/) unmodified.\r
                        See file COPYING for more information on the license.\r
                </em></p>\r
 \r
-</body></html>
\ No newline at end of file
+</body></html>\r
index 4a873ef6e7eabf20f4a18f14f43699b8298cfb97..391232811d490a469de0fc618a6c65b53e3b7542 100644 (file)
@@ -2,8 +2,10 @@ source.. = src/
 output.. = bin/\r
 bin.includes = META-INF/,\\r
                .,\\r
-               jarhdf5-1.10.0.jar,\\r
+               jarhdf5-1.10.2.jar,\\r
                hdf5_java.dll,\\r
+               libhdf5.so.101,\\r
+               libhdf5_java.so,\\r
                COPYING,\\r
                README.md,\\r
                about.html\r
diff --git a/bundles/hdf.hdf5lib/hdf5-src.zip b/bundles/hdf.hdf5lib/hdf5-src.zip
new file mode 100644 (file)
index 0000000..8004458
Binary files /dev/null and b/bundles/hdf.hdf5lib/hdf5-src.zip differ
index aed8a77059043d50dfbd09adfbe3f80deb16e6c1..915096b8e8d4fb31cf449af0418ff492bfefbb4e 100644 (file)
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 (file)
index 1fcdb32..0000000
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 (file)
index 0000000..780a5c1
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 (executable)
index 0000000..7f0641e
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 (executable)
index 0000000..1ce6a1f
Binary files /dev/null and b/bundles/hdf.hdf5lib/libhdf5_java.so differ
index 5c00b7ab1431a1705abd6fb42033ec54174caceb..a64ceb4bc52c838a329abfe0fbf087273d83bc7c 100644 (file)
@@ -3,7 +3,7 @@
        <modelVersion>4.0.0</modelVersion>
        <artifactId>hdf.hdf5lib</artifactId>
        <packaging>eclipse-plugin</packaging>
-       <version>1.10.0.patch1</version>
+       <version>1.10.2</version>
 
        <parent>
                <groupId>org.simantics</groupId>
                                                        <os>win32</os>
                                                        <arch>x86_64</arch>
                                                </environment>
+                                               <environment>
+                                                       <os>linux</os>
+                                                       <arch>x86_64</arch>
+                                               </environment>
                                        </environments>
                                </configuration>
                        </plugin>
                </plugins>
        </build>
 
-</project>
\ No newline at end of file
+</project>
index 9e9b7418bce5cbf069e6d512fa2c9c0a1402e481..b1778a3420cabe8b93259d9935f070761890a27e 100644 (file)
@@ -15,10 +15,9 @@ public class DisposingPolicy {
     public static final long DISPOSE_TIME = 30000L; // ms
     public static final long MIN_DELAY = 200L; // ms
 
-    private final int maxQueueLength;
-    private ArrayDeque<Runnable> disposerQueue = new ArrayDeque<Runnable>(MAX_QUEUE_LENGTH);
-    private TObjectLongHashMap<Runnable> disposeTime =
-            new TObjectLongHashMap<Runnable>(MAX_QUEUE_LENGTH);
+    private volatile int maxQueueLength;
+    private ArrayDeque<Runnable> disposerQueue;
+    private TObjectLongHashMap<Runnable> disposeTime;
     private Runnable currentlyScheduled = null;
 
     private Runnable disposeOne = () -> {
@@ -35,11 +34,17 @@ public class DisposingPolicy {
     };
 
     public DisposingPolicy() {
-       this(MAX_QUEUE_LENGTH);
+        this(MAX_QUEUE_LENGTH);
     }
 
     public DisposingPolicy(int maxQueueLength) {
         this.maxQueueLength = maxQueueLength;
+        this.disposerQueue = new ArrayDeque<>(maxQueueLength);
+        this.disposeTime = new TObjectLongHashMap<>(maxQueueLength);
+    }
+
+    public void setMaxQueueLength(int maxQueueLength) {
+        this.maxQueueLength = maxQueueLength;
     }
 
     private void scheduleDispose() {
index 950d053380a67827fd7bd5a04e4e59463da8fda4..0fede7cb0f3d5870ec0d2f8c6170b168f441cac5 100644 (file)
Binary files a/bundles/org.simantics.scenegraph/lib/svgSalamander-tiny.jar and b/bundles/org.simantics.scenegraph/lib/svgSalamander-tiny.jar differ
index d0cd9a1d5eb3fd0d8096a7b70fa244fe75bc22f5..a1a1b3177da22a7a570354bf6feeb5cb89dbb3a9 100644 (file)
@@ -2,7 +2,7 @@
 <feature
       id="hdf.hdf5"
       label="HDF5 for Java"
-      version="1.10.0.patch1"
+      version="1.10.2"
       provider-name="Semantum Oy">
 
    <description>
@@ -118,11 +118,10 @@ in HDF Products” (www.hdfgroup.org/doc_resource/SZIP/) for further details.
 
    <plugin
          id="hdf.hdf5lib"
-         os="win32"
+         os="linux,win32"
          arch="x86_64"
          download-size="0"
          install-size="0"
-         version="0.0.0"
-         unpack="false"/>
+         version="0.0.0"/>
 
 </feature>