[jdk11u-dev] RFR: 8287917: System.loadLibrary does not work on Big Sur if JDK is built with macOS SDK 10.15 and earlier

Jonathan Dowland jdowland at openjdk.org
Wed Sep 7 09:25:57 UTC 2022


On Thu, 1 Sep 2022 05:49:32 GMT, Christoph Langer <clanger at openjdk.org> wrote:

>> Ping comment
>> 
>> This requires a review. It has been some time since I did it, so I'll check it's still clean Tomorrow.
>
> Hi @jmtd, sorry, we kind of overlooked this obviously. As Oracle has backported this to 11.0.17, would you mind rebasing this PR to [jdk11u](https://github.com/openjdk/jdk11u)? I can then review, test & approve it. Thanks!

@RealCLanger, the patch (after resolving the original conflict, i.e., the commit as in the PR today) applies clean to jdk11u and the test passes.

For belt and braces, I really wanted to try and verify things by proving the test fail prior to applying the patch; unfortunately, my macOS development machine has updated itself since I did the backport:

I initially had macOS Big Sur and SDK version 10.14; at the time I did the backport with these versions I could see the test fail.

I now have SDK version MacOSX11.3.sdk. With this, the native component (exeLibraryCache.c) successfully loads the library `libblas.dylib` before and after the patch. I've attempted to install an older SDK but I don't know enough yet about how this works, because what I've tried (`SDKROOT=/path/to/old/sdk cc ...`) the resultant binary is bit-for-bit identical.

To tackle this situation for future macOS work I'm going to investigate setting up some VMs of specific macOS and XCode versions.

Side-note: The test harness runs twice, once to try and load `libblas.dylib` and another time to load `libBLAS.dylib`. The second attempt never succeeds for me in any configuration, but the consequence is a test skip, rather than a failure. I might follow this up in jdk/master (same story there)

I leave it up to you whether we should push this now or keep investigating.

Thanks

-------------

PR: https://git.openjdk.org/jdk11u-dev/pull/1298


More information about the jdk-updates-dev mailing list