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

Build error after JDK-8333658 due to class templates

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 24
    • 24
    • hotspot
    • gcc version: 14.1.1

      g++ 14.1.1

    • b04
    • linux

      Release build fails after JDK-8333658

      Using exact match for CONF=linux-x86_64-server-release (other matches are possible)
      Building target 'images' in configuration 'linux-x86_64-server-release'
      Updating support/modules_libs/java.base/server/libjvm.so due to 4 file(s)
      In file included from /home/szaldana/jdk/src/hotspot/share/nmt/memflags.hpp:28,
                       from /home/szaldana/jdk/src/hotspot/share/memory/allocation.hpp:29,
                       from /home/szaldana/jdk/src/hotspot/share/classfile/classLoaderData.hpp:28,
                       from /home/szaldana/jdk/src/hotspot/share/precompiled/precompiled.hpp:34:
      /home/szaldana/jdk/src/hotspot/share/nmt/arrayWithFreeList.hpp:63:15: error: template-id not allowed for constructor in C++20 [-Werror=template-id-cdtor]
         63 | NONCOPYABLE(ArrayWithFreeList<E COMMA flag>);
            | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/szaldana/jdk/src/hotspot/share/utilities/globalDefinitions.hpp:87:26: note: in definition of macro ‘NONCOPYABLE’
         87 | #define NONCOPYABLE(C) C(C const&) = delete; C& operator=(C const&) = delete /* next token must be ; */
            | ^
      /home/szaldana/jdk/src/hotspot/share/nmt/arrayWithFreeList.hpp:63:15: note: remove the ‘< >’
         63 | NONCOPYABLE(ArrayWithFreeList<E COMMA flag>);
            | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/szaldana/jdk/src/hotspot/share/utilities/globalDefinitions.hpp:87:26: note: in definition of macro ‘NONCOPYABLE’
         87 | #define NONCOPYABLE(C) C(C const&) = delete; C& operator=(C const&) = delete /* next token must be ; */
            | ^
      cc1plus: all warnings being treated as errors
      gmake[3]: *** [lib/CompileJvm.gmk:168: /home/szaldana/jdk/build/linux-x86_64-server-release/hotspot/variant-server/libjvm/objs/precompiled/precompiled.hpp.gch] Error 1
      gmake[2]: *** [make/Main.gmk:245: hotspot-server-libs] Error 2

      ERROR: Build failed for target 'images' in configuration 'linux-x86_64-server-release' (exit code 2)

      === Output from failing command(s) repeated here ===
      * For target hotspot_variant-server_libjvm_objs_precompiled_precompiled.hpp.gch:
      In file included from /home/szaldana/jdk/src/hotspot/share/nmt/memflags.hpp:28,
                       from /home/szaldana/jdk/src/hotspot/share/memory/allocation.hpp:29,
                       from /home/szaldana/jdk/src/hotspot/share/classfile/classLoaderData.hpp:28,
                       from /home/szaldana/jdk/src/hotspot/share/precompiled/precompiled.hpp:34:
      /home/szaldana/jdk/src/hotspot/share/nmt/arrayWithFreeList.hpp:63:15: error: template-id not allowed for constructor in C++20 [-Werror=template-id-cdtor]
         63 | NONCOPYABLE(ArrayWithFreeList<E COMMA flag>);
            | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/szaldana/jdk/src/hotspot/share/utilities/globalDefinitions.hpp:87:26: note: in definition of macro ‘NONCOPYABLE’
         87 | #define NONCOPYABLE(C) C(C const&) = delete; C& operator=(C const&) = delete /* next token must be ; */
            | ^
      /home/szaldana/jdk/src/hotspot/share/nmt/arrayWithFreeList.hpp:63:15: note: remove the ‘< >’
         63 | NONCOPYABLE(ArrayWithFreeList<E COMMA flag>);
            | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/szaldana/jdk/src/hotspot/share/utilities/globalDefinitions.hpp:87:26: note: in definition of macro ‘NONCOPYABLE’
         87 | #define NONCOPYABLE(C) C(C const&) = delete; C& operator=(C const&) = delete /* next token must be ; */
         ... (rest of output omitted)

      * All command lines available in /home/szaldana/jdk/build/linux-x86_64-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/szaldana/jdk/make/Init.gmk:323: main] Error 2
      make: *** [/home/szaldana/jdk/make/Init.gmk:189: images] Error 2

            szaldana Sonia Zaldana Calles
            szaldana Sonia Zaldana Calles
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: