building on macOS 14

Alan Snyder javalists at cbfiddle.com
Fri Nov 3 18:18:54 UTC 2023



> On Nov 3, 2023, at 10:42 AM, Philip Race <philip.race at oracle.com> wrote:
> 
> Are you referring to some open bug, or some thread somewhere ?
> 

I found several threads that refer to this issue by searching for the error message.

Demonstrating the issue may require using the screen menu bar.


References to Carbon menus are disallowed with AppKit menu system (see rdar://101002625). Use instances of NSMenu and NSMenuItem directly instead.

0   AppKit                                0x193d7e4e4 _NSCarbonMenuCrashIfNeeded + 488

1   AppKit                                0x193d7e294 _NSGetCarbonMenu + 24

2   JavaRuntimeSupport                    0x1fb31dde8 -[JRSMenu installCarbonEventHandlers:] + 172

3   CoreFoundation                        0x18faae820 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 148

4   CoreFoundation                        0x18fb428ec ___CFXRegistrationPost_block_invoke + 88

5   CoreFoundation                        0x18fb42834 _CFXRegistrationPost + 440

6   CoreFoundation                        0x18fa7d48c _CFXNotificationPost + 764

7   Foundation                            0x190b6f030 -[NSNotificationCenter postNotificationName:object:userInfo:] + 88

8   AppKit                                0x193288a50 -[NSMenu insertItem:atIndex:] + 520

9   Foundation                            0x190bde2d8 __NSThreadPerformPerform + 264


> 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 ?
> 

I followed the directions to use xcode-select. Was I supposed to reconfigure after that? I don’t remember if I did that or just a make clean.




> -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.
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/build-dev/attachments/20231103/e5b36fd0/attachment-0001.htm>


More information about the build-dev mailing list