building on macOS 14
Philip Race
philip.race at oracle.com
Fri Nov 3 17:42:34 UTC 2023
Are you referring to some open bug, or some thread somewhere ?
I'm not aware of anyone here having tried Xcode 15 (ie macOS 14 SDK) at all.
But I just did so with more-or-less current JDK 22 which shoudn't
differ much from JDK21u,
(Xcode 15.0.1 on macOS 14.1 on an M1 macMini to be precise) and I don't
get a crash.
SwingSet2 starts up and runs just fine in my quick testing.
So no issues other than the known warning (not a crash) about secure
coding and that is not related
to building on macOS 14, its about running on macOS14 if you used Xcode
14 or later to build on any OS version.
As to your fallback of the macOS 13 SDK, I don't see any problems there
either.
I've also built JDK 22 on macOS 14 using the macOS 13 SDK (ie Xcode
14.3.1 as downloaded by our internal build
support) and had no issues. It reads to me like you may not have a clean
build .. but in that case I'm
not sure why configure doesn't complain. Did you just 'swap out' the
Xcode in a way the build maybe
can't spot ?
-phil
On 11/2/23 9:48 AM, Alan Snyder wrote:
> As you may know, a JDK built on macOS 14 using the macOS 14 SDK crashes during initialization of AWT.
>
> (The problem appears to be Apple’s bug. It is triggered by a runtime check that is enabled only in programs that were linked against the macOS 14 SDK.)
>
> So I tried to build JDK using the macOS 13 SDK (specifically, I was building jdk21u).
>
> I tried both suggestions in the build documentation for configuring the Xcode version.
>
> The first suggestion was to use xcode-select to select the previous version of Xcode (version 14), which contains the macOS 13 SDK.
>
> This suggestion is ugly because Xcode 14 does not run on macOS 14, but it might have worked.
>
> However, the suggestion failed because I started getting warnings like this:
>
> "The shared archive file was created by a different version or build of HotSpot”
>
> Even worse, however, is that these warnings *were inserted in generated Java sources*, causing the build to fail.
>
> For example:
>
> package sun.awt;
> public class AWTIcon32_security_icon_interim16_png {
> public static int[] security_icon_interim16_png = {
> [0.016s][warning][cds] The shared archive file was created by a different version or build of HotSpot
> ...
>
> I then tried the second suggestion, configuring with --with-toolchain-path=/Applications/Xcode14.app/Contents/Developer/usr/bin.
>
> This appears to work.
>
More information about the build-dev
mailing list