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

Build error due to error in zMappedCache.cpp

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • None
    • hotspot
    • gc

      I'm getting the error below when trying to build JDK tip with ZGC enabled.

      System: Linux dev-dsk-dcsl-2c-c018ae80.us-west-2.amazon.com 5.10.234-206.917.amzn2int.x86_64 #1 SMP Sat Mar 8 01:19:23 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

      >>> gcc --version
      gcc (GCC) 7.3.1 20180712 (Red Hat 7.3.1-17)
      Copyright (C) 2017 Free Software Foundation, Inc.
      This is free software; see the source for copying conditions. There is NO
      warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


      Tools summary:
      * Boot JDK: openjdk version "24" 2025-03-18 OpenJDK Runtime Environment Temurin-24+36 (build 24+36) OpenJDK 64-Bit Server VM Temurin-24+36 (build 24+36, mixed mode, sharing) (at /wf/tools/jdk-24+36)
      * Toolchain: gcc (GNU Compiler Collection)
      * C Compiler: Version 7.3.1 (at /usr/bin/gcc)
      * C++ Compiler: Version 7.3.1 (at /usr/bin/g++)

      ------------------

      ```
      >>> make
      Building target 'default (exploded-image)' in configuration 'linux-x86_64-server-slowdebug'
      Updating support/modules_libs/java.base/server/libjvm.so due to 1 file(s)
      /wf/tortugo-no-shen-loop-opts/src/hotspot/share/gc/z/zMappedCache.cpp: In constructor ‘ZMappedCache::ZMappedCache()’:
      /wf/tortugo-no-shen-loop-opts/src/hotspot/share/gc/z/zMappedCache.cpp:454:15: error: ‘ZList<T>::ZList(const ZList<T>&) [with T = ZMappedCache::ZSizeClassListNode]’ is private within this context
           _min(_size) {}
                     ^
      In file included from /wf/tortugo-no-shen-loop-opts/src/hotspot/share/nmt/memTag.hpp:28:0,
                       from /wf/tortugo-no-shen-loop-opts/src/hotspot/share/memory/allocation.hpp:29,
                       from /wf/tortugo-no-shen-loop-opts/src/hotspot/share/classfile/classLoaderData.hpp:28,
                       from /wf/tortugo-no-shen-loop-opts/src/hotspot/share/precompiled/precompiled.hpp:32:
      /wf/tortugo-no-shen-loop-opts/src/hotspot/share/gc/z/zList.hpp:65:15: note: declared private here
         NONCOPYABLE(ZList);
                     ^
      /wf/tortugo-no-shen-loop-opts/src/hotspot/share/utilities/globalDefinitions.hpp:87:24: note: in definition of macro ‘NONCOPYABLE’
       #define NONCOPYABLE(C) C(C const&) = delete; C& operator=(C const&) = delete /* next token must be ; */
                              ^
      /wf/tortugo-no-shen-loop-opts/src/hotspot/share/gc/z/zMappedCache.cpp:454:15: error: use of deleted function ‘ZList<T>::ZList(const ZList<T>&) [with T = ZMappedCache::ZSizeClassListNode]’
           _min(_size) {}
                     ^
      In file included from /wf/tortugo-no-shen-loop-opts/src/hotspot/share/nmt/memTag.hpp:28:0,
                       from /wf/tortugo-no-shen-loop-opts/src/hotspot/share/memory/allocation.hpp:29,
                       from /wf/tortugo-no-shen-loop-opts/src/hotspot/share/classfile/classLoaderData.hpp:28,
                       from /wf/tortugo-no-shen-loop-opts/src/hotspot/share/precompiled/precompiled.hpp:32:
      /wf/tortugo-no-shen-loop-opts/src/hotspot/share/gc/z/zList.hpp:65:15: note: declared here
         NONCOPYABLE(ZList);
                     ^
      /wf/tortugo-no-shen-loop-opts/src/hotspot/share/utilities/globalDefinitions.hpp:87:24: note: in definition of macro ‘NONCOPYABLE’
       #define NONCOPYABLE(C) C(C const&) = delete; C& operator=(C const&) = delete /* next token must be ; */
                              ^
      gmake[3]: *** [/wf/tortugo-no-shen-loop-opts/build/linux-x86_64-server-slowdebug/hotspot/variant-server/libjvm/objs/zMappedCache.o] Error 1
      gmake[3]: *** Waiting for unfinished jobs....
      gmake[3]: *** wait: No child processes. Stop.
      gmake[2]: *** [hotspot-server-libs] Error 1

      ERROR: Build failed for target 'default (exploded-image)' in configuration 'linux-x86_64-server-slowdebug' (exit code 2)
      ```

            Unassigned Unassigned
            cslucas Cesar Soares
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: