Raise the aarch64 assembler baseline so Abseil can build - #248
Open
hsinhoyeh wants to merge 2 commits into
Open
Conversation
The server image hardcoded bazel-$BAZEL_VERSION-installer-linux-x86_64.sh, so ml_metadata_store_server could only be built on x86_64. This is one of the reasons the published image is amd64-only, which in turn blocks Kubeflow Pipelines on ARM clusters (kubeflow/pipelines#10308). Bazel publishes a linux-arm64 release for 7.7.0, but as a plain binary rather than an installer script, so select the artifact from `dpkg --print-architecture` and install it directly to /usr/local/bin. On x86_64 this is equivalent to the previous installer invocation: the installer's only effect here was to place the same bazel binary on PATH.
Abseil's absl/debugging/stacktrace.cc emits xpaclri, an ARMv8.3
pointer-authentication instruction. GNU as rejects it at the default
armv8-a baseline, so the build fails on aarch64:
external/abseil-cpp/absl/debugging/stacktrace.cc [for tool] failed
/tmp/ccRV18O3.s:166: Error: selected processor does not support `xpaclri'
Pass -march=armv8.3-a when building for arm64. Both --copt and --host_copt
are required: the failing target is compiled in the exec configuration,
which --copt does not affect, so with --copt alone the error is unchanged.
The flag is invalid on x86_64, so it is selected from
`dpkg --print-architecture` and x86_64 builds are unaffected.
-march=armv8-a+pauth would be preferable, since xpaclri is HINT-space and a
no-op on cores without pointer authentication, whereas armv8.3-a makes the
binary require ARMv8.3 hardware. GCC 9 on the ubuntu:20.04 builder rejects
it, though:
cc1: error: invalid feature modifier 'pauth' in '-march=armv8-a+pauth'
so a newer builder base image would be the better long-term fix.
Verified on master: with this change the image builds clean on aarch64 and
metadata_store_server starts.
This was referenced Aug 3, 2026
|
@vkarampudi Could you help review this PR when you get a chance? I noticed you've been active around here recently! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #247, which I offered there. This PR is stacked on #247 — please merge that one first, or I can rebase this onto master if you prefer them independent.
Together the two changes make
ml_metadata_store_serverbuild onlinux/arm64.Problem
With #247 applied, Bazel installs and runs on aarch64, but the build then fails in Abseil.
absl/debugging/stacktrace.ccemitsxpaclri, an ARMv8.3 pointer-authentication instruction, which GNU as rejects at the defaultarmv8-abaseline:Change
Pass
-march=armv8.3-awhen the build architecture is arm64, selected fromdpkg --print-architecture. The flag is invalid on x86_64, so those builds are untouched.--host_coptis required in addition to--copt. The failing target is compiled[for tool], i.e. in the exec configuration, which--coptdoes not affect. With--coptalone the error is byte-identical, which makes it look as though the flag had no effect — that cost me a build cycle, so it seemed worth a comment in the Dockerfile.A caveat I would rather flag than hide
-march=armv8-a+pauthwould be the better choice.xpaclriis in HINT space and a no-op on cores without pointer authentication, so+pauthkeeps ARMv8.0 compatibility, whereasarmv8.3-araises the baseline and makes the binary require ARMv8.3 hardware — Graviton2, for instance, is ARMv8.2.GCC 9 on the
ubuntu:20.04builder rejects it:So the cleaner long-term fix is a newer builder base image, after which this could become
+pauthor drop away entirely. I did not want to bundle a base-image bump into this PR unasked — happy to do it if you would prefer that route.Verification
On master (
be943b8) with #247 applied, on an aarch64 host (NVIDIA GB10, Ubuntu 24.04):The full C++ tree — ZetaSQL, gRPC, libmysqlclient, PostgreSQL — compiles with zero errors.
I have not rebuilt on x86_64 to confirm no regression there; the flag is gated behind the arch check, so x86_64 takes the same code path as before, but your CI would confirm that properly.
Context: this unblocks Kubeflow Pipelines on ARM, tracked in kubeflow/pipelines#10308 and kubeflow/pipelines#13957.