-
Bug
-
Resolution: Fixed
-
P4
-
11.0.11
-
b02
-
linux
When trying to compile the test-images target on RHEL 6 or RHEL 7 we see build failures like this:
=== Output from failing command(s) repeated here ===
/bin/printf "* For target support_test_hotspot_jtreg_native_support_libTestCheckedReleaseCriticalArray_libTestCheckedReleaseCriticalArray.o:\n"
* For target support_test_hotspot_jtreg_native_support_libTestCheckedReleaseCriticalArray_libTestCheckedReleaseCriticalArray.o:
(/bin/grep -v -e "^Note: including file:" < /home/openjdk/jdk11u/build/release/make-support/failure-logs/support_test_hotspot_jtreg_native_support_libTestCheckedReleaseCriticalArray_libTestCheckedReleaseCriticalArray.o.log || true) | /bin/head -n 15
./test/hotspot/jtreg/runtime/jni/checked/libTestCheckedReleaseCriticalArray.c: In function ‘Java_TestCheckedReleaseCriticalArray_modifyArray’:
./test/hotspot/jtreg/runtime/jni/checked/libTestCheckedReleaseCriticalArray.c:38:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int i = 0; i < len; i++) {
^
./test/hotspot/jtreg/runtime/jni/checked/libTestCheckedReleaseCriticalArray.c:38:5: note: use option -std=c99 or -std=gnu99 to compile your code
if test `/bin/wc -l < /home/openjdk/jdk11u/build/release/make-support/failure-logs/support_test_hotspot_jtreg_native_support_libTestCheckedReleaseCriticalArray_libTestCheckedReleaseCriticalArray.o.log` -gt 15; then /bin/echo " ... (rest of output omitted)" ; fi
/bin/printf "\n* All command lines available in /home/openjdk/jdk11u/build/release/make-support/failure-logs.\n"
* All command lines available in /home/openjdk/jdk11u/build/release/make-support/failure-logs.
/bin/printf "=== End of repeated output ===\n"
=== End of repeated output ===
if /bin/grep -q "recipe for target .* failed" /home/openjdk/jdk11u/build/release/build.log 2> /dev/null; then /bin/printf "\n=== Make failed targets repeated here ===\n" ; /bin/grep "recipe for target .* failed" /home/openjdk/jdk11u/build/release/build.log ; /bin/printf "=== End of repeated output ===\n" ; /bin/printf "\nHint: Try searching the build log for the name of the first failed target.\n" ; else /bin/printf "\nNo indication of failed target found.\n" ; /bin/printf "Hint: Try searching the build log for '] Error'.\n" ; fi
That test got introduced with the backport ofJDK-8258077 the fix should be similar to JDK-8256483. There is no point in fixing this for later JDKs as those aren't going to be buildable with those old compilers.
=== Output from failing command(s) repeated here ===
/bin/printf "* For target support_test_hotspot_jtreg_native_support_libTestCheckedReleaseCriticalArray_libTestCheckedReleaseCriticalArray.o:\n"
* For target support_test_hotspot_jtreg_native_support_libTestCheckedReleaseCriticalArray_libTestCheckedReleaseCriticalArray.o:
(/bin/grep -v -e "^Note: including file:" < /home/openjdk/jdk11u/build/release/make-support/failure-logs/support_test_hotspot_jtreg_native_support_libTestCheckedReleaseCriticalArray_libTestCheckedReleaseCriticalArray.o.log || true) | /bin/head -n 15
./test/hotspot/jtreg/runtime/jni/checked/libTestCheckedReleaseCriticalArray.c: In function ‘Java_TestCheckedReleaseCriticalArray_modifyArray’:
./test/hotspot/jtreg/runtime/jni/checked/libTestCheckedReleaseCriticalArray.c:38:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int i = 0; i < len; i++) {
^
./test/hotspot/jtreg/runtime/jni/checked/libTestCheckedReleaseCriticalArray.c:38:5: note: use option -std=c99 or -std=gnu99 to compile your code
if test `/bin/wc -l < /home/openjdk/jdk11u/build/release/make-support/failure-logs/support_test_hotspot_jtreg_native_support_libTestCheckedReleaseCriticalArray_libTestCheckedReleaseCriticalArray.o.log` -gt 15; then /bin/echo " ... (rest of output omitted)" ; fi
/bin/printf "\n* All command lines available in /home/openjdk/jdk11u/build/release/make-support/failure-logs.\n"
* All command lines available in /home/openjdk/jdk11u/build/release/make-support/failure-logs.
/bin/printf "=== End of repeated output ===\n"
=== End of repeated output ===
if /bin/grep -q "recipe for target .* failed" /home/openjdk/jdk11u/build/release/build.log 2> /dev/null; then /bin/printf "\n=== Make failed targets repeated here ===\n" ; /bin/grep "recipe for target .* failed" /home/openjdk/jdk11u/build/release/build.log ; /bin/printf "=== End of repeated output ===\n" ; /bin/printf "\nHint: Try searching the build log for the name of the first failed target.\n" ; else /bin/printf "\nNo indication of failed target found.\n" ; /bin/printf "Hint: Try searching the build log for '] Error'.\n" ; fi
That test got introduced with the backport of
- relates to
-
JDK-8256483 [TESTBUG] serviceability/jvmti/GetClassMethods/libOverpassMethods.c fails to compile on gcc 4.4.x
- Resolved
-
JDK-8258077 Using -Xcheck:jni can lead to a double-free after JDK-8193234
- Resolved