Skip to content
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

No matching toolchain for ninja_toolchain on arm64 #1305

Open
tkekan opened this issue Oct 18, 2024 · 1 comment
Open

No matching toolchain for ninja_toolchain on arm64 #1305

tkekan opened this issue Oct 18, 2024 · 1 comment

Comments

@tkekan
Copy link

tkekan commented Oct 18, 2024

Env:
I'm running OL8 docker on Apple Silicon and trying to build a C++ repo on it. There is a third-party which is being built using below cmake

While using the load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake") I get below errors . Looking at the docs ideally it should be work right ?

WARNING: Build option --toolchain_resolution_debug has changed, discarding analysis cache (this can be expensive, see https://bazel.build/advanced/performance/iteration-speed). INFO: ToolchainResolution: Performing resolution of @@bazel_tools//tools/cpp:toolchain_type for target platform @@platforms//host:host ToolchainResolution: Toolchain @@bazel_tools~cc_configure_extension~local_config_cc//:cc-compiler-aarch64 is compatible with target plaform, searching for execution platforms: ToolchainResolution: Compatible execution platform @@platforms//host:host ToolchainResolution: All execution platforms have been assigned a @@bazel_tools//tools/cpp:toolchain_type toolchain, stopping ToolchainResolution: Recap of selected @@bazel_tools//tools/cpp:toolchain_type toolchains for target platform @@platforms//host:host: ToolchainResolution: Selected @@bazel_tools~cc_configure_extension~local_config_cc//:cc-compiler-aarch64 to run on execution platform @@platforms//host:host ERROR: /root/dpp-workspace/third-party/rules_libevent/BUILD:26:6: While resolving toolchains for target //third-party/rules_libevent:event (47d3177): No matching toolchains found for types @@rules_foreign_cc~//toolchains:ninja_toolchain. To debug, rerun with --toolchain_resolution_debug='@@rules_foreign_cc~//toolchains:ninja_toolchain'

@chrisseto
Copy link

This might be a duplicate of #1035?

It seems the underlying issue is two fold. 1) rules_foreign_cc eagerly establishes toolchains and 2) ninja does not provide a darwin arm64 build and only recently started providing a build for arm64.

I was able to fix a similar failure on linux by updating to the latest version (0.10.1 -> 0.12.0). this comment suggests trying to have bazel build ninja for you but I ended up getting errors from bazel because a toolchain definition required a toolchain to build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants