JetBrains / JetBrainsRuntime

Runtime environment based on OpenJDK for running IntelliJ Platform-based products on Windows, macOS, and Linux
GNU General Public License v2.0
1.3k stars 193 forks source link

branch jbr21 make images build fails #389

Closed treeshateorcs closed 4 months ago

treeshateorcs commented 4 months ago
 JetBrainsRuntime make images                                                jbr21
Building target 'images' in configuration 'linux-x86_64-server-release'
Compiling up to 1 files for BUILD_TOOLS_HOTSPOT
Compiling up to 8 files for BUILD_TOOLS_LANGTOOLS
Creating hotspot/variant-server/tools/adlc/adlc from 13 file(s)
Compiling up to 2 files for BUILD_JVMTI_TOOLS
Compiling 17 properties into resource bundles for jdk.javadoc
Generating classes for compiler.properties launcher.properties
Compiling 20 properties into resource bundles for jdk.compiler
Compiling 15 properties into resource bundles for jdk.jdeps
Compiling 9 properties into resource bundles for jdk.jshell
Compiling up to 127 files for BUILD_java.compiler.interim
Compiling up to 353 files for BUILD_jdk.compiler.interim
Compiling up to 242 files for BUILD_jdk.javadoc.interim
Compiling up to 17 files for BUILD_JAVAC_SERVER
Creating support/modules_libs/java.base/server/libjvm.so from 1223 file(s)
In file included from /home/tho/dev/JetBrainsRuntime/src/hotspot/share/classfile/classLoaderData.hpp:33,
                 from /home/tho/dev/JetBrainsRuntime/src/hotspot/share/precompiled/precompiled.hpp:34:
/home/tho/dev/JetBrainsRuntime/src/hotspot/share/utilities/growableArray.hpp:121:24: error: template-id not allowed for constructor in C++20 [-Werror=template-id-cdtor]
  121 |   GrowableArrayView<E>(E* data, int capacity, int initial_len) :
      |                        ^
/home/tho/dev/JetBrainsRuntime/src/hotspot/share/utilities/growableArray.hpp:121:24: note: remove the '< >'
/home/tho/dev/JetBrainsRuntime/src/hotspot/share/utilities/growableArray.hpp:348:29: error: template-id not allowed for constructor in C++20 [-Werror=template-id-cdtor]
  348 |   GrowableArrayFromArray<E>(E* data, int len) :
      |                             ^
/home/tho/dev/JetBrainsRuntime/src/hotspot/share/utilities/growableArray.hpp:348:29: note: remove the '< >'
In file included from /home/tho/dev/JetBrainsRuntime/src/hotspot/share/memory/allocation.hpp:30,
                 from /home/tho/dev/JetBrainsRuntime/src/hotspot/share/classfile/classLoaderData.hpp:28:
/home/tho/dev/JetBrainsRuntime/src/hotspot/share/utilities/linkedlist.hpp:85:15: error: template-id not allowed for constructor in C++20 [-Werror=template-id-cdtor]
   85 |   NONCOPYABLE(LinkedList<E>);
      |               ^~~~~~~~~~~~~
/home/tho/dev/JetBrainsRuntime/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/tho/dev/JetBrainsRuntime/src/hotspot/share/utilities/linkedlist.hpp:85:15: note: remove the '< >'
   85 |   NONCOPYABLE(LinkedList<E>);
      |               ^~~~~~~~~~~~~
/home/tho/dev/JetBrainsRuntime/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
make[3]: *** [lib/CompileJvm.gmk:147: /home/tho/dev/JetBrainsRuntime/build/linux-x86_64-server-release/hotspot/variant-server/libjvm/objs/precompiled/precompiled.hpp.gch] Error 1
make[2]: *** [make/Main.gmk:252: hotspot-server-libs] Error 2
make[2]: *** Waiting for unfinished jobs....

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/tho/dev/JetBrainsRuntime/src/hotspot/share/classfile/classLoaderData.hpp:33,
                 from /home/tho/dev/JetBrainsRuntime/src/hotspot/share/precompiled/precompiled.hpp:34:
/home/tho/dev/JetBrainsRuntime/src/hotspot/share/utilities/growableArray.hpp:121:24: error: template-id not allowed for constructor in C++20 [-Werror=template-id-cdtor]
  121 |   GrowableArrayView<E>(E* data, int capacity, int initial_len) :
      |                        ^
/home/tho/dev/JetBrainsRuntime/src/hotspot/share/utilities/growableArray.hpp:121:24: note: remove the '< >'
/home/tho/dev/JetBrainsRuntime/src/hotspot/share/utilities/growableArray.hpp:348:29: error: template-id not allowed for constructor in C++20 [-Werror=template-id-cdtor]
  348 |   GrowableArrayFromArray<E>(E* data, int len) :
      |                             ^
/home/tho/dev/JetBrainsRuntime/src/hotspot/share/utilities/growableArray.hpp:348:29: note: remove the '< >'
In file included from /home/tho/dev/JetBrainsRuntime/src/hotspot/share/memory/allocation.hpp:30,
                 from /home/tho/dev/JetBrainsRuntime/src/hotspot/share/classfile/classLoaderData.hpp:28:
/home/tho/dev/JetBrainsRuntime/src/hotspot/share/utilities/linkedlist.hpp:85:15: error: template-id not allowed for constructor in C++20 [-Werror=template-id-cdtor]
   85 |   NONCOPYABLE(LinkedList<E>);
      |               ^~~~~~~~~~~~~
   ... (rest of output omitted)

* All command lines available in /home/tho/dev/JetBrainsRuntime/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/tho/dev/JetBrainsRuntime/make/Init.gmk:323: main] Error 2
make: *** [/home/tho/dev/JetBrainsRuntime/make/Init.gmk:189: images] Error 2
vprovodin commented 4 months ago

It works well on our side. Could you please provide us with the Configuration summary? It my be takn from the log produced by the script configure after the line

====================================================
avu commented 4 months ago

@treeshateorcs I suppose you're building on some new Linux distro (like Fedora 40, for example). Unfortunately, it's not a standard build environment for jbr21. Please use --disable-warnings-as-errors in the configure script to build on such a system.

treeshateorcs commented 4 months ago

@vprovodin

here's what you've requested

The existing configuration has been successfully updated in
/home/tho/dev/JetBrainsRuntime/build/linux-x86_64-server-release
using default settings.

Configuration summary:
* Name:           linux-x86_64-server-release
* Debug level:    release
* HS debug level: product
* JVM variants:   server
* JVM features:   server: 'cds compiler1 compiler2 epsilongc g1gc jfr jni-check jvmci jvmti management parallelgc serialgc services shenandoahgc vm-structs zgc' 
* OpenJDK target: OS: linux, CPU architecture: x86, address length: 64
* Version string: 21.0.3-internal-adhoc.tho.JetBrainsRuntime (21.0.3-internal)
* Source date:    1716800427 (2024-05-27T09:00:27Z)

Tools summary:
* Boot JDK:       openjdk version "21.0.3" 2024-04-16 OpenJDK Runtime Environment (build 21.0.3+9) OpenJDK 64-Bit Server VM (build 21.0.3+9, mixed mode, sharing) (at /usr/lib/jvm/java-21-openjdk)
* Toolchain:      gcc (GNU Compiler Collection)
* C Compiler:     Version 14.1.1 (at /usr/bin/gcc)
* C++ Compiler:   Version 14.1.1 (at /usr/bin/g++)

Build performance summary:
* Build jobs:     16
* Memory limit:   31397 MB

WARNING: The result of this configuration has overridden an older
configuration. You *should* run 'make clean' to make sure you get a
proper build. Failure to do so might result in strange build problems.

@avu yes, i'm using arch, after adding that line it builds successfully. thank you!

NikitkoCent commented 4 months ago

I think it's worth keeping the issue open, because --disable-warnings-as-errors is just a workaround, not a solution. I've filed JBR-7214 to keep tracking the state.

NikitkoCent commented 4 months ago

@treeshateorcs, I apologize for confusing you, but there's no need to keep the issue on GH opened - our primary tracker is YouTrack, and there's already such an issue there. Therefore, I'm closing this one.