On Fri, 17 Jul 2026 13:56:05 GMT, Matthias Baesken <[email protected]> wrote:
> Currently we have no configure option to disable the build of libjsound, so > we always try to build it and need the related dependencies. > an exception is AIX where we have the build disabled; it might make sense to > offer a configure option to disable the jsound build e.g. to build a headless > jdk for container envs where we do not have sound (the JCK offers options to > have a JDK without sound). > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). I don't know that I want to be the one to say what JCK does or does not allow, but when I built with --enable-jsound=no and run sound tests I get a message printed Couldn't load library jsound: java.lang.UnsatisfiedLinkError: no jsound in system library path: /..../build/macosx-aarch64-server-release/jdk/lib com/sun/media/sound/Platform.java is printing this try { System.loadLibrary(libName); } catch (Throwable t) { if (Printer.err) Printer.err("Couldn't load library "+libName+": "+t.toString()); isNativeLibLoaded = false; } Seems like it will do this if com/sun/media/sound/Printer.java determines the build is "internal" which is normal for developer builds. private static boolean isBuildInternal() { String javaVersion = System.getProperty("java.version"); return javaVersion != null && javaVersion.contains("internal"); } I suppose this likely doesn't matter since it won't be seen with production builds. I see JCK failures but those are likely expected because they are ones that are only run if sound is supposed to be there. I think our jtreg tests are mostly written to 'skip' if there's no sound devices, so that looks like they are passing but I'm still waiting to see them run on macOS. ------------- PR Comment: https://git.openjdk.org/jdk/pull/31951#issuecomment-5039341884
