Open
Conversation
dvadym
previously approved these changes
Mar 20, 2026
… to macOS linkage
…hon wheels to prevent universal2 cross-compile linker breaks
…compilation wheel generation via _PYTHON_HOST_PLATFORM
…mbers to bypass Apple dead-code-stripping symbols that pybind11 delegates to runtime
…on to bind environment to CMake
… static dead-code-stripping on kBase64Chars
This reverts commit 5ecca7d.
…es and force -all_load into the target linker array itself
…quests to cut noise and focus on versions.yml matrix exclusively
…ope while safely sustaining standard target visibility vectors
…ation pipelines employing target_link_options strictly protecting weak-level abseil symbol evaluation across static archives
…le_archive weak linkage protections via native modern CMake generator expressions
…oying the global Homebrew abseil poison pill on macOS CI runners, and reverting aggressive dead-code stripping overriding force_load
…config by stripping entirely brew-installed protocol buffers avoiding ABI contamination
…ing compiler flag overrides, and fundamentally modernize GitHub Actions dependencies resolving all ecosystem warnings
… scrubbing without touching CMake linker, while preserving dependency updates
…nts gracefully, strictly targeting only Apple protobuf mitigation inside versions.yml and preserving minimal deprecation action bumps
…s.yml simplifications natively, and drop Python 3.10 from versions testing matrix
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.
Fix macOS Build: Resolving ABI Dynamic Lookup Collision
This pull request resolves the persistent
ImportError/ symbol not found failures that exclusively affected the macOS GitHub Actions CI runners. It ensures that the PyDP macOS python wheels reliably and natively invoke C++ bindings exactly as they do locally and on Linux/Windows target platforms.The Root Cause
Through our debugging, we discovered a fatal collision caused by GitHub Actions'
macos-latestenvironment. The previous CI workflow instructed macOS to eagerly install Protobuf system-wide viabrew install protobuf.However, Homebrew implicitly installs Abseil globally as dynamic libraries (
.dylib).When compiling PyDP normally, the native
CMakeLists.txtusesFetchContentto safely download and buildgoogle_dpandabseil-cppstatically from scratch (.aarchives). But due to Apple's linker behavior within Pybind11's flat namespace evaluation, Apple'sldaggressively encountered the globally injected Homebrew dynamic Abseil signatures on the host system, stripping the expected internal symbols from our extensions under the assumption that they would organically launch at runtime.Naturally, because these libraries do explicitly not exist dynamically mapped into pip-installed wheels on user machines, it cleanly broke importing
PyDP!The Fix
The implementation zeroes out this "Bermuda Triangle" natively and elegantly without having to compromise PyDP CMake configurations:
brew install protobuffor macOS structurally from.github/workflows/versions.yml(and synchronized withpublish.ymlAttempt to fix publish #488 separately). Because PyDP utilizesFetchContentto fully build the components from exact source code securely, global host installations are obsolete and actively harmful to cross-compilation!--plat-name macosx_10_14_x86_64hardcoding, leveraging native GitHub Actions arm64macos-latest(M1) architecture workflows naturally.checkout@v4,setup-python@v5) to resolve Node.js 20 warnings. Replaced deprecating::set-outputsyntax precisely with$GITHUB_OUTPUTacross matrix targets.Verification
The
versions.ymlpipeline reliably achievesSUCCESSnatively across macOS runners!