Fix macos-x86_64 dep-resolution build by restoring pkg-config and openssl@3#24075
Closed
Kyle-Neale wants to merge 1 commit into
Closed
Fix macos-x86_64 dep-resolution build by restoring pkg-config and openssl@3#24075Kyle-Neale wants to merge 1 commit into
Kyle-Neale wants to merge 1 commit into
Conversation
The macOS Set up environment step wipes all brew formulae before installing
only coreutils, to keep delocate from bundling unintended brew libraries into
output wheels. The trade-off is that the subsequent "Install management
dependencies" pip install can no longer build native extensions that need
OpenSSL — pip resolves cryptography transitively via google-cloud-storage and
falls back to a source build when no wheel matches the PBS Python's platform
tags, then the cryptography Rust extension fails with:
error: failed to run custom build command for `openssl-sys v0.9.117`
Could not find openssl via pkg-config
This has been silently breaking every dependency-bump PR since #22996 merged
on 2026-03-23. The auto-generated bot/update-dependencies PRs (#23081, #23172,
#23288, #23368, #23483, #23566, #23658, #23718, #23825, #23886, #23946,
#24041) have all been stuck on this failure, and the same failure surfaces on
any human-opened PR that touches cryptography.
Re-install pkg-config and openssl@3 (keg-only) after the wipe and export
OPENSSL_DIR + PKG_CONFIG_PATH so openssl-sys can locate them. These are
host-side build tools used only by the management-deps env on the runner;
they are not bundled by delocate into the output wheels produced by the later
"Run the build" step.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Validation ReportAll 21 validations passed. Show details
|
Contributor
Author
|
Switching to a more targeted fix: pinning cryptography in .builders/deps/host_dependencies.txt instead of restoring brew tools. The unpinned management-deps install was pulling cryptography 49.0.0 (no x86_64 wheel) → sdist source build → openssl-sys failure on the brew-wiped runner. Pinning avoids the source build entirely. |
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.
What does this PR do?
Restores
pkg-configandopenssl@3(plusOPENSSL_DIR/PKG_CONFIG_PATHenv vars) in the macOS leg of.github/workflows/resolve-build-deps.yamlso themanagement-depsinstall step can compilecryptographyfrom source when pip falls back to an sdist build.Motivation
The
resolve-build-depsworkflow's macOS step deliberately wipes Homebrew (brew remove --force --ignore-dependencies $(brew list --formula)) so thatdelocatedoesn't pull random brew libraries into the produced wheels. The step then reinstalls onlycoreutils.That worked fine while pip resolved
cryptographyto a prebuilt wheel for the host Python. Then commit3b4fb9d0e2"Upgrade Python version (#24019)" landed on 2026-06-11 and bumped the macOS PBS Python from3.13.13(release20260414) to3.13.14(release20260610). The new PBS Python's platform tags no longer match cryptography'smacosx_10_9_universal2wheel, so pip falls back to building from sdist — which uses theopenssl-sysRust crate and immediately fails:Timeline:
27345165538, PR Upgrade Python version #24014, 15m17s)Reinstating
pkg-configandopenssl@3(both keg-only so they won't be picked up bydelocatefrom the wheel build step that runs in isolation later) lets the sdist build complete. These are host-side build tools; they don't end up in the produced wheels.Review checklist (to be filled by reviewers)
changelog/label attachedqa/skip-qalabel.