Encountered following build warning/error when doing a native build on linux-riscv64 platform with GCC-13.
/home/ubuntu/jdk/src/hotspot/cpu/riscv/c1_Runtime1_riscv.cpp:226:11: error: 'float_regs_as_doubles_size_in_slots' defined but not used [-Werror=unused-const-variable=]
226 | const int float_regs_as_doubles_size_in_slots = pd_nof_fpu_regs_frame_map * 2;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
gmake[3]: *** [lib/CompileJvm.gmk:169: /home/ubuntu/jdk/build/linux-riscv64-server-release/hotspot/variant-server/libjvm/objs/c1_Runtime1_riscv.o] Error 1
gmake[3]: *** Waiting for unfinished jobs....
Compiling up to 3507 files for java.base
Compiling 89 properties into resource bundles for java.desktop
gmake[2]: *** [make/Main.gmk:245: hotspot-server-libs] Error 2
gmake[2]: *** Waiting for unfinished jobs....
ERROR: Build failed for target 'images' in configuration 'linux-riscv64-server-release' (exit code 2)
Stopping javac server
=== Output from failing command(s) repeated here ===
* For target hotspot_variant-server_libjvm_objs_c1_Runtime1_riscv.o:
/home/ubuntu/jdk/src/hotspot/cpu/riscv/c1_Runtime1_riscv.cpp:226:11: error: 'float_regs_as_doubles_size_in_slots' defined but not used [-Werror=unused-const-variable=]
226 | const int float_regs_as_doubles_size_in_slots = pd_nof_fpu_regs_frame_map * 2;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
* All command lines available in /home/ubuntu/jdk/build/linux-riscv64-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]: *** [/home/ubuntu/jdk/make/Init.gmk:323: main] Error 2
make: *** [/home/ubuntu/jdk/make/Init.gmk:189: images] Error 2
Thu Aug 29 18:02:34 CST 2024
Building target 'test' in configuration 'linux-riscv64-server-release'
Compiling up to 136 files for java.compiler
Compiling up to 18 files for java.datatransfer
lib/CompileGtest.gmk:84: warning: overriding recipe for target '/home/ubuntu/jdk/build/linux-riscv64-server-release/make-support/compile-commands/jvm-ldflags.txt'
lib/CompileJvm.gmk:167: warning: ignoring old recipe for target '/home/ubuntu/jdk/build/linux-riscv64-server-release/make-support/compile-commands/jvm-ldflags.txt'
Updating support/src.zip
/home/ubuntu/jdk/src/hotspot/cpu/riscv/c1_Runtime1_riscv.cpp:226:11: error: 'float_regs_as_doubles_size_in_slots' defined but not used [-Werror=unused-const-variable=]
226 | const int float_regs_as_doubles_size_in_slots = pd_nof_fpu_regs_frame_map * 2;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Compiling up to 10 files for java.instrument
cc1plus: all warnings being treated as errors
gmake[3]: *** [lib/CompileJvm.gmk:169: /home/ubuntu/jdk/build/linux-riscv64-server-release/hotspot/variant-server/libjvm/objs/c1_Runtime1_riscv.o] Error 1
gmake[2]: *** [make/Main.gmk:245: hotspot-server-libs] Error 2
gmake[2]: *** Waiting for unfinished jobs....
Compiling up to 1849 files for java.xml
make: *** [/home/ubuntu/jdk/make/Init.gmk:189: test] Terminated
make[1]: *** wait: No child processes. Stop.
make[1]: *** Waiting for unfinished jobs....
make[1]: *** wait: No child processes. Stop.
/home/ubuntu/jdk/src/hotspot/cpu/riscv/c1_Runtime1_riscv.cpp:226:11: error: 'float_regs_as_doubles_size_in_slots' defined but not used [-Werror=unused-const-variable=]
226 | const int float_regs_as_doubles_size_in_slots = pd_nof_fpu_regs_frame_map * 2;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
gmake[3]: *** [lib/CompileJvm.gmk:169: /home/ubuntu/jdk/build/linux-riscv64-server-release/hotspot/variant-server/libjvm/objs/c1_Runtime1_riscv.o] Error 1
gmake[3]: *** Waiting for unfinished jobs....
Compiling up to 3507 files for java.base
Compiling 89 properties into resource bundles for java.desktop
gmake[2]: *** [make/Main.gmk:245: hotspot-server-libs] Error 2
gmake[2]: *** Waiting for unfinished jobs....
ERROR: Build failed for target 'images' in configuration 'linux-riscv64-server-release' (exit code 2)
Stopping javac server
=== Output from failing command(s) repeated here ===
* For target hotspot_variant-server_libjvm_objs_c1_Runtime1_riscv.o:
/home/ubuntu/jdk/src/hotspot/cpu/riscv/c1_Runtime1_riscv.cpp:226:11: error: 'float_regs_as_doubles_size_in_slots' defined but not used [-Werror=unused-const-variable=]
226 | const int float_regs_as_doubles_size_in_slots = pd_nof_fpu_regs_frame_map * 2;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
* All command lines available in /home/ubuntu/jdk/build/linux-riscv64-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]: *** [/home/ubuntu/jdk/make/Init.gmk:323: main] Error 2
make: *** [/home/ubuntu/jdk/make/Init.gmk:189: images] Error 2
Thu Aug 29 18:02:34 CST 2024
Building target 'test' in configuration 'linux-riscv64-server-release'
Compiling up to 136 files for java.compiler
Compiling up to 18 files for java.datatransfer
lib/CompileGtest.gmk:84: warning: overriding recipe for target '/home/ubuntu/jdk/build/linux-riscv64-server-release/make-support/compile-commands/jvm-ldflags.txt'
lib/CompileJvm.gmk:167: warning: ignoring old recipe for target '/home/ubuntu/jdk/build/linux-riscv64-server-release/make-support/compile-commands/jvm-ldflags.txt'
Updating support/src.zip
/home/ubuntu/jdk/src/hotspot/cpu/riscv/c1_Runtime1_riscv.cpp:226:11: error: 'float_regs_as_doubles_size_in_slots' defined but not used [-Werror=unused-const-variable=]
226 | const int float_regs_as_doubles_size_in_slots = pd_nof_fpu_regs_frame_map * 2;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Compiling up to 10 files for java.instrument
cc1plus: all warnings being treated as errors
gmake[3]: *** [lib/CompileJvm.gmk:169: /home/ubuntu/jdk/build/linux-riscv64-server-release/hotspot/variant-server/libjvm/objs/c1_Runtime1_riscv.o] Error 1
gmake[2]: *** [make/Main.gmk:245: hotspot-server-libs] Error 2
gmake[2]: *** Waiting for unfinished jobs....
Compiling up to 1849 files for java.xml
make: *** [/home/ubuntu/jdk/make/Init.gmk:189: test] Terminated
make[1]: *** wait: No child processes. Stop.
make[1]: *** Waiting for unfinished jobs....
make[1]: *** wait: No child processes. Stop.
- relates to
-
JDK-8339120 Use more fine-granular gcc unused warnings
- Resolved
- links to
-
Commit(master) openjdk/jdk/4675913e
-
Review(master) openjdk/jdk/20765