Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

main branch build fail on macos with xcode16 #461

Open
Geker opened this issue Sep 19, 2024 · 2 comments
Open

main branch build fail on macos with xcode16 #461

Geker opened this issue Sep 19, 2024 · 2 comments

Comments

@Geker
Copy link

Geker commented Sep 19, 2024

The error information is as follows

os: macos 14.7
xcode version: 16

Compiling up to 4 files for COMPILE_CREATE_SYMBOLS
Compiling up to 68 files for COMPILE_CREATE_SYMBOLS
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)
gmake[3]: *** [Gendata.gmk:64: /Users/songqingqing/work/dev_projects/githubs/jetBrainsRuntime/build/macosx-aarch64-server-release/buildtools/create_symbols_javac/_the.COMPILE_CREATE_SYMBOLS_batch] Error 1
gmake[2]: *** [make/Main.gmk:139: jdk.compiler-gendata] Error 2
gmake[2]: *** Waiting for unfinished jobs....

ERROR: Build failed for target 'images' in configuration 'macosx-aarch64-server-release' (exit code 2)
Stopping javac server

=== Output from failing command(s) repeated here ===
* For target buildtools_create_symbols_javac__the.COMPILE_CREATE_SYMBOLS_batch:
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)

* All command lines available in /Users/songqingqing/work/dev_projects/githubs/jetBrainsRuntime/build/macosx-aarch64-server-release/make-support/failure-logs.
=== End of repeated output ===

No indication of failed target found.
HELP: Try searching the build log for '] Error'.
HELP: Run 'make doctor' to diagnose build problems.

make[1]: *** [main] Error 2
make: *** [images] Error 2
@Geker
Copy link
Author

Geker commented Sep 19, 2024

it's a clang bug,which was report on openjdk bugs
https://bugs.openjdk.org/browse/JDK-8340341

@bourgesl
Copy link
Contributor

bourgesl commented Sep 19, 2024

I did the update to macos 14.7 + xcode 16 too yesterday.

Here is the patch that worked yesterday (derived from jbs file):

git diff make/autoconf/flags-cflags.m4

diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4
index 992a0282c04..cefadaee012 100644
--- a/make/autoconf/flags-cflags.m4
+++ b/make/autoconf/flags-cflags.m4
@@ -337,9 +337,9 @@ AC_DEFUN([FLAGS_SETUP_OPTIMIZATION],
       C_O_FLAG_HIGHEST="-O3 -finline-functions"
       C_O_FLAG_HI="-O3 -finline-functions"
     else
-      C_O_FLAG_HIGHEST_JVM="-O3"
-      C_O_FLAG_HIGHEST="-O3"
-      C_O_FLAG_HI="-O3"
+      C_O_FLAG_HIGHEST_JVM="-O1"
+      C_O_FLAG_HIGHEST="-O1"
+      C_O_FLAG_HI="-O1"
     fi
     C_O_FLAG_NORM="-O2"
     C_O_FLAG_DEBUG_JVM="-O0"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants