Skip to content

GH-49435: [CI][Python] Fix macOS protobuf@33 keg-only discovery#49491

Open
tadeja wants to merge 2 commits intoapache:mainfrom
tadeja:macos-test-flight-fatal-bus
Open

GH-49435: [CI][Python] Fix macOS protobuf@33 keg-only discovery#49491
tadeja wants to merge 2 commits intoapache:mainfrom
tadeja:macos-test-flight-fatal-bus

Conversation

@tadeja
Copy link
Contributor

@tadeja tadeja commented Mar 10, 2026

Rationale for this change

Homebrew upgrading protobuf beyond v33 (as described in #49435) also causes new runtime Bus error.

What changes are included in this PR?

a) Pin protobuf@33 in cpp/Brewfile (as discussed in #49436)
b) Add keg-only env setup in python.yml so CMake/pkg-config can find protobuf@33

This resolves Fatal Python error: Bus error on macOS 15 Intel when importing pyarrow.flight. Homebrew's latest protobuf pulls in Abseil 20260107
-- Found abslAlt: 1 (found version "20260107")
which is ABI-incompatible with Arrow's bundled gRPC v1.46.3

One of earliest Python CI logs with the Bus error:
https://github.com/apache/arrow/actions/runs/22722817262/job/65889451081#step:10:103

Note: Other workflows using cpp/Brewfile will prob need similar keg-only setup. (There's failing C++ job log here, Ruby etc.)

Are these changes tested?

Yes, fork workflow completed the Python macOS 15-intel job with success.

Are there any user-facing changes?

No.

@tadeja
Copy link
Contributor Author

tadeja commented Mar 10, 2026

AMD64 macOS 15-intel Python 3 and ARM64 macOS 14 Python 3 both successfully completed with the protobuf@33 change.

Now attempting similar change for cpp.yml and ruby.yml.

@tadeja
Copy link
Contributor Author

tadeja commented Mar 10, 2026

@raulcd, @rok what do you say about this PR? it can be moved into existing draft #49436 if you'd prefer.

@rok
Copy link
Member

rok commented Mar 10, 2026

Will users building for source need to use keg only? Should we update docs?

Comment on lines +235 to +238
export PROTOBUF_PREFIX="$(brew --prefix protobuf@33)"
echo "PKG_CONFIG_PATH=${PROTOBUF_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}" >> "$GITHUB_ENV"
echo "CMAKE_PREFIX_PATH=${PROTOBUF_PREFIX}:${ARROW_HOME}:${CMAKE_PREFIX_PATH}" >> "$GITHUB_ENV"
echo "${PROTOBUF_PREFIX}/bin" >> "$GITHUB_PATH"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this could be conditional to protobuf@33? Like here.

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Mar 10, 2026
Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

This is a workaround. We should remove @33 eventually after the gRPC problem is fixed.
See also:

Could you add a comment when we can remove this workaround?

export PROTOBUF_PREFIX="$(brew --prefix protobuf@33)"
echo "PKG_CONFIG_PATH=${PROTOBUF_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}" >> "$GITHUB_ENV"
echo "CMAKE_PREFIX_PATH=${PROTOBUF_PREFIX}:${ARROW_HOME}:${CMAKE_PREFIX_PATH}" >> "$GITHUB_ENV"
echo "${PROTOBUF_PREFIX}/bin" >> "$GITHUB_PATH"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
echo "${PROTOBUF_PREFIX}/bin" >> "$GITHUB_PATH"
echo "${PROTOBUF_PREFIX}/bin" >> "$GITHUB_PATH"

@github-actions github-actions bot added awaiting review Awaiting review awaiting merge Awaiting merge and removed awaiting changes Awaiting changes labels Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants