Reputation: 41
when I try to build bazel, I got the below errors:
/private/var/tmp/_bazel_user/a436f601856ed4b73afb5a5d5d56a412/external/llvm_toolchain/BUILD:24:18:
in cc_toolchain_suite rule @llvm_toolchain//:host_toolchain:
cc_toolchain_suite '@llvm_toolchain//:host_toolchain' does not contain a toolchain for cpu 'darwin_arm64'
I'm not clear what the error means. Can anyone help me? This is my system configuration:
Thanks!
Upvotes: 4
Views: 3621
Reputation: 2359
We observe this error quite often after an environmental change. Not sure if it's caused by an OS update or something else. However, the following recipe helped to overcome the problem without cleaning the Bazel cache, which could potentially be very expensive.
bazel sync --configure
Source: https://github.com/bazelbuild/bazel/issues/3787
sync --configure
will rerun toolchains that need system configuration (like when the JDK changes or XCode is updated etc.)
Note, this answer assumes your XCode is installed properly and you opened it at least once to accept the license and let it finish installations. We also noticed that Bazel needs a full XCode not just the CLI.
Upvotes: 1
Reputation: 355
I would request you to follow below steps
Please reach me back if the above issue is not resolved.
Upvotes: 2