JDK-8357194 : [21u] lible cannot find the path of libjava
  • Type: Bug
  • Component: tools
  • Sub-Component: jshell
  • Affected Version: 21,22
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: generic
  • Submitted: 2025-05-19
  • Updated: 2025-05-19
Related Reports
Relates :  
Description
When I check the dependencies of lible.so using the ldd command on Linux, libjava.so is reported as "not found".

$ ldd lible.so
ldd: warning: you do not have execution permission for `./lible.so'
        linux-vdso.so.1 (0x00007ffc1f7c1000)
        libjava.so => not found
        libjvm.so => /work/jdk21/lib/server/libjvm.so (0x00007f3351200000)
        libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f3350e00000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f3352819000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f33527fe000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f3350a00000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f3352909000)

Other libraries that depend on libjava.so are able to find the path. For example, in the case of libnet.so:

$ ldd libnet.so
ldd: warning: you do not have execution permission for `./libnet.so'
        linux-vdso.so.1 (0x00007ffec83bd000)
        libjvm.so => /work/jdk21/lib/server/libjvm.so (0x00007fc455800000)
        libjava.so => /work/jdk21/lib/./libjava.so (0x00007fc456ef0000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fc455400000)
        libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007fc455000000)
        libm.so.6 => /lib64/libm.so.6 (0x00007fc456e07000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fc456dea000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fc456f25000)

In the mainline, the issue does not occur because lible was removed by JDK-8327476. It only occurs in jdk21 and jdk22.
Comments
A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk21u-dev/pull/1803 Date: 2025-05-19 01:02:07 +0000
19-05-2025