[jdk17] RFR: 8269668: [aarch64] java.library.path not including /usr/lib64
Severin Gehwolf
sgehwolf at openjdk.java.net
Fri Jul 2 12:06:01 UTC 2021
On Fri, 2 Jul 2021 11:09:39 GMT, Andrew Haley <aph at openjdk.org> wrote:
> > I'm a bit confused. On all 64-bit Linux platforms we set the same default paths, but the change for Aarch64 was overlooked. So unless these distributions set different paths for different architectures surely we want the same behaviour on all Linux platforms?
>
> We do now, sure, except for platforms that use "/lib" for 64-bit libraries. These days "/lib64" is used on all FHS-compliant systems, but Debian is not FHS-compliant and some Linux systems date from before "/lib64" was decided on
Considering a platform that has a 64-bit library `foo` in `/lib` (over `/lib64`), then a call to `System.loadLibrary("foo")` would continue to work (as this patch just adds more default paths). It would only break on those systems that have `/lib64/libfoo.so` *and* `/lib/libfoo.so` where the former is actually different. I wonder how likely this is. For ppc64, s390x, amd64 we already have the 64-bit including default paths. In addition, since JDK-8214332 - JDK 12 -, there is `--with-jni-libpath` configure option to override all that.
All things considered, the post-patch fallback default library path seems reasonable.
-------------
PR: https://git.openjdk.java.net/jdk17/pull/200
More information about the hotspot-runtime-dev
mailing list