scijava / pom-scijava

Friendly base POM for all SciJava-based software
https://imagej.net/BOM
The Unlicense
25 stars 34 forks source link

Increase `net.java.dev.jna:jna` version ? #163

Closed NicoKiaru closed 2 years ago

NicoKiaru commented 3 years ago

Hello,

Do you think it would be possible to update net.java.dev.jna:jna to version 5.6.0 (or above) ?

Best,

Nicolas

imagejan commented 3 years ago

What are the breaking changes with major version 5? @NicoKiaru what functionality do you require?

The following components (and maybe more) currently use jna in their pom.xml:

Some changes possibly required:

Edit: Also, some of the above usage of JNA can maybe be replaced by https://github.com/scijava/native-lib-loader ? Don't know enough about it to judge though...

NicoKiaru commented 3 years ago

Ah! I need it for a CPU meter also:

https://github.com/BIOP/ijp-imagetoatlas/blob/master/src/main/java/ch/epfl/biop/ResourcesMonitor.java I tested and jna is required if you want a cpu meter that (really) works on all platform. I didn't know there was already one.

However, thanks to your links, I see that jna is used in SPIM_registration to connect to CUDA. I don't know how much this function is used and how involved is the update, but for sure it's more important than a CPU meter.

So I think updating jna should be tested/done by @StephanPreibisch first in SPIM_registration, because its use of jna is more important than a CPU meter. But I'm not @StephanPreibisch has time to put in this, and since my use case is not super important, we'll probably stay this way until something more important comes up.

Thanks a lot @imagejan !

ctrueden commented 3 years ago

Here are the components using jna I found in a quick search:

I would love to update this across the board, but I don't have the bandwidth to do it right now unfortunately.

mkitti commented 2 years ago

@mzouink, do you want to tackle this check list with me?

mkitti commented 2 years ago

We need JNA 5.7 or 5.8 for upstream aarch64 support.

JNA 5.7 introduced a lipoed fat darwin binary: https://github.com/java-native-access/jna/pull/1297

JNA 5.8 split the darwin binaries into x86_64 and aarch64 versions https://github.com/java-native-access/jna/pull/1316

We should target JNA 5.8 at minimum for stable aarch64 support.

ctrueden commented 2 years ago

I would substantially prefer to target the latest version, as long as we might be needing to update downstream projects anyway.

mzouink commented 2 years ago

Here are the components using jna I found in a quick search:

  • [ ] clij/clij-coremem
  • [ ] fiji/CPU_Meter
  • [ ] fiji/SPIM_Registration
  • [ ] uw-loci/curvelets-imagej
  • [ ] deepimagej/deepimagej-plugin
  • [x] PreibischLab/multiview-reconstruction

I would love to update this across the board, but I don't have the bandwidth to do it right now unfortunately.

I tested PreibischLab/multiview-reconstruction with JNA 5.11.0 and it is working well. jna is used for cuda computing. So hopefully if other projects needs JNA for cuda it should be ok.

mkitti commented 2 years ago

List of breaking changes in JNA 5: https://github.com/java-native-access/jna/blob/master/CHANGES.md#breaking-changes-1

mkitti commented 2 years ago

I just checked clij/clij-coremem, and it works with JNA 5.11.0. All tests passing. cc: @haesleinhuepf

<jna.version>5.11.0</jna.version>
mkitti commented 2 years ago

Native.loadLibrary is deprecated but still functional. Use Native.load instead.

mkitti commented 2 years ago

https://github.com/fiji/CPU_Meter/pull/1

mkitti commented 2 years ago

I cannot locate a public uw-loci/curvelets-imagej repo. Is it private?

mkitti commented 2 years ago

I have checked compatibility with the following repositories.

imagesc-bot commented 2 years ago

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/timeline-for-the-next-fiji-update/69640/3

ctrueden commented 2 years ago

Ahh, in all the dust surrounding the pom-scijava 32.0.0 release, I forgot to upgrade jna. :facepalm:

The good news is: I ran the mega-melt just now with the latest pom-scijava plus jna 5.12.1, and there are no failures caused by the update! :tada: So I updated it.

imagejan commented 1 year ago

I noticed that the FFMPEG update site (https://fiji.sc/~schindelin/ffmpeg-plugins/) still ships jna-3.2.7.jar and therefore possibly breaks other uses of JNA in Fiji. How involved is it to update that legacy site, i.e. the code on https://github.com/scifio/scifio-javacv/tree/ffmpeg/plugin/src/main/java/fiji/ffmpeg?

Also, there is https://sites.imagej.net/FFMPEG-javacv/, but it isn't listed on the list of update sites (yet). Is that site supposed to replace the old FFMPEG site?

/cc @ctrueden

(See this forum topic that triggered my post here.)