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
I'm running a repository built with bazel using clang from a CROSSTOOL based on this repository. Setting up a brand new machine for a new employee today, the build fails with the following error:
$ bazel build //basically:anything
ERROR: /home/user/.cache/bazel/_bazel_user/b66616ba40524aac761ec07c06bbfdfc/external/local_config_cc/BUILD:57:1: in cc_toolchain rule @local_config_cc//:cc-compiler-k8: Error while selecting cc_toolchain: Toolchain identifier 'local' was not found, valid identifiers are [clang-linux, clang-darwin]
ERROR: Analysis of target '//core/external/ros2:ros2' failed; build aborted: Analysis of target '@local_config_cc//:cc-compiler-k8' failed; build aborted
INFO: Elapsed time: 0.111s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)
I think this is related to bazel release 0.19.1 (my machine and others which work are on 0.19.0 right now). I also suspect it is related to this issue.
The repository .bazelrc contains
build --crosstool_top=@clang6llvm//:toolchain
run --crosstool_top=@clang6llvm//:toolchain
test --crosstool_top=@clang6llvm//:toolchain
to select our toolchain.
Any advice on how to fix this problem would be greatly appreciated. To be honest, I find the bazel toolchain/crosstool configuration pretty impenetrable and I have no idea why rules in local_config_cc/BUILD are even being built, so I'm at a loss as to how to debug or work around the problem.
The text was updated successfully, but these errors were encountered:
For record, this is not the right repo to open issues related to custom written crosstool/toolchains. For these types of questions/issues you should contact bazel-discuss@googlegroups.com or open an issue in the bazel github repo.
The problem was that the cc_toolchain defined in local_config_cc was picking up the CROSSTOOL file from --crosstool_top. This custom CROSSTOOL file did not have a toolchain with toolchain_identifier = local.
I'm running a repository built with bazel using
clang
from aCROSSTOOL
based on this repository. Setting up a brand new machine for a new employee today, the build fails with the following error:I think this is related to bazel release 0.19.1 (my machine and others which work are on 0.19.0 right now). I also suspect it is related to this issue.
The repository
.bazelrc
containsto select our toolchain.
Any advice on how to fix this problem would be greatly appreciated. To be honest, I find the bazel toolchain/crosstool configuration pretty impenetrable and I have no idea why rules in
local_config_cc/BUILD
are even being built, so I'm at a loss as to how to debug or work around the problem.The text was updated successfully, but these errors were encountered: