Bazel build fails: Unable to find a CC toolchain using toolchain resolution on ARM64 (aarch64) host
Description
When building the latest commit of this repository on an ARM64 (aarch64) Linux host (e.g., Raspberry Pi), the build fails with:
ERROR: ... in cc_toolchain_alias rule @@rules_cc+//cc:current_cc_toolchain: Error in fail: Unable to find a CC toolchain using toolchain resolution. Target: @@rules_cc+//cc:current_cc_toolchain, Platform: @@bazel_tools//tools:host_platform, Exec platform: @@bazel_tools//tools:host_platform ERROR: Analysis of target '//score/mw/com:com' failed; build aborted: Analysis failed
Steps to reproduce:
Clone the repo:
git clone https://github.com/eclipse-score/communication.git
Run the build
bazel build --cpu=aarch64 //score/mw/com:com
Expected:
Build completes successfully.
What I tried:
Registered an aarch64 toolchain in MODULE.bazel.
Added register_toolchains("@gcc_toolchain_aarch64//:cc_toolchain").
Forced the build with --cpu=aarch64 and --platforms=@platforms//cpu:aarch64.
Verified all dependency versions and extension ordering.
Cleaned Bazel cache and retried all steps.
Result:
The error persists. It appears there is no ARM64 host toolchain provided or registered by default, or the toolchain archive for aarch64 is missing.
Environment:
Host: ARM64 (Raspberry Pi 5, Linux)
Bazel: 8.x/9.x
GCC: Native ARM64 GCC available
Expected:
Bazel should find and use a valid C++ toolchain for ARM64 hosts, or provide guidance for using the system GCC.
Can you provide ARM64 host toolchain support or instructions for using the system GCC toolchain?
Bazel build fails: Unable to find a CC toolchain using toolchain resolution on ARM64 (aarch64) host
Description
When building the latest commit of this repository on an ARM64 (aarch64) Linux host (e.g., Raspberry Pi), the build fails with:
ERROR: ... in cc_toolchain_alias rule @@rules_cc+//cc:current_cc_toolchain: Error in fail: Unable to find a CC toolchain using toolchain resolution. Target: @@rules_cc+//cc:current_cc_toolchain, Platform: @@bazel_tools//tools:host_platform, Exec platform: @@bazel_tools//tools:host_platform ERROR: Analysis of target '//score/mw/com:com' failed; build aborted: Analysis failedSteps to reproduce:
Clone the repo:
git clone https://github.com/eclipse-score/communication.git
Run the build
bazel build --cpu=aarch64 //score/mw/com:com
Expected:
Build completes successfully.
What I tried:
Registered an aarch64 toolchain in MODULE.bazel.
Added register_toolchains("@gcc_toolchain_aarch64//:cc_toolchain").
Forced the build with --cpu=aarch64 and --platforms=@platforms//cpu:aarch64.
Verified all dependency versions and extension ordering.
Cleaned Bazel cache and retried all steps.
Result:
The error persists. It appears there is no ARM64 host toolchain provided or registered by default, or the toolchain archive for aarch64 is missing.
Environment:
Host: ARM64 (Raspberry Pi 5, Linux)
Bazel: 8.x/9.x
GCC: Native ARM64 GCC available
Expected:
Bazel should find and use a valid C++ toolchain for ARM64 hosts, or provide guidance for using the system GCC.
Can you provide ARM64 host toolchain support or instructions for using the system GCC toolchain?