Skip to content

Cross-compiling Bazel for arm64 platforms is broken #15465

@meteorcloudy

Description

@meteorcloudy

Description of the bug:

During our release process, we encountered the following errors when cross-compiling for macOS arm64 and Windows arm64 platforms

ERROR: /Users/buildkite/builds/bk-trusted-macpro-4/bazel-trusted/bazel-release/src/BUILD:166:10: Illegal ambiguous match on configurable attribute "srcs" in //src:embedded_jdk_minimal_cached:
//src/conditions:darwin_x86_64
//src/conditions:darwin_arm64
Multiple matches are not allowed unless one is unambiguously more specialized.
ERROR: C:/b/bk-trusted-windows-qkvt/bazel-trusted/bazel-release/src/BUILD:166:10: Illegal ambiguous match on configurable attribute "srcs" in //src:embedded_jdk_minimal_cached:
//src/conditions:windows_arm64
//src/conditions:windows_x86_64

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

On macOS x86_64:

export USE_BAZEL_VERSION=108c17859c255a350724b661b74e19aeacf44fe6
bazelisk build --nobuild --cpu=darwin_arm64 //src:bazel

On Windows x86_64:

export USE_BAZEL_VERSION=108c17859c255a350724b661b74e19aeacf44fe6
bazelisk build --nobuild --cpu= x64_arm64_windows //src:bazel

Which operating system are you running Bazel on?

macOS and Windows

What is the output of bazel info release?

108c178

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

Bisect points to 108c178 as the culprit

Metadata

Metadata

Assignees

Labels

P1I'll work on this now. (Assignee required)team-Configurabilityplatforms, toolchains, cquery, select(), config transitionstype: bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions