saalfeldlab / n5-utils

simple standalone BigDataViewer for multiple N5 (or HDF5) datasets
Other
8 stars 16 forks source link

test failures apple m1 (No suitable HDF5 native library found)` #27

Closed bogovicj closed 1 year ago

bogovicj commented 2 years ago

after brew install hdf5, the installation script and mvn clean install both yield test failures:

java.lang.ExceptionInInitializerError
    at org.saalfeldlab.CopyTest.test(CopyTest.java:78)
Caused by: java.lang.UnsupportedOperationException: No suitable HDF5 native library found for this platform.
    at org.saalfeldlab.CopyTest.test(CopyTest.java:78)

[INFO] Running org.saalfeldlab.MiscTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in org.saalfeldlab.MiscTest

found by @avweigel

mkitti commented 2 years 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

mkitti commented 2 years ago

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.

mkitti commented 2 years ago

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

https://unlimited.ethz.ch/display/JHDF/JHDF5+FAQ#JHDF5FAQ-Whataretheoptionstoprovidethenativelibraries?

mkitti commented 2 years ago

I worked with @mzouink on this yesterday.

  1. JBlosc uses JNA and thus needs a libjnidispatch.jnilib compiled for the platform. JNA 5 contains such a binary for aarch64 mac OS. JNA 4 as currently used by scijava does not contain an aarch64 binary for macOS.
  2. Then we need the libblosc.so.1 binary itself.
mkitti commented 2 years ago

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)
`brew list -v hdf5` output ``` % brew list -v hdf5 /opt/homebrew/Cellar/hdf5/1.12.2/INSTALL_RECEIPT.json /opt/homebrew/Cellar/hdf5/1.12.2/bin/h5copy /opt/homebrew/Cellar/hdf5/1.12.2/bin/h52gif /opt/homebrew/Cellar/hdf5/1.12.2/bin/h5perf_serial /opt/homebrew/Cellar/hdf5/1.12.2/bin/h5unjam /opt/homebrew/Cellar/hdf5/1.12.2/bin/h5stat /opt/homebrew/Cellar/hdf5/1.12.2/bin/h5ls /opt/homebrew/Cellar/hdf5/1.12.2/bin/gif2h5 /opt/homebrew/Cellar/hdf5/1.12.2/bin/h5jam /opt/homebrew/Cellar/hdf5/1.12.2/bin/h5cc /opt/homebrew/Cellar/hdf5/1.12.2/bin/h5mkgrp /opt/homebrew/Cellar/hdf5/1.12.2/bin/h5format_convert /opt/homebrew/Cellar/hdf5/1.12.2/bin/h5repack /opt/homebrew/Cellar/hdf5/1.12.2/bin/h5watch /opt/homebrew/Cellar/hdf5/1.12.2/bin/h5c++ /opt/homebrew/Cellar/hdf5/1.12.2/bin/h5diff /opt/homebrew/Cellar/hdf5/1.12.2/bin/h5clear /opt/homebrew/Cellar/hdf5/1.12.2/bin/h5redeploy /opt/homebrew/Cellar/hdf5/1.12.2/bin/h5debug /opt/homebrew/Cellar/hdf5/1.12.2/bin/h5repart /opt/homebrew/Cellar/hdf5/1.12.2/bin/h5import /opt/homebrew/Cellar/hdf5/1.12.2/bin/h5fc /opt/homebrew/Cellar/hdf5/1.12.2/bin/h5dump /opt/homebrew/Cellar/hdf5/1.12.2/.brew/hdf5.rb /opt/homebrew/Cellar/hdf5/1.12.2/include/H5VLconnector_passthru.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5PTpublic.h /opt/homebrew/Cellar/hdf5/1.12.2/include/hdf5.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5CompType.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5IdComponent.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5ArrayType.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5FDmirror.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5Location.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5IntType.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5CommonFG.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5FDmpio.h /opt/homebrew/Cellar/hdf5/1.12.2/include/h5ds.mod /opt/homebrew/Cellar/hdf5/1.12.2/include/hdf5.mod /opt/homebrew/Cellar/hdf5/1.12.2/include/H5AtomType.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5Cpublic.h /opt/homebrew/Cellar/hdf5/1.12.2/include/h5f.mod /opt/homebrew/Cellar/hdf5/1.12.2/include/H5Cpp.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5DataSet.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5VLconnector.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5FDstdio.h /opt/homebrew/Cellar/hdf5/1.12.2/include/h5p.mod /opt/homebrew/Cellar/hdf5/1.12.2/include/h5g.mod /opt/homebrew/Cellar/hdf5/1.12.2/include/h5e.mod /opt/homebrew/Cellar/hdf5/1.12.2/include/H5overflow.h /opt/homebrew/Cellar/hdf5/1.12.2/include/h5r.mod /opt/homebrew/Cellar/hdf5/1.12.2/include/h5lib.mod /opt/homebrew/Cellar/hdf5/1.12.2/include/H5File.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5Apublic.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5FDsplitter.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5VLpassthru.h /opt/homebrew/Cellar/hdf5/1.12.2/include/h5s.mod /opt/homebrew/Cellar/hdf5/1.12.2/include/h5d.mod /opt/homebrew/Cellar/hdf5/1.12.2/include/H5Tpublic.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5AbstractDs.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5EnumType.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5FDpublic.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5MMpublic.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5PLextern.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5LaccProp.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5VarLenType.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5FDmulti.h /opt/homebrew/Cellar/hdf5/1.12.2/include/h5a.mod /opt/homebrew/Cellar/hdf5/1.12.2/include/h5global.mod /opt/homebrew/Cellar/hdf5/1.12.2/include/h5t.mod /opt/homebrew/Cellar/hdf5/1.12.2/include/H5FDlog.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5FDsec2.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5public.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5OcreatProp.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5FaccProp.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5Ipublic.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5LDpublic.h /opt/homebrew/Cellar/hdf5/1.12.2/include/h5o.mod /opt/homebrew/Cellar/hdf5/1.12.2/include/H5LTpublic.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5PacketTable.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5Lpublic.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5TBpublic.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5Attribute.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5Exception.h /opt/homebrew/Cellar/hdf5/1.12.2/include/h5l.mod /opt/homebrew/Cellar/hdf5/1.12.2/include/H5Epublic.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5StrType.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5f90i.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5Ppublic.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5Classes.h /opt/homebrew/Cellar/hdf5/1.12.2/include/h5vl.mod /opt/homebrew/Cellar/hdf5/1.12.2/include/H5ACpublic.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5Include.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5LcreatProp.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5Epubgen.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5FDmpi.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5pubconf.h /opt/homebrew/Cellar/hdf5/1.12.2/include/h5lt.mod /opt/homebrew/Cellar/hdf5/1.12.2/include/H5api_adpt.h /opt/homebrew/Cellar/hdf5/1.12.2/include/h5z.mod /opt/homebrew/Cellar/hdf5/1.12.2/include/h5i.mod /opt/homebrew/Cellar/hdf5/1.12.2/include/H5PredType.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5Dpublic.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5DOpublic.h /opt/homebrew/Cellar/hdf5/1.12.2/include/h5_gen.mod /opt/homebrew/Cellar/hdf5/1.12.2/include/H5CppDoc.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5FDfamily.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5VLpublic.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5Object.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5DcreatProp.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5DataType.h /opt/homebrew/Cellar/hdf5/1.12.2/include/h5tb.mod /opt/homebrew/Cellar/hdf5/1.12.2/include/H5Mpublic.h /opt/homebrew/Cellar/hdf5/1.12.2/include/h5fortran_types.mod /opt/homebrew/Cellar/hdf5/1.12.2/include/H5ESpublic.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5DSpublic.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5IMpublic.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5DataSpace.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5Spublic.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5PropList.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5FloatType.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5FDros3.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5Fpublic.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5FDdirect.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5FDcore.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5DaccProp.h /opt/homebrew/Cellar/hdf5/1.12.2/include/h5fortkit.mod /opt/homebrew/Cellar/hdf5/1.12.2/include/H5PLpublic.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5Opublic.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5FDhdfs.h /opt/homebrew/Cellar/hdf5/1.12.2/include/h5im.mod /opt/homebrew/Cellar/hdf5/1.12.2/include/hdf5_hl.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5Zpublic.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5f90i_gen.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5FDwindows.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5Group.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5version.h /opt/homebrew/Cellar/hdf5/1.12.2/include/h5tb_const.mod /opt/homebrew/Cellar/hdf5/1.12.2/include/H5Library.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5VLnative.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5Rpublic.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5Gpublic.h /opt/homebrew/Cellar/hdf5/1.12.2/include/H5FcreatProp.h /opt/homebrew/Cellar/hdf5/1.12.2/include/h5lt_const.mod /opt/homebrew/Cellar/hdf5/1.12.2/include/H5DxferProp.h /opt/homebrew/Cellar/hdf5/1.12.2/README.md /opt/homebrew/Cellar/hdf5/1.12.2/COPYING /opt/homebrew/Cellar/hdf5/1.12.2/lib/libhdf5_fortran.dylib /opt/homebrew/Cellar/hdf5/1.12.2/lib/libhdf5_cpp.dylib /opt/homebrew/Cellar/hdf5/1.12.2/lib/libhdf5hl_fortran.a /opt/homebrew/Cellar/hdf5/1.12.2/lib/libhdf5_hl.200.dylib /opt/homebrew/Cellar/hdf5/1.12.2/lib/libhdf5.dylib /opt/homebrew/Cellar/hdf5/1.12.2/lib/libhdf5_hl.dylib /opt/homebrew/Cellar/hdf5/1.12.2/lib/libhdf5.a /opt/homebrew/Cellar/hdf5/1.12.2/lib/libhdf5hl_fortran.200.dylib /opt/homebrew/Cellar/hdf5/1.12.2/lib/libhdf5_fortran.a /opt/homebrew/Cellar/hdf5/1.12.2/lib/libhdf5hl_fortran.dylib /opt/homebrew/Cellar/hdf5/1.12.2/lib/libhdf5_fortran.200.dylib /opt/homebrew/Cellar/hdf5/1.12.2/lib/libhdf5_hl_fortran.a /opt/homebrew/Cellar/hdf5/1.12.2/lib/libhdf5_hl.a /opt/homebrew/Cellar/hdf5/1.12.2/lib/libhdf5_hl_cpp.a /opt/homebrew/Cellar/hdf5/1.12.2/lib/libhdf5_cpp.a /opt/homebrew/Cellar/hdf5/1.12.2/lib/libhdf5_hl_cpp.200.dylib /opt/homebrew/Cellar/hdf5/1.12.2/lib/libhdf5_cpp.200.dylib /opt/homebrew/Cellar/hdf5/1.12.2/lib/libhdf5.200.dylib /opt/homebrew/Cellar/hdf5/1.12.2/lib/libhdf5_hl_cpp.dylib /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5/libhdf5.settings /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/run-all-ex.sh /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c++/compound.cpp /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c++/h5tutr_crtatt.cpp /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c++/h5group.cpp /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c++/h5tutr_crtdat.cpp /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c++/h5tutr_crtgrp.cpp /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c++/h5tutr_crtgrpd.cpp /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c++/h5tutr_subset.cpp /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c++/chunks.cpp /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c++/h5tutr_cmprss.cpp /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c++/h5tutr_crtgrpar.cpp /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c++/create.cpp /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c++/extend_ds.cpp /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c++/run-c++-ex.sh /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c++/readdata.cpp /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c++/h5tutr_rdwt.cpp /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c++/writedata.cpp /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c++/h5tutr_extend.cpp /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/hl/c++/run-hlc++-ex.sh /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/hl/c++/ptExampleFL.cpp /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/hl/run-hl-ex.sh /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/hl/fortran/ex_ds1.f90 /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/hl/fortran/run-hlfortran-ex.sh /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/hl/fortran/exlite.f90 /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/hl/c/ex_ds1.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/hl/c/ex_table_04.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/hl/c/ex_table_10.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/hl/c/ex_table_03.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/hl/c/ex_table_09.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/hl/c/ex_lite3.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/hl/c/ex_table_07.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/hl/c/image8.txt /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/hl/c/image24pixel.txt /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/hl/c/ex_image2.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/hl/c/pal_rgb.h /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/hl/c/ex_table_08.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/hl/c/ex_table_02.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/hl/c/ex_table_06.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/hl/c/ex_lite2.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/hl/c/ptExampleFL.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/hl/c/run-hlc-ex.sh /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/hl/c/ex_table_12.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/hl/c/ex_table_01.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/hl/c/ex_image1.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/hl/c/ex_table_05.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/hl/c/ex_lite1.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/hl/c/ex_table_11.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/README /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/fortran/h5_crtdat.f90 /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/fortran/h5_crtgrp.f90 /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/fortran/h5_subset.f90 /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/fortran/h5_rdwt.f90 /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/fortran/mountexample.f90 /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/fortran/compound.f90 /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/fortran/rwdset_fortran2003.f90 /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/fortran/h5_crtatt.f90 /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/fortran/compound_complex_fortran2003.f90 /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/fortran/ph5example.f90 /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/fortran/selectele.f90 /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/fortran/refregexample.f90 /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/fortran/hyperslab.f90 /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/fortran/refobjexample.f90 /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/fortran/h5_crtgrpd.f90 /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/fortran/h5_extend.f90 /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/fortran/h5_cmprss.f90 /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/fortran/compound_fortran2003.f90 /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/fortran/h5_crtgrpar.f90 /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/fortran/nested_derived_type.f90 /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/fortran/run-fortran-ex.sh /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/ph5_filtered_writes_no_sel.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_vds-exclim.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_write.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_compound.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_shared_mesg.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_vds-exc.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_cmprss.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_crtgrpd.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_drivers.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_crtatt.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_rdwt.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_vds.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_extend_write.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_subset.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_attribute.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_debug_trace.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_elink_unix2win.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/ph5example.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_vds-percival-unlim.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/run-c-ex.sh /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_reference_deprec.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_extlink.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_chunk_read.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_ref2reg_deprec.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_crtgrpar.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_crtdat.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_ref_compat.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_mount.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_vds-percival-unlim-maxmin.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_select.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_read.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_ref_extern.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_vds-eiger.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_crtgrp.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/ph5_filtered_writes.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_vds-percival.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_group.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_extend.c /opt/homebrew/Cellar/hdf5/1.12.2/share/hdf5_examples/c/h5_vds-simpleIO.c ```
mkitti commented 2 years ago

This is what I needed to get this to work on my Mac Studio.

  1. n5-hdf5 1.4.2 needs a release.
  2. We need to explicitly override cisd.jhdf5.version since the pom-scijava has not caught up yet.
  3. We need to clone https://github.com/JaneliaSciComp/jhdf5/tree/mkitti/jhdf5plugin to get the native libraries.
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>
axtimwalde commented 1 year ago

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 ?

mkitti commented 1 year ago

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

axtimwalde commented 1 year ago

Tested by @jni, thanks a billion times for the fix @mkitti!