JDK mainline build fails on macosx with XCode 16
Jaikiran Pai
jai.forums2013 at gmail.com
Fri Sep 20 04:44:28 UTC 2024
In the past few days there have been reports of the JDK mainline build
failing on macosx when using (the recently released) XCode 16 as the
toolchain. Doing a regular JDK build runs into:
Exception in thread "main" java.lang.ClassFormatError: StackMapTable
format error: bad verification type
at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:64)
at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:52)
This has been investigated into and the issue appears to be a bug in the
clang++ compiler (shipped in XCode 16). The issue along with the
complete details of this issue are being tracked in
https://bugs.openjdk.org/browse/JDK-8340341. Additionally, this has been
reported to Apple through their feedback assistance tool (issue id
FB15162411).
At this point, there is a workaround (also noted in the JDK-8340341
issue and the workaround patch attached to that issue), but my personal
recommendation would be to stay with older versions of Xcode that work,
because even with the workaround it's unknown whether this compiler
issue has wider implications in other places of the JDK.
The reports so far have been on macosx aarch64, but it might be because
no one so far has tried this on macosx x64 (with XCode 16).
-Jaikiran
More information about the jdk-dev
mailing list