-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
riscv64 : Error building bazel from scratch #19331
Comments
@CoolKingYY, Could you please provide complete steps to reproduce this issue? |
I've updated the question, do you need any other info? |
@CoolKingYY do you have a repo that you can share so that we can reproduce the errors that you're seeing? |
Now, an error is reported as follows:
[fedora@fedora-riscv bazel]$ java -version [fedora@fedora-riscv bazel-6.3.0]$ gcc -v |
Hi, the reason for the first problem is that I didn't handle the soft links for gcc12 as well as for java-11-openjdk. |
Thanks to the help of bazel techs, this issue has been resolved and closed. |
Hi can you explain further what you did and you fixxed it? |
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
returnsdevelopment 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.
The text was updated successfully, but these errors were encountered: