"useless" librt.so.1 dependency on Linux reported by dpkg-shlibdeps
Baesken, Matthias
matthias.baesken at sap.com
Wed Sep 17 13:41:19 UTC 2025
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 ?
Best regards, Matthias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/build-dev/attachments/20250917/fc5b9282/attachment-0001.htm>
More information about the build-dev
mailing list