Skip to content

Fix macos-x86_64 dep-resolution build by restoring pkg-config and openssl@3#24075

Closed
Kyle-Neale wants to merge 1 commit into
masterfrom
kyle.neale/fix-macos-x86-build-pkgconfig
Closed

Fix macos-x86_64 dep-resolution build by restoring pkg-config and openssl@3#24075
Kyle-Neale wants to merge 1 commit into
masterfrom
kyle.neale/fix-macos-x86-build-pkgconfig

Conversation

@Kyle-Neale

@Kyle-Neale Kyle-Neale commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Restores pkg-config and openssl@3 (plus OPENSSL_DIR / PKG_CONFIG_PATH env vars) in the macOS leg of .github/workflows/resolve-build-deps.yaml so the management-deps install step can compile cryptography from source when pip falls back to an sdist build.

Motivation

The resolve-build-deps workflow's macOS step deliberately wipes Homebrew (brew remove --force --ignore-dependencies $(brew list --formula)) so that delocate doesn't pull random brew libraries into the produced wheels. The step then reinstalls only coreutils.

That worked fine while pip resolved cryptography to a prebuilt wheel for the host Python. Then commit 3b4fb9d0e2 "Upgrade Python version (#24019)" landed on 2026-06-11 and bumped the macOS PBS Python from 3.13.13 (release 20260414) to 3.13.14 (release 20260610). The new PBS Python's platform tags no longer match cryptography's macosx_10_9_universal2 wheel, so pip falls back to building from sdist — which uses the openssl-sys Rust crate and immediately fails:

error: failed to run custom build command for `openssl-sys v0.9.117`
Could not find directory of OpenSSL installation [...] try installing `pkg-config`

Timeline:

Reinstating pkg-config and openssl@3 (both keg-only so they won't be picked up by delocate from 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)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have changelog/ label attached
  • If the PR doesn't need to be tested during QA, please add a qa/skip-qa label.

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>
@Kyle-Neale Kyle-Neale added the qa/skip-qa Automatically skip this PR for the next QA label Jun 16, 2026
@dd-octo-sts

dd-octo-sts Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Validation Report

All 21 validations passed.

Show details
Validation Description Status
agent-reqs Verify check versions match the Agent requirements file
ci Validate CI configuration and code coverage settings
codeowners Validate every integration has a CODEOWNERS entry
config Validate default configuration files against spec.yaml
dep Verify dependency pins are consistent and Agent-compatible
http Validate integrations use the HTTP wrapper correctly
imports Validate check imports do not use deprecated modules
integration-style Validate check code style conventions
jmx-metrics Validate JMX metrics definition files and config
labeler Validate PR labeler config matches integration directories
legacy-signature Validate no integration uses the legacy Agent check signature
license-headers Validate Python files have proper license headers
licenses Validate third-party license attribution list
metadata Validate metadata.csv metric definitions
models Validate configuration data models match spec.yaml
openmetrics Validate OpenMetrics integrations disable the metric limit
package Validate Python package metadata and naming
qa-label Validate the pull request declares whether it needs QA for the next Agent release
readmes Validate README files have required sections
saved-views Validate saved view JSON file structure and fields
version Validate version consistency between package and changelog

View full run

@Kyle-Neale

Copy link
Copy Markdown
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.

@Kyle-Neale Kyle-Neale closed this Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev/testing dev/tooling qa/skip-qa Automatically skip this PR for the next QA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant