Skip to content

[AAASM-2189] 🐛 (ci): Install protoc in maturin wheel builds (Linux + macOS)#68

Open
Chisanan232 wants to merge 2 commits into
masterfrom
v0.0.1/AAASM-2109/fix/maturin_protoc
Open

[AAASM-2189] 🐛 (ci): Install protoc in maturin wheel builds (Linux + macOS)#68
Chisanan232 wants to merge 2 commits into
masterfrom
v0.0.1/AAASM-2109/fix/maturin_protoc

Conversation

@Chisanan232
Copy link
Copy Markdown
Contributor

@Chisanan232 Chisanan232 commented May 29, 2026

Description

The v0.0.1-alpha.2 dry-run's Release Python SDK workflow had all 4 wheel builds fail with:

error: failed to run custom build command for `aa-proto v0.0.1 ...`
Caused by: Could not find `protoc`. If `protoc` is installed, try
  setting the `PROTOC` environment variable to the path of the
  `protoc` binary. To install it on Debian, run
  `apt-get install protobuf-compiler`.

aa-proto (a git dep on agent-assembly) has a build.rs that uses prost-build, which requires the protoc compiler. Neither the manylinux container nor the GitHub macOS runners ship protoc by default.

Fix

Two install patterns depending on the build environment:

Job Approach
build-linux-x86_64 (manylinux: auto) Add before-script-linux: yum install -y protobuf-compiler || dnf install -y protobuf-compiler to the PyO3/maturin-action@v1 invocation. yum covers manylinux2014 (CentOS 7); dnf covers manylinux_2_28+ (Rocky/Alma).
build-linux-aarch64 (manylinux: auto) Same pattern.
build-macos-arm64 (macos-14 runner) Add run: brew install protobuf step BEFORE the maturin-action. macOS doesn't have docker; before-script-linux doesn't apply.
build-macos-x86_64 (macos-13 runner) Same pattern.
build-sdist No change — sdist doesn't compile, so protoc not needed.

Local verification

  • actionlint .github/workflows/release-python.yml clean (pre-existing macos-13 runner warning is unrelated — Apple retired that label from GitHub-hosted runners; same warning exists on master)
  • before-script-linux is a documented PyO3/maturin-action@v1 input (ref: https://github.com/PyO3/maturin-action#inputs)

Note on CI

Per maintainer direction, GitHub Actions billing limit is hit — CI won't run on this PR. The fix is verified by inspection + memory project_aa_cli_compat_protoc_requirement.md confirms this is the same root cause we've fixed in agent-assembly CI before. Re-running once billing resets is the verification.

Related Issues

Type of Change

  • 🐛 Bug fix

— Claude Code (Opus 4.7, 1M context)

The v0.0.1-alpha.2 dry-run surfaced this in the manylinux wheel
build for x86_64 and aarch64:

  error: failed to run custom build command for `aa-proto v0.0.1 ...`
  Caused by: Could not find `protoc`. If `protoc` is installed, try
  setting the `PROTOC` environment variable to the path of the
  `protoc` binary. To install it on Debian, run
  `apt-get install protobuf-compiler`.

`aa-proto` (a git dependency on agent-assembly) has a build.rs that
uses prost-build, which requires the protoc compiler. The manylinux2014
image (CentOS 7-based; manylinux_2_28+ uses Rocky/Alma) and the
GitHub macOS runners do not ship protoc by default.

Fix:

  * Linux (manylinux: auto):
    `before-script-linux: yum install -y protobuf-compiler || dnf install ...`
    Runs inside the manylinux container before maturin invokes cargo.
    yum covers manylinux2014; dnf covers manylinux_2_28+.

  * macOS (macos-14 / macos-13 runners):
    A regular `run: brew install protobuf` step before the
    maturin-action invocation. macOS doesn't have docker, so
    before-script-linux is not applicable.

Both x86_64 and aarch64 Linux variants, plus both macOS variants,
are patched uniformly.

Tracked: AAASM-2109
Local verification surfaced a bug in my prior fix: the CentOS 7-based
manylinux2014 image's `protobuf-compiler` package ships protoc 2.5.0
which only supports proto2 syntax. aa-proto's .proto files use proto3,
producing:

  test.proto:1:10: Unrecognized syntax identifier "proto3".
  This parser only recognizes "proto2".

Fix: download the official protoc binary release (v32.1) from GitHub
in the before-script-linux block instead of relying on the OS package.
Works for both x86_64 and aarch64 manylinux variants.

Verified locally inside `quay.io/pypa/manylinux2014_x86_64:latest`:
  * curl + unzip protoc-32.1-linux-x86_64.zip → libprotoc 32.1
  * proto3 sample compile → ✓ OK

The macOS step (`brew install protobuf`) was already correct —
homebrew tracks latest protoc.

Tracked: AAASM-2189
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant