Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8261089

[TESTBUG] native library of test TestCheckedReleaseCriticalArray.java fails to compile with gcc 4.x

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b02
    • OS:
      linux

      Description

      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 of JDK-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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sgehwolf Severin Gehwolf
              Reporter:
              sgehwolf Severin Gehwolf
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: