Open nyh opened 9 years ago
Waldek Kozaczuk noticed another missing dependency, in openjdk8-fedora:
$ ldd apps/openjdk8-fedora/install/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.102-2.b14.fc26.x86_64/jre/lib/amd64/libsunec.so
linux-vdso.so.1 (0x00007ffd6ecc2000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f16b6ac8000)
libssl3.so => /lib64/libssl3.so (0x00007f16b687e000)
libsmime3.so => /lib64/libsmime3.so (0x00007f16b6656000)
libnss3.so => /lib64/libnss3.so (0x00007f16b632d000)
libnssutil3.so => /lib64/libnssutil3.so (0x00007f16b60ff000)
libplds4.so => /lib64/libplds4.so (0x00007f16b5efa000)
libplc4.so => /lib64/libplc4.so (0x00007f16b5cf5000)
libnspr4.so => /lib64/libnspr4.so (0x00007f16b5ab6000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f16b5899000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f16b5695000)
libm.so.6 => /lib64/libm.so.6 (0x00007f16b538c000)
libc.so.6 => /lib64/libc.so.6 (0x00007f16b4fc9000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f16b4db2000)
/lib64/ld-linux-x86-64.so.2 (0x000055c874cec000)
libz.so.1 => /lib64/libz.so.1 (0x00007f16b4b9c000)
librt.so.1 => /lib64/librt.so.1 (0x00007f16b4993000)
We probably are missing a few of those, but he specifically saw the NSPR library missing when trying to run the "derby" database.
I also saw the same missing library (libnsp4) when trying to run tomcat (from apps/) with openjdk8-fedora:
$ scripts/build image=openjdk8-fedora,tomcat
$ scripts/run -V
...
could not load libssl3.so
could not load libsmime3.so
could not load libnss3.so
could not load libnssutil3.so
could not load libplds4.so
could not load libplc4.so
could not load libnspr4.so
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-3.b16.fc26.x86_64/jre/lib/amd64/libsunec.so: failed looking up symbol PR_CallOnce
Presumably, the missing PR_CallOnce function is supposed to come from libnspr4.so, which is missing from the image because the openjdk8-fedora module neglects to add it.
Fix for openjdk8-fedora to download and include all the dependencies of libsunsec.so and libjavalcms.so was committed to apps.git. The same problem for the other JREs in apps.git has NOT yet been fixed. Moreover, even for openjdk8-fedora, there may be additional JRE libraries with additional dependencies we are missing - we need to check before closing this issue.
Philipp Suter tried a Java application which did some image manipulation, and crashed on a missing symbol cmsSetLogErrorHandler:
The problem is that OpenJDK includes a shared library libjavalcms.so (see external/x64/openjdk.bin/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.7.4.fc20.x86_64/jre/lib/amd64/libjavalcms.so) for doing color management or something like that.
Unfortunately, this library is not stand-alone:
So we need to also copy liblcms2.so.2 to the OSv image (you can put it in /, or with the rest of the Java shared objects), and we did not. Philip tried it from his host, and it solved the bug.
The solution is to add this liblcms2 to external/, and have our Java image include it. We've already done this for other libraries we noticed are needed (like freetype). There might be more dependencies like this we are missing, so it's worth checking.