-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
Summary
rules_buf fails to download buf binaries on Linux ARM64 systems because it uses the wrong naming convention. The rules look for linux-arm64 but buf releases use Linux-aarch64 for Linux ARM64 platforms.
Environment
- OS: Linux ARM64 (Android Termux)
- Architecture: aarch64
- Bazel version: 7.4.1
- rules_buf version: 0.4.0
Error
WARNING: Download from https://github.com/bufbuild/buf/releases/download/v1.54.0/protoc-gen-buf-lint-linux-arm64 failed: class java.io.FileNotFoundException GET returned 404 Not Found
Root Cause
The buf project releases binaries with these naming conventions:
- macOS ARM64:
buf-Darwin-arm64 - Linux ARM64:
buf-Linux-aarch64 - Linux x86_64:
buf-Linux-x86_64
However, rules_buf tries to download using linux-arm64 instead of Linux-aarch64.
Actual Release Assets
From buf v1.54.0 releases:
buf-Darwin-arm64(macOS ARM64)buf-Linux-aarch64(Linux ARM64)protoc-gen-buf-lint-Linux-aarch64(Linux ARM64)protoc-gen-buf-breaking-Linux-aarch64(Linux ARM64)
Suggested Fix
In the toolchain.bzl file, the platform detection logic should map:
- Darwin + arm64 →
Darwin-arm64 - Linux + arm64 →
Linux-aarch64(notlinux-arm64)
Workaround
Until fixed, users on Linux ARM64 need to manually download and configure the buf binaries.
References
- Buf releases: https://github.com/bufbuild/buf/releases
- toolchain.bzl source: https://github.com/bufbuild/rules_buf/blob/main/buf/internal/toolchain.bzl
Metadata
Metadata
Assignees
Labels
No labels