Upgrade to zarr-java 0.1.3#327
Conversation
|
Build failing with:
If I remove my local |
sbesson
left a comment
There was a problem hiding this comment.
Thanks for extracting these changes @melissalinkert. The primary motivation is to add support for converting dataset using the default blosc compression in Linux/arm64 environments. /cc @Tom-TBT
Tested using a minimal AWS EC2 instance based on the Ubuntu 26.04 arm64 AMI. Using bioformats2raw 0.12.0, a minimal conversion using blosc as the default compression fails while trying to load the native library:
ubuntu@ip-10-0-0-243:~$ ./bioformats2raw-0.12.0/bin/bioformats2raw test.fake test.zarr
2026-06-12 08:10:01,096 [pool-1-thread-1] ERROR c.g.bioformats2raw.Converter - Failure processing chunk; resolution=0 plane=0 xx=0 yy=0 zz=0 width=512 height=512 depth=1
java.lang.UnsatisfiedLinkError: /tmp/libbloscjni11160771468050511226.so: /tmp/libbloscjni11160771468050511226.so: cannot open shared object file: No such file or directory (Possible cause: can't load AMD 64 .so on a AARCH64 platform)
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:331)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:197)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:139)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2418)
at java.base/java.lang.Runtime.load0(Runtime.java:852)
at java.base/java.lang.System.load(System.java:2026)
at com.scalableminds.bloscjava.Blosc.<clinit>(Blosc.java:17)
at dev.zarr.zarrjava.v2.codec.core.BloscCodec.encode(BloscCodec.java:65)
at dev.zarr.zarrjava.core.codec.CodecPipeline.encode(CodecPipeline.java:150)
at dev.zarr.zarrjava.core.Array.writeChunk(Array.java:153)
at dev.zarr.zarrjava.core.Array.lambda$write$0(Array.java:121)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:1024)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291)
at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
at java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:667)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:160)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:174)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:765)
at dev.zarr.zarrjava.core.Array.write(Array.java:99)
at dev.zarr.zarrjava.core.Array.write(Array.java:309)
at com.glencoesoftware.bioformats2raw.Converter.writeBytes(Converter.java:2014)
at com.glencoesoftware.bioformats2raw.Converter.processChunk(Converter.java:2391)
at com.glencoesoftware.bioformats2raw.Converter.lambda$saveResolutions$6(Converter.java:2623)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
2026-06-12 08:10:01,095 [main] ERROR c.g.bioformats2raw.Converter - Error while writing series 0
java.util.concurrent.CompletionException: java.lang.UnsatisfiedLinkError: /tmp/libbloscjni11160771468050511226.so: /tmp/libbloscjni11160771468050511226.so: cannot open shared object file: No such file or directory (Possible cause: can't load AMD 64 .so on a AARCH64 platform)
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:332)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:347)
at java.base/java.util.concurrent.CompletableFuture$BiRelay.tryFire(CompletableFuture.java:1498)
at java.base/java.util.concurrent.CompletableFuture$CoCompletion.tryFire(CompletableFuture.java:1219)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2194)
at com.glencoesoftware.bioformats2raw.Converter.lambda$saveResolutions$6(Converter.java:2632)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.UnsatisfiedLinkError: /tmp/libbloscjni11160771468050511226.so: /tmp/libbloscjni11160771468050511226.so: cannot open shared object file: No such file or directory (Possible cause: can't load AMD 64 .so on a AARCH64 platform)
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:331)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:197)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:139)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2418)
at java.base/java.lang.Runtime.load0(Runtime.java:852)
at java.base/java.lang.System.load(System.java:2026)
at com.scalableminds.bloscjava.Blosc.<clinit>(Blosc.java:17)
at dev.zarr.zarrjava.v2.codec.core.BloscCodec.encode(BloscCodec.java:65)
at dev.zarr.zarrjava.core.codec.CodecPipeline.encode(CodecPipeline.java:150)
at dev.zarr.zarrjava.core.Array.writeChunk(Array.java:153)
at dev.zarr.zarrjava.core.Array.lambda$write$0(Array.java:121)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:1024)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291)
at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
at java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:667)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:160)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:174)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:765)
at dev.zarr.zarrjava.core.Array.write(Array.java:99)
at dev.zarr.zarrjava.core.Array.write(Array.java:309)
at com.glencoesoftware.bioformats2raw.Converter.writeBytes(Converter.java:2014)
at com.glencoesoftware.bioformats2raw.Converter.processChunk(Converter.java:2391)
at com.glencoesoftware.bioformats2raw.Converter.lambda$saveResolutions$6(Converter.java:2623)
... 3 common frames omitted
java.lang.RuntimeException: java.util.concurrent.CompletionException: java.lang.UnsatisfiedLinkError: /tmp/libbloscjni11160771468050511226.so: /tmp/libbloscjni11160771468050511226.so: cannot open shared object file: No such file or directory (Possible cause: can't load AMD 64 .so on a AARCH64 platform)
at com.glencoesoftware.bioformats2raw.Converter.unwrapException(Converter.java:3186)
at com.glencoesoftware.bioformats2raw.Converter.convert(Converter.java:1681)
at com.glencoesoftware.bioformats2raw.Converter.call(Converter.java:1487)
at com.glencoesoftware.bioformats2raw.Converter.call(Converter.java:113)
at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
at picocli.CommandLine.execute(CommandLine.java:2170)
at com.glencoesoftware.bioformats2raw.Converter.main(Converter.java:3561)
Caused by: java.util.concurrent.CompletionException: java.lang.UnsatisfiedLinkError: /tmp/libbloscjni11160771468050511226.so: /tmp/libbloscjni11160771468050511226.so: cannot open shared object file: No such file or directory (Possible cause: can't load AMD 64 .so on a AARCH64 platform)
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:332)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:347)
at java.base/java.util.concurrent.CompletableFuture$BiRelay.tryFire(CompletableFuture.java:1498)
at java.base/java.util.concurrent.CompletableFuture$CoCompletion.tryFire(CompletableFuture.java:1219)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2194)
at com.glencoesoftware.bioformats2raw.Converter.lambda$saveResolutions$6(Converter.java:2632)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.UnsatisfiedLinkError: /tmp/libbloscjni11160771468050511226.so: /tmp/libbloscjni11160771468050511226.so: cannot open shared object file: No such file or directory (Possible cause: can't load AMD 64 .so on a AARCH64 platform)
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:331)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:197)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:139)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2418)
at java.base/java.lang.Runtime.load0(Runtime.java:852)
at java.base/java.lang.System.load(System.java:2026)
at com.scalableminds.bloscjava.Blosc.<clinit>(Blosc.java:17)
at dev.zarr.zarrjava.v2.codec.core.BloscCodec.encode(BloscCodec.java:65)
at dev.zarr.zarrjava.core.codec.CodecPipeline.encode(CodecPipeline.java:150)
at dev.zarr.zarrjava.core.Array.writeChunk(Array.java:153)
at dev.zarr.zarrjava.core.Array.lambda$write$0(Array.java:121)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:1024)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291)
at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
at java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:667)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:160)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:174)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:765)
at dev.zarr.zarrjava.core.Array.write(Array.java:99)
at dev.zarr.zarrjava.core.Array.write(Array.java:309)
at com.glencoesoftware.bioformats2raw.Converter.writeBytes(Converter.java:2014)
at com.glencoesoftware.bioformats2raw.Converter.processChunk(Converter.java:2391)
at com.glencoesoftware.bioformats2raw.Converter.lambda$saveResolutions$6(Converter.java:2623)
... 3 more
With this PR included, the version of the blosc-java library includes the blosc library compiled under Linux arm64 and the samel conversion tests succeeds with OME-Zarr 0.4
ubuntu@ip-10-0-0-243:~$ ./bioformats2raw-0.13.0-SNAPSHOT/bin/bioformats2raw test.fake test.zarr
or OME-Zarr 0.5
ubuntu@ip-10-0-0-243:~$ ./bioformats2raw-0.13.0-SNAPSHOT/bin/bioformats2raw test.fake test.zarr --ngff-version 0.5
As noted in #322, the renaming of byteshuffle to shuffle is related to an upstream change of the enum in blosc-java, specifically scalableminds/blosc-java@228abf8. My understanding is that the former byteshuffle value was inherited from the jzarr implementation. The shuffle term is consistent with the Zarr v3 blosc codec specification and reference libraries like python-blosc.
In addition, dev.zarr:zarr-java:0.1.3 is the version of the library we have been using in the current work for adding Zarr v3 support in OMERO.
|
The integration of this work has been primarily held off due to open questions regarding the state of Following a discussion with @erindiel, @melissalinkert and @chris-allan and in the absence of objections, merging this in preparation of a patch release of |
Splitting zarr-java upgrade out of #322, since it can be considered separately (as discussed briefly with @sbesson).