Rejected go_darwin_arm64 mismatching values: x86_64

13 views
Skip to first unread message

Matt Peterson

unread,
Jun 24, 2022, 6:34:37 PMJun 24
to bazel-discuss

I'm trying to get a Bazel build working on my MacBook Pro M1 on Monterey, and I'm having a difficult time. When I try to build a docker image, I get go toolchain errors (with --toolchain_resolution_debug='go') that look like this:

INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @local_config_platform//:host: Rejected toolchain @go-auto//:go_darwin_amd64-impl; mismatching values: x86_64
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @local_config_platform//:host: Rejected toolchain @go-auto//:go_darwin_arm-impl; mismatching values: arm
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: execution platform @local_config_platform//:host: Rejected toolchain @go-auto//:go_darwin_arm64-impl; mismatching values: x86_64

Why does it say it rejects an arm64 implementation because it's not x86_64? It seems like there's something broken here.

For reference, here's bazel version:

Bazelisk version: development
Build label: 5.2.0
Build target: bazel-out/darwin_arm64-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Tue Jun 7 16:11:09 2022 (1654618269)
Build timestamp: 1654618269
Build timestamp as int: 1654618269

And some relevant bits from my WORKSPACE:

load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
git_repository(
name = "io_bazel_rules_k8s",
# branch = "master", # TODO: fill in a specific commit or something
commit = "fee80eb69e1921c076167ebebcf5eea3d2e9c707",
shallow_since = "1655492445 -0700",
)
load("@io_bazel_rules_k8s//k8s:k8s.bzl", "k8s_repositories")
k8s_repositories()

load("@io_bazel_rules_go//go:deps.bzl", "go_download_sdk", "go_register_toolchains", "go_rules_dependencies")
go_rules_dependencies()
go_register_toolchains()
go_download_sdk(
name = "go-auto",
)

Reply all
Reply to author
Forward
0 new messages