[aarch64-port-dev ] AArch64: Core build failed after JDK-8270947

Dingli Zhang dingli at iscas.ac.cn
Wed Jan 19 04:18:47 UTC 2022


Hi,


In the process of building openJDK for aarch64 on ubuntu18.04 natively, 
I found that the core variants of the JVM (using 
--with-jvm-variants=core when configuring) will cause problems with the 
compilation.

By the way, commitid is 3a421e4b78ae5e7116ac68128504b65fa00e1f7f.



Problems:

./configure --disable-warnings-as-errors --with-jvm-variants=core


src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp: In member function 
'u_char* MacroAssembler::zero_words(Register, Register)':
src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp:4731:27: error: 
incomplete type 'ciEnv' used in nested name specifier
          && (task = ciEnv::current()->task())
                            ^~~~~~~
At global scope:
cc1plus: warning: unrecognized command line option '-Wno-cast-function-type'
lib/CompileJvm.gmk:141: recipe for target 
'/home/dingli/aarch64-port/build/linux-aarch64-core-release/hotspot/variant-core/libjvm/objs/macroAssembler_aarch64.o' 
failed
make[3]: *** 
[/home/dingli/aarch64-port/build/linux-aarch64-core-release/hotspot/variant-core/libjvm/objs/macroAssembler_aarch64.o] 
Error 1
make/Main.gmk:252: recipe for target 'hotspot-core-libs' failed
make[2]: *** [hotspot-core-libs] Error 2

ERROR: Build failed for target 'default (exploded-image)' in 
configuration 'linux-aarch64-core-release' (exit code 2)

=== Output from failing command(s) repeated here ===
* For target hotspot_variant-core_libjvm_objs_macroAssembler_aarch64.o:
src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp: In member function 
'u_char* MacroAssembler::zero_words(Register, Register)':
src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp:4731:27: error: 
incomplete type 'ciEnv' used in nested name specifier
          && (task = ciEnv::current()->task())
                            ^~~~~~~
At global scope:
cc1plus: warning: unrecognized command line option '-Wno-cast-function-type'

* All command lines available in 
/home/dingli/aarch64-port/build/linux-aarch64-core-release/make-support/failure-logs.
=== End of repeated output ===

=== Make failed targets repeated here ===
lib/CompileJvm.gmk:141: recipe for target 
'/home/dingli/aarch64-port/build/linux-aarch64-core-release/hotspot/variant-core/libjvm/objs/macroAssembler_aarch64.o' 
failed
make/Main.gmk:252: recipe for target 'hotspot-core-libs' failed
=== End of repeated output ===

Hint: Try searching the build log for the name of the first failed target.
Hint: See doc/building.html#troubleshooting for assistance.

/home/dingli/aarch64-port/make/Init.gmk:310: recipe for target 'main' failed
make[1]: *** [main] Error 2
/home/dingli/aarch64-port/make/Init.gmk:186: recipe for target 'default' 
failed
make: *** [default] Error 2


Solution:

After [8270947: AArch64: C1: use zero_words to initialize all 
objects](https://github.com/openjdk/jdk/commit/6c68ce2d396c6fe02201daf2bdb8c164de807cc1) 
ciEnv was added in src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp. 
And in core variants, src/hotspot/share/ci/ciEnv.hpp was not included 
anywhere.



Patch:
diff --git a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp 
b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
index cce3d497bbc..ba087268b7e 100644
--- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
@@ -52,6 +52,7 @@
  #include "runtime/stubRoutines.hpp"
  #include "runtime/thread.hpp"
  #include "utilities/powerOfTwo.hpp"
+#include "ci/ciEnv.hpp"
  #ifdef COMPILER1
  #include "c1/c1_LIRAssembler.hpp"
  #endif


Please review andgive me some advicewhen have free time,thanks a lot!

Best regards


More information about the aarch64-port-dev mailing list