Skip to content

riscv64 : Error building bazel from scratch #19331

@CoolKingYY

Description

@CoolKingYY

Description of the bug:

[fedora@fedora-riscv bazel]$ env EXTRA_BAZEL_ARGS="--tool_java_runtime_version=local_jdk" bash ./compile.sh

ERROR: /home/fedora/bazel/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/BUILD:169:23: JavacBootstrap src/java_tools/buildjar/java/com/google/devtools/build/buildjar/libstarlark-deps.jar [for tool] failed: (Exit 1): bash failed: error executing command (from target //src/java_tools/buildjar/java/com/google/devtools/build/buildjar:starlark-deps) (cd /tmp/bazel_OY7GtMvI/out/execroot/io_bazel && \
........
# Execution platform: //:default_host_platform
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at java.base/java.util.HashMap.resize(HashMap.java:699) at java.base/java.util.HashMap.putVal(HashMap.java:624) at java.base/java.util.HashMap.put(HashMap.java:607) at java.base/java.util.ListResourceBundle.loadLookup(ListResourceBundle.java:204) at java.base/java.util.ListResourceBundle.handleGetObject(ListResourceBundle.java:130) at java.base/java.util.ResourceBundle.getObject(ResourceBundle.java:555) at java.base/java.util.ResourceBundle.getString(ResourceBundle.java:521) at jdk.compiler/com.sun.tools.javac.util.JavacMessages.getLocalizedString(JavacMessages.java:220) at jdk.compiler/com.sun.tools.javac.util.JavacMessages.getLocalizedString(JavacMessages.java:166) at jdk.compiler/com.sun.tools.javac.util.JavacMessages.getLocalizedString(JavacMessages.java:155) at jdk.compiler/com.sun.tools.javac.util.Log.localize(Log.java:810) at jdk.compiler/com.sun.tools.javac.util.Log.printLines(Log.java:608) at jdk.compiler/com.sun.tools.javac.main.Main.resourceMessage(Main.java:414) at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:326) at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:170) at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57) at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43) Target //src:bazel_nojdk failed to build INFO: Elapsed time: 4221.755s, Critical Path: 1440.35s INFO: 1902 processes: 330 internal, 1572 local. FAILED: Build did NOT complete successfully ERROR: Could not build

Which category does this issue belong to?

C++/Objective-C Rules

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

sudo dnf install gcc java-11-openjdk zip unzip python3
cd ~/bazel
export BAZEL_JAVAC_OPTS="-J-Xmx20g"
env EXTRA_BAZEL_ARGS="--tool_java_runtime_version=local_jdk" bash ./compile.sh -j32

Which operating system are you running Bazel on?

Linux fedora-riscv 6.1.42 #1 SMP Fri Aug 18 02:30:30 CST 2023 riscv64 GNU/Linux

What is the output of bazel info release?

bazel-6.3.2-dist

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?

No response

Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

Two steps:
The first step "Building Bazel from scratch" spends me much time.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions