Created attachment 208391 [details] make BsdNativeDispatcher actoally load the native library to dispatch to Since the latest update of openjdk8 (openjdk8-8.232.09.1) german/mediathekview broke: clicking on a download button gives no reaction in the GUI and an exception like this (shortened to the relevant part, because java): Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: sun.nio.fs.BsdNativeDispatcher.getmntonname0(J)[B at sun.nio.fs.BsdNativeDispatcher.getmntonname0(Native Method) at sun.nio.fs.BsdNativeDispatcher.getmntonname(BsdNativeDispatcher.java:61) at sun.nio.fs.BsdFileStore.findMountEntry(BsdFileStore.java:67) at sun.nio.fs.UnixFileStore.<init>(UnixFileStore.java:65) at sun.nio.fs.BsdFileStore.<init>(BsdFileStore.java:40) at sun.nio.fs.BsdFileSystemProvider.getFileStore(BsdFileSystemProvider.java:55) at sun.nio.fs.BsdFileSystemProvider.getFileStore(BsdFileSystemProvider.java:39) at sun.nio.fs.UnixFileSystemProvider.getFileStore(UnixFileSystemProvider.java:368) at java.nio.file.Files.getFileStore(Files.java:1461) at mediathek.gui.dialog.DialogAddDownload.getFreeDiskSpace(DialogAddDownload.java:268) Poking around jdk/src/solaris/classes/sun/nio/fs/BsdNativeDispatcher.java it appears that indeed getmntonname0() is declared "native", but there are no provisions to load a suitable library for that method. The other NativeDispatchers call System.loadLibrary("nio"), which would make a lot of sense here, too - a "NativeDispatcher" should at least have some access to the library it is dispatching to. Attached is a patch (to be dropped into files/) which implements the same System.loadLibrary() logic with it's wrappers in BsdNativeDispatcher.java. This still passes poudriere and fixes mediathekview for me. I've not reported this upstream, as I'm not even sure which upstream to report to (and I'd dread to go through the submit-a-trivial-patch dance with the-company-which-swallowed-Sun). I'm debugging a JDK - what am I doing with my live?
Created attachment 208392 [details] have BsdNativeDispatcher load it's library and make that library export it's symbols That didn't go too well - that new getmntonname0() has to be exported by the library (I had forgotten about the first half of the fix by the time I finished the second part, duh). This comes as a patch to be applied, not dropped into files.
A commit references this bug: Author: glewis Date: Thu Oct 17 22:39:06 UTC 2019 New revision: 514690 URL: https://svnweb.freebsd.org/changeset/ports/514690 Log: Fix file interaction * Load libnio in BsdNativeDispatcher, as per other OSes * Export getmntonname0 from libnio PR: 241317 Submitted by: cmt@ Changes: head/java/openjdk8/Makefile head/java/openjdk8/files/patch-jdk-make-mapfiles-libnio-mapfile-bsd head/java/openjdk8/files/patch-jdk-src-solaris-classes-sun-nio-fs-BsdNativeDispatcher.java
Thanks Christoph! I've committed your patch and bumped PORTREVISION.