bazelbuild / bazelbuild/bazel

Illegal instruction (core dumped) in risc-v

Open
#23,051 2 comments 0 reactions 0 assignees View on GitHub
help wanted P3 team-Core team-OSS type: bug
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 18h
Merged PRs (30d)
75

Description

### Description of the bug:

nowadays, i am working on building bazel 6.1.0 from source. here are the [ways](https://bazel.build/install/compile-source?hl=zh-cn).

- first way:

> $ cat /etc/os-release
> NAME="openEuler"
> VERSION="24.03 (LTS)"
> ID="openEuler"
> VERSION_ID="24.03"
> PRETTY_NAME="openEuler 24.03 (LTS)"
> ANSI_COLOR="0;31"
> $ uname -a
> Linux openeuler-riscv64-worker1 6.6.0 #1 SMP Tue Jul 2 11:21:06 CST 2024 riscv64 riscv64 riscv64 GNU/Linux

> sudo dnf install bazel
> git clone https://github.com/bazelbuild/bazel.git
> cd bazel
> git checkout tags/6.1.0
> bazel build //src:bazel-dev

> $ bazel build //src:bazel-dev
> Illegal instruction (core dumped)

- second way:

i download the [dist file](https://github.com/bazelbuild/bazel/releases/download/6.1.0/bazel-6.1.0-dist.zip), and run `env EXTRA_BAZEL_ARGS="--tool_java_runtime_version=local_jdk" ./compile.sh`.
happily, i get the bazel binary file. but when i run `bazel version`,i get the same error `Illegal instruction (core dumped)`

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with `bazel build //src:bazel-dev` and with `env EXTRA_BAZEL_ARGS="--tool_java_runtime_version=local_jdk" ./compile.sh`, then check the resulting `bazel version` invocation and core dump on the reported openEuler riscv64 system. There is no source file or failing test named; done means identifying the instruction incompatibility and documenting or validating a compatible fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, linux
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.