Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set jna.library.path->java.library.path if not set
The heart of the issue is that currently, the native launcher only sets java.library.path and does not set jna.library.path. JNA will only look in jna.library.path for versioned shared libraries such as libblosc.so.1. Within java.library.path, JBlosc will only look for libblosc.so. On macOS or Linux, JBlosc will happily find libblosc.so.1 within system folders since they are on the jna.library.path by default. Within ImageJ2, JBlosc will not look in the lib folder for libblosc.so.1 because it is not on the jna.library.path. This pull request will enable JNA apps within ImageJ2 to act like JNA apps outside of ImageJ2. They will both be able to locate libblosc.so.1 whether it is installed within ImageJ2 or by the system. Otherwise to include binaries in ImageJ2, we would have to compile a special version for ImageJ2 that links to libblosc.so. That binary will not work on Ubuntu Linux which only bundles libblosc.so.1. In the primary libblosc package. libblosc.so is only included in libblosc-dev. A specific application of the issue is coordination between JBlosc and the HDF5 Blosc plugin. Binaries within ImageJ2 should be able to work outside of ImageJ2. For this to happen they should link to versioned libraries like libblosc.so.1 rather than unversioned dev libraries like libblosc.so. This PR allows JNA and native libraries to link against the same versioned library (e.g. libblosc.so.1). Closes scijava/scijava-common#438. Co-authored-by: Curtis Rueden <[email protected]>
- Loading branch information
47befcb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit has been mentioned on Image.sc Forum. There might be relevant details there:
https://forum.image.sc/t/imagej-tensorflow-now-with-command-to-change-tensorflow-library-version-switch-to-gpu/31744/15
47befcb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit has been mentioned on Image.sc Forum. There might be relevant details there:
https://forum.image.sc/t/fiji-august-2020-update-broke-mobie/41236/31