bazelisk icon indicating copy to clipboard operation
bazelisk copied to clipboard

Mac M1 works with bazel github releases but not bazelisk auto-installed bazel

Open ranaya-formant opened this issue 3 years ago • 1 comments

I got errors about using go toolchain using bazelisk

ERROR: While resolving toolchains for target //:gazelle-runner: no matching toolchains found for types @io_bazel_rules_go//go:toolchain ERROR: Analysis of target '//:gazelle' failed; build aborted: no matching toolchains found for types @io_bazel_rules_go//go:toolchain

but when I installed using bazel install script it worked.

Both were same versions.

ranaya-formant avatar Oct 06 '22 21:10 ranaya-formant

It's likely that you're switching between x86 and arm64 bazel versions, and hitting https://github.com/bazelbuild/bazel/issues/15350

You likely need to bazelisk clean --expunge, and rebuild, and if it still doesn't work maybe you need to update rules_go if your version isn't new enough to support arm64 macs?

keith avatar Oct 06 '22 21:10 keith

Doesn't seem related to Bazelisk. As Keith pointed out, upgrading rules_go is usually the way to go here.

fweikert avatar Feb 06 '24 16:02 fweikert