You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bazel build is able to pick the _cc_toolchain on version 0.56, but failing with the following compile error after updating to 0.57.1 (redacted):
...
ERROR: .../external/rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools/BUILD.bazel:96:15: in rust_toolchain rule @@rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools//:rust_toolchain:
Traceback (most recent call last):
File ".../external/rules_rust/rust/toolchain.bzl", line 670, column 72, in _rust_toolchain_impl
libstd_and_allocator_ccinfo = _make_libstd_and_allocator_ccinfo(ctx, rust_std, ctx.attr.allocator_library, "std"),
File ".../external/rules_rust/rust/toolchain.bzl", line 159, column 60, in _make_libstd_and_allocator_ccinfo
cc_toolchain, feature_configuration = find_cc_toolchain(ctx)
File ".../external/rules_rust/rust/private/utils.bzl", line 55, column 43, in find_cc_toolchain
cc_toolchain = find_rules_cc_toolchain(ctx)
File ".../external/bazel_tools/tools/cpp/toolchain_utils.bzl", line 63, column 9, in find_cpp_toolchain
fail("In order to use find_cpp_toolchain, you must define the '_cc_toolchain' attribute on your rule or aspect.")
Error in fail: In order to use find_cpp_toolchain, you must define the '_cc_toolchain' attribute on your rule or aspect.
...
The text was updated successfully, but these errors were encountered:
Hmm, checking the version of find_cpp_toolchain in Bazel 7.4.0, this appears to be following the "toolchain resolution for C++ not enabled" branch.
Are you explicitly disabling toolchain resolution for C++ (with the --incompatible_enable_cc_toolchain_resolution flag)? That's simply not compatible with recent Bazel rules (and, in Bazel 8.0, is an ignored flag).
Are you explicitly disabling toolchain resolution for C++ (with the --incompatible_enable_cc_toolchain_resolution flag)? That's simply not compatible with recent Bazel rules (and, in Bazel 8.0, is an ignored flag).
I am relatively new to bazel, integrating my Rust code base into large C++ project. But from what I can see I have this setting in the workspace root:
common --noincompatible_enable_cc_toolchain_resolution
You should no longer be using either --noincompatible_enable_cc_toolchain_resolution or --crosstool_top: please see the documentation (especially those linked from bazelbuild/bazel#21121 (comment)) for the new flags to use.
We can no longer support those flags, so you'll need to update your project. There's really nothing I can do further, so no need to find a way for me to reproduce.
I am using WORKSPACE based setup with Bazel 7.4
bazel build is able to pick the _cc_toolchain on version 0.56, but failing with the following compile error after updating to 0.57.1 (redacted):
The text was updated successfully, but these errors were encountered: