JDK-8313530 : VM build without C2 fails after JDK-8312579
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 22
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: generic
  • Submitted: 2023-08-01
  • Updated: 2023-09-04
  • Resolved: 2023-08-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 22
22 b13Fixed
Related Reports
Relates :  
Relates :  
Description
--------------------------------------
how to reproduce:

./configure --with-jvm-features=-compiler2 --with-debug-level=release
make images JOBS=32

--------------------------------------
here shows the snippet of error log

=== Output from failing command(s) repeated here ===
* For target hotspot_variant-server_libjvm_objs_arguments.o:
In file included from ~/tmp/test/jdk_src/src/hotspot/share/runtime/arguments.cpp:53:
~/tmp/test/jdk_src/src/hotspot/share/runtime/arguments.cpp: In static member function 'static jint Arguments::apply_ergo()':
~/tmp/test/jdk_src/src/hotspot/share/runtime/globals_extension.hpp:35:32: error: 'Flag_EnableVectorSupport_enum' was not declared in this scope
   35 | #define FLAG_MEMBER_ENUM(name) Flag_##name##_enum
      |                                ^~~~~
~/tmp/test/jdk_src/src/hotspot/share/runtime/globals_extension.hpp:80:60: note: in expansion of macro 'FLAG_MEMBER_ENUM'
   80 | #define FLAG_IS_DEFAULT(name)         (JVMFlag::is_default(FLAG_MEMBER_ENUM(name)))
      |                                                            ^~~~~~~~~~~~~~~~
~/tmp/test/jdk_src/src/hotspot/share/runtime/arguments.cpp:4045:8: note: in expansion of macro 'FLAG_IS_DEFAULT'
 4045 |   if (!FLAG_IS_DEFAULT(EnableVectorSupport) && !EnableVectorSupport) {
      |        ^~~~~~~~~~~~~~~
~/tmp/test/jdk_src/src/hotspot/share/runtime/arguments.cpp:4045:49: error: 'EnableVectorSupport' was not declared in this scope; did you mean 'VectorSupport'?
 4045 |   if (!FLAG_IS_DEFAULT(EnableVectorSupport) && !EnableVectorSupport) {
      |                                                 ^~~~~~~~~~~~~~~~~~~
      |                                                 VectorSupport
   ... (rest of output omitted)
* For target hotspot_variant-server_libjvm_objs_deoptimization.o:
~/tmp/test/jdk_src/src/hotspot/share/runtime/deoptimization.cpp: In static member function 'static bool Deoptimization::realloc_objects(JavaThread*, frame*, RegisterMap*, GrowableArray<ScopeValue*>*, JavaThread*)':
~/tmp/test/jdk_src/src/hotspot/share/runtime/deoptimization.cpp:1239:13: error: 'EnableVectorSupport' was not declared in this scope; did you mean 'VectorSupport'?
 1239 |         if (EnableVectorSupport && VectorSupport::is_vector(ik)) {
      |             ^~~~~~~~~~~~~~~~~~~
      |             VectorSupport
~/tmp/test/jdk_src/src/hotspot/share/runtime/deoptimization.cpp: In static member function 'static void Deoptimization::reassign_fields(frame*, RegisterMap*, GrowableArray<ScopeValue*>*, bool, bool)':
~/tmp/test/jdk_src/src/hotspot/share/runtime/deoptimization.cpp:1575:9: error: 'EnableVectorSupport' was not declared in this scope; did you mean 'VectorSupport'?
 1575 |     if (EnableVectorSupport && VectorSupport::is_vector(k)) {
      |         ^~~~~~~~~~~~~~~~~~~
      |         VectorSupport
* For target hotspot_variant-server_libjvm_objs_modules.o:
In file included from ~/tmp/test/jdk_src/src/hotspot/share/classfile/modules.cpp:48:
~/tmp/test/jdk_src/src/hotspot/share/classfile/modules.cpp: In static member function 'static void Modules::define_module(Handle, jboolean, jstring, jstring, jobjectArray, JavaThread*)':
~/tmp/test/jdk_src/src/hotspot/share/runtime/globals_extension.hpp:35:32: error: 'Flag_EnableVectorSupport_enum' was not declared in this scope
   35 | #define FLAG_MEMBER_ENUM(name) Flag_##name##_enum
      |                                ^~~~~
~/tmp/test/jdk_src/src/hotspot/share/runtime/globals_extension.hpp:80:60: note: in expansion of macro 'FLAG_MEMBER_ENUM'
   80 | #define FLAG_IS_DEFAULT(name)         (JVMFlag::is_default(FLAG_MEMBER_ENUM(name)))
      |                                                            ^~~~~~~~~~~~~~~~
~/tmp/test/jdk_src/src/hotspot/share/classfile/modules.cpp:459:9: note: in expansion of macro 'FLAG_IS_DEFAULT'
  459 |     if (FLAG_IS_DEFAULT(EnableVectorSupport)) {
      |         ^~~~~~~~~~~~~~~
~/tmp/test/jdk_src/src/hotspot/share/classfile/modules.cpp:460:24: error: 'EnableVectorSupport' was not declared in this scope; did you mean 'VectorSupport'?
  460 |       FLAG_SET_DEFAULT(EnableVectorSupport, true);
      |                        ^~~~~~~~~~~~~~~~~~~
~/tmp/test/jdk_src/src/hotspot/share/runtime/globals_extension.hpp:85:41: note: in definition of macro 'FLAG_SET_DEFAULT'
   ... (rest of output omitted)

* All command lines available in ~/tmp/test/build-release/make-support/failure-logs.
=== End of repeated output ===
Comments
Changeset: c418933d Author: Gergö Barany <gbarany@openjdk.org> Committer: Jie Fu <jiefu@openjdk.org> Date: 2023-08-24 08:05:33 +0000 URL: https://git.openjdk.org/jdk/commit/c418933d32a4e158f0e526d1be27b4b00f0c08a6
24-08-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/15384 Date: 2023-08-22 09:04:32 +0000
22-08-2023

Sorry [~haosun], I had a patch but never got around to opening a PR. Here it is now: https://github.com/openjdk/jdk/pull/15384
22-08-2023

Hi [~gbarany] May I ask do you have spare time to fix this issue? If not, do you mind if I assigning this task to myself, since this issue has blocked our internal CI for many days. Thanks.
22-08-2023

Or you can do similar to C2 intrinsic flags by specifying it in jvmci_globals.hpp when C2 is not available: NOT_COMPILER2(product(bool, EnableVectorSupport, false, EXPERIMENTAL, \
03-08-2023

The EnableVectorSupport flag is declared in opto/c2_globals.hpp, which is not included if COMPILER2 is not set. But after my changes for JDK-8312579 we try to access this flag in some places guarded by #if COMPILER2_OR_JVMCI. I'm not sure about the correct fix, I'm leaning towards moving the flag from c2_globals.hpp to the shared compiler_globals.hpp, so that it's accessible even if C2 is disabled but JVMCI is enabled.
02-08-2023

That sounds reasonable to me.
02-08-2023

[~gbarany] could you please have a look?
02-08-2023

ILW = Build fails, non-default configuration without C2, no workaround = HLH = P2
02-08-2023