Lightzone cannot find native libraries LCJPEg and LCLENSFUN
F9Race opened this issue · comments
Hi there,
good to see that Lightzone development is going on! However, with version 4.24 I run into some issues.
When I invoke Lightzone from xterm window, I get the following error messages:
**Couldn't link with native library: "LCJPEG**
/usr/libexec/lightzone/libLCJPEG.so: /usr/lib64/libjpeg.so.8: version `LIBJPEG_8.0' not found (required by /usr/libexec/lightzone/libLCJPEG.so)
**Couldn't link with native library: "LCLENSFUN**
/usr/libexec/lightzone/libLCLENSFUN.so: liblensfun.so.1: Cannot open shared object file: File or directory not found
This is on Slackware Linux, stable version (15.0) with all patches and updates until today applied. I tried this with Lightzone 4.24.
It looks very similar to the issue that seemed to be present only in MacOS and was fixed in version 4.25 (the Mac only release).
I'd greatly appreciate, if you could look into this and (hopefully) also fix it or provide some workaround. Thanks in advance!
Best regards
F9Race
Hi F9Race,
I have no experience in Slackware, so I'm not sure if I can help. Anyway, I have some questions for you:
- How did you install LightZone? Did you use a package for another distribution, or did you build it from source?
- Have you installed Slackware's official pacakges for libjpeg-turbo and lensfun? In other words, do you have
/usr/lib/libjpeg.so.*
and/usr/lib/liblensfun.so.0.3.*
?- If so, I think that
mv /usr/libexec/lightzone /usr/lib/lightzone
will solve the problem, though it is very ugly solution.
- If so, I think that
Hi Masahiro,
thanks for your kind and quick response.
I am on Slackware64-15.0, BTW, and I am using Azul Java: Zulu17.36+17-CA (build 17.0.4.1+1-LTS)
To answer your questions:
- I installed Lightzone using the latest RPM package for OpenSUSE, following the advice in this post on the Slackware forum on LinuxQuestions.org; https://www.linuxquestions.org/questions/slackware-14/lightzone-install-in-slackware-14-2-64bit-4175600839/#post5679408. Maybe I should mention that I am on Slackware64-15.0, currently (not 14.2, anymore).
- Yes, official packages for libjpeg-turbo and lensfun are installed. I have /usr/lib64/libjpeg.so.62.3.0 and /usr/lib64/liblensfun.0.3.95.
I moved the lightzone folder to /usr/lib64/:
# mv /usr/libexec/lightzone /usr/lib64/lightzone
However, Lightzone still complained about missing libraries at startup. Therefore I created a couple of symbolic links:
# ln -sf libjpeg.so.62.3.0 libjpeg.so.8
# ln -sf liblensfun.so.0.3.95 liblensfun.so.1
However, now I get this:
Couldn't link with native library: "LCJPEG
/usr/lib64/lightzone/libLCJPEG.so: /usr/lib64/libjpeg.so.8: version `LIBJPEG_8.0' not found (required by /usr/lib64/lightzone/libLCJPEG.so)
Couldn't link with native library: "LCLENSFUN
/usr/lib64/lightzone/libLCLENSFUN.so: /usr/lib64/lightzone/libLCLENSFUN.so: undefined symbol: _ZNK10lfDatabase9GetLensesEv
Any other ideas, what I might try? Thanks in advance!
Hi,
I think the best way is to avoid these kind of errors is to build LightZone package on your own machine. Today I installed Slackware64-15.0 on virtualbox, and going to check if the self-built package solves the errors in next week.
@F9Race
I created a minimal SlackBuild script . Please check if it works:
sbopkg -i zulu-openjdk17
sbopkg -i apache-ant
sbopkg -i apache-ivy
wget https://github.com/ktgw0316/LightZone/archive/refs/tags/4.2.4.tar.gz
wget https://gist.github.com/ktgw0316/1d178a800377b247a531a4b4e59bfac9/ivy.patch
wget https://gist.github.com/ktgw0316/1d178a800377b247a531a4b4e59bfac9/lightzone.SlackBuild
chmod +x ./lightzone.SlackBuild
su -c ./lightzone.SlackBuild
su -c "installpkg /tmp/lightzone-4.2.4-1_SBo.tgz"
First of all, thanks A LOT for taking this effort! Regarding the commands, I think all of them, except wget, should be executed as root, not just the last two. That said, build and install went smooth. However, Lightzone complained again about missing libraries, starting with DCRAW. So I installed that and tried again. Result:
$ lightzone Starting LightZone version 4.2.4 ... with options : openjdk version "17.0.4.1" 2022-08-12 LTS OpenJDK Runtime Environment Zulu17.36+17-CA (build 17.0.4.1+1-LTS) OpenJDK 64-Bit Server VM Zulu17.36+17-CA (build 17.0.4.1+1-LTS, mixed mode, sharing) /usr/share/java/lightzone/*:/usr/share/java/* This is LightZone 4.2.4 Running Java version 17.0.4.1 (amd64) Verifying Libraries java.lang.UnsatisfiedLinkError: no DCRaw in java.library.path: /usr/libexec/lightzone at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2429) at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818) at java.base/java.lang.System.loadLibrary(System.java:1989) at com.lightcrafts.app.Application.verifyLibraries(Application.java:1713) at com.lightcrafts.app.Application.main(Application.java:2186) at com.lightcrafts.platform.Launcher.init(Launcher.java:45) at com.lightcrafts.platform.linux.LinuxLauncher.main(LinuxLauncher.java:11)
Also windows with the following error messages and warnings pop up during program start:
**Couldn't link with native library: "DCRaw** no DCRaw in java.library.path: /usr/libexec/lightzone
**Couldn't link with native library: "Segment** no Segment in java.library.path: /usr/libexec/lightzone
**Couldn't link with native library: "JAI** no JAI in java.library.path: /usr/libexec/lightzone
This goes on with FASTJAI, fbf, LCJPEG, LCTIFF and LCLENSFUN. Now, JAI and FASTJAI are indeed not installed in my system, just because I don't know which Slackware packages are needed. I haven't found Slackware packages with JAI or FASTJAI in their name, yet. Everything else is there.
Thanks a lot, again!
Here is the console output of lightzone from start to termination:
$ lightzone Starting LightZone version 4.2.4 ... with options : openjdk version "17.0.4.1" 2022-08-12 LTS OpenJDK Runtime Environment Zulu17.36+17-CA (build 17.0.4.1+1-LTS) OpenJDK 64-Bit Server VM Zulu17.36+17-CA (build 17.0.4.1+1-LTS, mixed mode, sharing) /usr/share/java/lightzone/*:/usr/share/java/* This is LightZone 4.2.4 Running Java version 17.0.4.1 (amd64) Verifying Libraries java.lang.UnsatisfiedLinkError: no DCRaw in java.library.path: /usr/libexec/lightzone at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2429) at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818) at java.base/java.lang.System.loadLibrary(System.java:1989) at com.lightcrafts.app.Application.verifyLibraries(Application.java:1713) at com.lightcrafts.app.Application.main(Application.java:2186) at com.lightcrafts.platform.Launcher.init(Launcher.java:45) at com.lightcrafts.platform.linux.LinuxLauncher.main(LinuxLauncher.java:11) ^Cbash-5.1$ lightzone Starting LightZone version 4.2.4 ... with options : openjdk version "17.0.4.1" 2022-08-12 LTS OpenJDK Runtime Environment Zulu17.36+17-CA (build 17.0.4.1+1-LTS) OpenJDK 64-Bit Server VM Zulu17.36+17-CA (build 17.0.4.1+1-LTS, mixed mode, sharing) /usr/share/java/lightzone/*:/usr/share/java/* This is LightZone 4.2.4 Running Java version 17.0.4.1 (amd64) Verifying Libraries java.lang.UnsatisfiedLinkError: no DCRaw in java.library.path: /usr/libexec/lightzone at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2429) at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818) at java.base/java.lang.System.loadLibrary(System.java:1989) at com.lightcrafts.app.Application.verifyLibraries(Application.java:1713) at com.lightcrafts.app.Application.main(Application.java:2186) at com.lightcrafts.platform.Launcher.init(Launcher.java:45) at com.lightcrafts.platform.linux.LinuxLauncher.main(LinuxLauncher.java:11) java.lang.UnsatisfiedLinkError: no Segment in java.library.path: /usr/libexec/lightzone at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2429) at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818) at java.base/java.lang.System.loadLibrary(System.java:1989) at com.lightcrafts.app.Application.verifyLibraries(Application.java:1713) at com.lightcrafts.app.Application.main(Application.java:2186) at com.lightcrafts.platform.Launcher.init(Launcher.java:45) at com.lightcrafts.platform.linux.LinuxLauncher.main(LinuxLauncher.java:11) java.lang.UnsatisfiedLinkError: no JAI in java.library.path: /usr/libexec/lightzone at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2429) at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818) at java.base/java.lang.System.loadLibrary(System.java:1989) at com.lightcrafts.app.Application.verifyLibraries(Application.java:1713) at com.lightcrafts.app.Application.main(Application.java:2186) at com.lightcrafts.platform.Launcher.init(Launcher.java:45) at com.lightcrafts.platform.linux.LinuxLauncher.main(LinuxLauncher.java:11) java.lang.UnsatisfiedLinkError: no FASTJAI in java.library.path: /usr/libexec/lightzone at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2429) at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818) at java.base/java.lang.System.loadLibrary(System.java:1989) at com.lightcrafts.app.Application.verifyLibraries(Application.java:1713) at com.lightcrafts.app.Application.main(Application.java:2186) at com.lightcrafts.platform.Launcher.init(Launcher.java:45) at com.lightcrafts.platform.linux.LinuxLauncher.main(LinuxLauncher.java:11) java.lang.UnsatisfiedLinkError: no fbf in java.library.path: /usr/libexec/lightzone at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2429) at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818) at java.base/java.lang.System.loadLibrary(System.java:1989) at com.lightcrafts.app.Application.verifyLibraries(Application.java:1713) at com.lightcrafts.app.Application.main(Application.java:2186) at com.lightcrafts.platform.Launcher.init(Launcher.java:45) at com.lightcrafts.platform.linux.LinuxLauncher.main(LinuxLauncher.java:11) java.lang.UnsatisfiedLinkError: no LCJPEG in java.library.path: /usr/libexec/lightzone at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2429) at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818) at java.base/java.lang.System.loadLibrary(System.java:1989) at com.lightcrafts.app.Application.verifyLibraries(Application.java:1713) at com.lightcrafts.app.Application.main(Application.java:2186) at com.lightcrafts.platform.Launcher.init(Launcher.java:45) at com.lightcrafts.platform.linux.LinuxLauncher.main(LinuxLauncher.java:11) java.lang.UnsatisfiedLinkError: no LCTIFF in java.library.path: /usr/libexec/lightzone at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2429) at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818) at java.base/java.lang.System.loadLibrary(System.java:1989) at com.lightcrafts.app.Application.verifyLibraries(Application.java:1713) at com.lightcrafts.app.Application.main(Application.java:2186) at com.lightcrafts.platform.Launcher.init(Launcher.java:45) at com.lightcrafts.platform.linux.LinuxLauncher.main(LinuxLauncher.java:11) java.lang.UnsatisfiedLinkError: no LCLENSFUN in java.library.path: /usr/libexec/lightzone at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2429) at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818) at java.base/java.lang.System.loadLibrary(System.java:1989) at com.lightcrafts.app.Application.verifyLibraries(Application.java:1713) at com.lightcrafts.app.Application.main(Application.java:2186) at com.lightcrafts.platform.Launcher.init(Launcher.java:45) at com.lightcrafts.platform.linux.LinuxLauncher.main(LinuxLauncher.java:11) Initializing Engine Utilities Max Memory: 2048 MB Total Memory: 200 MB Running on 4 processors Tile Cache: 1024 MB Allocating 5134 MB for the image cache. java.lang.UnsatisfiedLinkError: no LCCache in java.library.path: /usr/libexec/lightzone at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2429) at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818) at java.base/java.lang.System.loadLibrary(System.java:1989) at com.lightcrafts.utils.cache.NativeByteBufferAllocator.<clinit>(NativeByteBufferAllocator.java:220) at com.lightcrafts.jai.utils.LCTileCache.createDiskCache(LCTileCache.java:821) at com.lightcrafts.jai.utils.LCTileCache.<init>(LCTileCache.java:180) at com.lightcrafts.jai.JAIContext.<clinit>(JAIContext.java:193) at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Class.java:375) at com.lightcrafts.app.Application.verifyLibraries(Application.java:1732) at com.lightcrafts.app.Application.main(Application.java:2186) at com.lightcrafts.platform.Launcher.init(Launcher.java:45) at com.lightcrafts.platform.linux.LinuxLauncher.main(LinuxLauncher.java:11)
Regarding the commands, I think all of them, except wget, should be executed as root, not just the last two.
You are right. 👍
java.lang.UnsatisfiedLinkError: no DCRaw in java.library.path: /usr/libexec/lightzone
I guess you haven't uninstalled your older lightzone package, which contains the /usr/libexec/lightzone/
, before you installed newer package. If that directory exists, correct libraries under /usr/lib64/lightzone/
cannot be found.
cf. /usr/bin/lightzone
(line 26-32).
Now, JAI and FASTJAI are indeed not installed in my system, just because I don't know which Slackware packages are needed.
You need not install any additional packages, since there already exist libJAI.so
, libLCJAI.so
, libFASTJAI
, etc. in /usr/lib64/lightzone/
.
@ktgw0316 Fantastic, THANKS A LOT in BIG letters!
That was indeed it. I uninstalled the package, recursively removed /usr/libexec/lightzone/, re-installed the package generated with your SlackBuild script, and all is good! A fully localised (German, in my case) Lightzone starts up, and reads in the last directory with RAW images that I had been working with a previous version. No complaints about missing libraries.
I can hardly express, how much I appreciate your support. You took a lot of effort, even installing my distro, finding out, how SlackBuild scripts work, writing one yourself, and helping me in using it correctly. I really appreciate that!
So, this ticket can be closed, now, I guess. :)