bigdataviewer / bigdataviewer-core

ImgLib2-based viewer for registered SPIM stacks and more
BSD 2-Clause "Simplified" License
33 stars 35 forks source link

No suitable HDF5 native library for Mac M1 chip #135

Open mzouink opened 2 years ago

mzouink commented 2 years ago

Bigdataviewer is not working in my Mac M1 chip, jhdf5 can't find the native library for my chip.

Screen Shot 2022-05-06 at 11 08 58 AM
mzouink commented 2 years ago

i spoke with @mkitti We think it is because cisd.jhdf5 19.04.0 doesn't support M1 chip yet

Screen Shot 2022-05-06 at 11 05 46 AM
tpietzsch commented 2 years ago

Yes, that's the problem. The latest HDF5 version https://portal.hdfgroup.org/display/support/HDF5%201.12.2#releasenotes has support for M1. It's very recent. I would wait a bit whether there will be a new jhdf5 release that uses it, before digging into how to package it ourselves.

mkitti commented 2 years ago

We will have to build JHDF5 ourselves, and then figure out how to distribute it. I have the build instructions from Bern Rinn. I'm working on the problem from the plugin perspective.

https://sissource.ethz.ch/sispub/jhdf5/-/tree/master/libs/native/jhdf5 https://unlimited.ethz.ch/display/JHDF/JHDF5+FAQ#JHDF5FAQ-Whataretheoptionstoprovidethenativelibraries?

I have M1 hardware on order, but maybe I'll build it on Marwan's machine in the meantime.

cc: @ctrueden, @StephanPreibisch

mkitti commented 2 years ago

@mzouink and I worked on this, and we now have a build for Mac OS X M1 (aarch64) at https://github.com/JaneliaSciComp/jhdf5/releases/tag/jhdf5-19.04.0_aarch64

@ctrueden I'm not sure if there is a clean way to update Maven with this JAR. Perhaps I should combine this with my efforts to deliver alternative native binaries?

ctrueden commented 2 years ago

We could either:

  1. Deploy a new fat jhdf5-19.04.0.1 all architectures in one; or
  2. Split up the architectures to make one classifier per arch, and then add the aarch64 one to that; or
  3. Just deploy the aarch64 arch as a separate add-on JAR to the main jhdf5-19.04.0.

I don't have a strong opinion. I think (2) is most correct, but would be more work, whereas (3) would be simplest but require anyone with an M1 mac to explicitly depend on the aarch64 architecture JAR. (1) would keep things simple for users but result in an increasingly bloated JHDF5 JAR file.

mkitti commented 2 years ago

Perhaps we should move the discussion over to https://github.com/JaneliaSciComp/jhdf5/issues/3 since there is not much to do here from the perspective of bigdataviewer-core.