Hi Matthias,
On 17/09/2025 11:41 pm, Baesken, Matthias wrote:
Hi , when building Debian packages for 25 , a couple of messages
complaining about “useless” dependencies show up .
One is about libjvm.so depending on librt.so.1 :
dpkg-shlibdeps: warning: package could avoid a useless dependency if
/usr/lib/jvm/jdk-25/lib/server/libjvm.so
were not linked against librt.so.1 (they use none of the library's symbols)
Looks like in old days, on old distros, this dependency was (maybe?)
still useful :
See make/autoconf/libraries.m4 :
139 # librt for legacy clock_gettime
140 if test "x$OPENJDK_TARGET_OS" = xlinux; then
141 # Hotspot needs to link librt to get the clock_* functions.
142 # But once our supported minimum build and runtime platform
143 # has glibc 2.17, this can be removed as the functions are
144 # in libc.
145 BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lrt"
146 fi
( seems some versions of RHEL 7 / SLES 12 still had those old glibc
versions)
Could we clean this up?
Or is there still some need to support this in jdk26 ?
I always find it very difficult to determine when checks like these
become unnecessary. I think RHEL 7 with glibc 2.17 is the oldest Linux
release we currently support.
Given I wrote the above in April 2021, I would hope we can now move on,
but again I don't know how to readily determine that.
Cheers,
David
Best regards, Matthias