Closed bogovicj closed 1 year ago
We have aarch64-Mac OS X
(M1 chip) and aarch64-Linux
built here:
https://github.com/JaneliaSciComp/jhdf5/tree/aarch64/libs/native/jhdf5
I've also split the hdf5
and jhdf5
libraries apart and added H5Zblosc
and blosc
here:
https://github.com/JaneliaSciComp/jhdf5/tree/mkitti/jhdf5plugin/libs/native
The error "No suitable HDF5 native library found for this platform" seems like a direct quote from here: https://github.com/JaneliaSciComp/jhdf5/blob/c5ec30f8267bec2b995f05a7bcc6e4f01e11a0f0/source/java/hdf/hdf5lib/H5.java#L240
@mzouink previously raised this issue: https://github.com/bigdataviewer/bigdataviewer-core/issues/135
For the M1 specifically, one can bypass this issue by using a x86_64 Java runtime. For example, FIJI is currently distributed with a x86_64 JRE.
Regarding blosc distribution, we should consider an architecture aware platform detection system for native binaries.
The NativeLibraryUtilities class in sis-base seems to be working well so far. It also has caching and override options. https://sissource.ethz.ch/sispub/base/-/blob/master/source/java/ch/systemsx/cisd/base/utilities/NativeLibraryUtilities.java
I worked with @mzouink on this yesterday.
I just checked the files installed by brew install hdf5
on my Mac Studio. I do not see any JNI bindings present there. For a standard HDF5 build it should be libhdf5_java.200.dylib
. Technically though JHDF5 builds its own version of the bindings.
% brew list hdf5
/opt/homebrew/Cellar/hdf5/1.12.2/bin/gif2h5
/opt/homebrew/Cellar/hdf5/1.12.2/bin/h52gif
/opt/homebrew/Cellar/hdf5/1.12.2/bin/h5c++
/opt/homebrew/Cellar/hdf5/1.12.2/bin/h5cc
/opt/homebrew/Cellar/hdf5/1.12.2/bin/h5clear
/opt/homebrew/Cellar/hdf5/1.12.2/bin/h5copy
/opt/homebrew/Cellar/hdf5/1.12.2/bin/h5debug
/opt/homebrew/Cellar/hdf5/1.12.2/bin/h5diff
/opt/homebrew/Cellar/hdf5/1.12.2/bin/h5dump
/opt/homebrew/Cellar/hdf5/1.12.2/bin/h5fc
/opt/homebrew/Cellar/hdf5/1.12.2/bin/h5format_convert
/opt/homebrew/Cellar/hdf5/1.12.2/bin/h5import
/opt/homebrew/Cellar/hdf5/1.12.2/bin/h5jam
/opt/homebrew/Cellar/hdf5/1.12.2/bin/h5ls
/opt/homebrew/Cellar/hdf5/1.12.2/bin/h5mkgrp
/opt/homebrew/Cellar/hdf5/1.12.2/bin/h5perf_serial
/opt/homebrew/Cellar/hdf5/1.12.2/bin/h5redeploy
/opt/homebrew/Cellar/hdf5/1.12.2/bin/h5repack
/opt/homebrew/Cellar/hdf5/1.12.2/bin/h5repart
/opt/homebrew/Cellar/hdf5/1.12.2/bin/h5stat
/opt/homebrew/Cellar/hdf5/1.12.2/bin/h5unjam
/opt/homebrew/Cellar/hdf5/1.12.2/bin/h5watch
/opt/homebrew/Cellar/hdf5/1.12.2/include/ (119 files)
/opt/homebrew/Cellar/hdf5/1.12.2/lib/libhdf5.200.dylib
/opt/homebrew/Cellar/hdf5/1.12.2/lib/libhdf5_cpp.200.dylib
/opt/homebrew/Cellar/hdf5/1.12.2/lib/libhdf5_fortran.200.dylib
/opt/homebrew/Cellar/hdf5/1.12.2/lib/libhdf5_hl.200.dylib
/opt/homebrew/Cellar/hdf5/1.12.2/lib/libhdf5_hl_cpp.200.dylib
/opt/homebrew/Cellar/hdf5/1.12.2/lib/libhdf5hl_fortran.200.dylib
/opt/homebrew/Cellar/hdf5/1.12.2/lib/ (13 other files)
/opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5/libhdf5.settings
/opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/ (108 files)
This is what I needed to get this to work on my Mac Studio.
n5-hdf5
1.4.2 needs a release.cisd.jhdf5.version
since the pom-scijava has not caught up yet.n5-utils % git diff
diff --git a/pom.xml b/pom.xml
index 00f4cb4..00f38e4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.scijava</groupId>
<artifactId>pom-scijava</artifactId>
- <version>29.2.1</version>
+ <version>31.1.0</version>
</parent>
<groupId>org.janelia.saalfeldlab</groupId>
@@ -114,14 +114,16 @@
<maven-enforcer-plugin.version>3.0.0-M3</maven-enforcer-plugin.version>
<jacoco-maven-plugin.version>0.8.6</jacoco-maven-plugin.version>
+ <cisd.jhdf5.version>19.04.0</cisd.jhdf5.version>
<n5.version>2.4.0</n5.version>
<n5-imglib2.version>3.5.1</n5-imglib2.version>
- <n5-hdf5.version>1.2.0</n5-hdf5.version>
+ <n5-hdf5.version>1.4.2-SNAPSHOT</n5-hdf5.version>
<n5-aws-s3.version>3.2.0</n5-aws-s3.version>
<n5-blosc.version>1.1.0</n5-blosc.version>
<n5-zarr.version>0.0.6</n5-zarr.version>
<n5-jpeg.version>0.0.1-beta1</n5-jpeg.version>
<n5-google-cloud>3.3.1</n5-google-cloud>
+ <scijava.surefire.args>-Dnative.libpath.jhdf5="/Users/kittisopikulm/Documents/src/jhdf5/libs/native/jhdf5/aarch64-Mac OS X/libjhdf5.jnilib" -Dnative.libpath.verbose=true</scijava.surefire.args>
</properties>
<dependencies>
@@ -207,6 +209,12 @@
<artifactId>n5-jpeg</artifactId>
<version>${n5-jpeg.version}</version>
</dependency>
+
+ <dependency>
+ <groupId>cisd</groupId>
+ <artifactId>jhdf5</artifactId>
+ <version>${cisd.jhdf5.version}</version>
+ </dependency>
</dependencies>
Thanks! I do not know how to deal with this:
<scijava.surefire.args>-Dnative.libpath.jhdf5="/Users/kittisopikulm/Documents/src/jhdf5/libs/native/jhdf5/aarch64-Mac OS X/libjhdf5.jnilib" -Dnative.libpath.verbose=true</scijava.surefire.args>
Is this still necessary with pom-scijava=33.2.0
? The other versions roll up nicely. Can you please test on MX Mac @mkitti @cmhulbert ?
pom-scijava 32.0.0 should include jhdf5 19.04.1 which has M1 binaries.
Upstream commit I worked on with @mzouink https://sissource.ethz.ch/sispub/jhdf5/-/commit/ecc1cfb7a1f8dab428906c874e3e7b407b450f77
Tested by @jni, thanks a billion times for the fix @mkitti!
after
brew install hdf5
, the installation script andmvn clean install
both yield test failures:found by @avweigel