bazelisk icon indicating copy to clipboard operation
bazelisk copied to clipboard

Fetch arm64 version when using USE_BAZEL_VERSION=$commit

Open meteorcloudy opened this issue 3 years ago • 10 comments

Currently even the arm64 version of Bazelisk fetches x86_64 version of Bazel binaries when fetching from a commit hash.

https://github.com/bazelbuild/bazelisk/blob/9102523655067867b701fc25ae9819b9acd2c24f/platforms/platforms.go#L11 needs to be updated to include macos_arm64 and windows_arm64.

Although, we currently only publish arm64 Bazel binaries for macOS and Windows, not Linux ...

meteorcloudy avatar May 13 '22 14:05 meteorcloudy

/cc @fweikert

meteorcloudy avatar May 13 '22 14:05 meteorcloudy

@Wyverald

meteorcloudy avatar May 13 '22 14:05 meteorcloudy

I don't have an M1 machine to test, but shouldn't line 35 handle this problem? It's also possible that DarwinFallback() cannot handle commits (just a theory).

fweikert avatar May 13 '22 15:05 fweikert

Yeah, I think line 35 only handles release versions (v.LessThan(armSupportVer))

meteorcloudy avatar May 13 '22 15:05 meteorcloudy

See also https://github.com/bazelbuild/bazelisk/pull/303/

keith avatar May 17 '22 00:05 keith

Just got bitten by this bug when our CI attempted building TensorFlow overnight for AARCH64 after an update to pick a commit hash for the bazel version. https://ci.linaro.org/view/All/job/ldcg-python-manylinux-tensorflow-onednn-nightly/140/console

elfringham avatar Aug 05 '22 09:08 elfringham

What is the status of this issue? TensorFlow supports ARM64. If USE_BAZEL_VERSION=$commit doesn't work on ARM64, it practically prevents TensorFlow from using this feature.

learning-to-play avatar Aug 05 '22 16:08 learning-to-play

are you using the latest bazelisk release?

keith avatar Aug 05 '22 16:08 keith

@keith We were using 1.11.0. I just tried it with 1.12.0 and get a different error now, it fails with a 404. So assuming the path now attempted to be downloaded by bazelisk is correct, then maybe this is now a bazel problem in that the artifacts are not being created. bazel --version 2022/08/06 09:47:13 Using unreleased version at commit f440f8ec3f63e5d663e1f9d9614f05a39422102a 2022/08/06 09:47:13 Downloading https://storage.googleapis.com/bazel-builds/artifacts/ubuntu1404_arm64/f440f8ec3f63e5d663e1f9d9614f05a39422102a/bazel... 2022/08/06 09:47:13 could not download Bazel: HTTP GET https://storage.googleapis.com/bazel-builds/artifacts/ubuntu1404_arm64/f440f8ec3f63e5d663e1f9d9614f05a39422102a/bazel failed with error 404

elfringham avatar Aug 06 '22 09:08 elfringham

This seems now to be dependent on https://github.com/bazelbuild/continuous-integration/issues/1402 and then having the download block removed that was introduced with https://github.com/bazelbuild/bazelisk/pull/346 and https://github.com/bazelbuild/bazelisk/pull/347

elfringham avatar Aug 18 '22 10:08 elfringham