Fix macOS CI: set SDKROOT/CONDA_BUILD_SYSROOT for conda-forge cross-compiler#342
Merged
Merged
Conversation
…ompiler The conda-forge arm64-apple-darwin20.0.0-clang fails meson's C compiler sanity check on newer Xcode versions (26.5+) because the compiled binary is missing LC_LOAD_DYLIB for libSystem.dylib. Fix: set SDKROOT, CONDA_BUILD_SYSROOT, and MACOSX_DEPLOYMENT_TARGET before the build step so the conda-forge cross-compiler can find and link against the correct macOS SDK.
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions job build (macos-latest, py312)
Fix macOS CI: set SDKROOT/CONDA_BUILD_SYSROOT for conda-forge cross-compiler
Jun 26, 2026
Collaborator
|
this did not fail in several tries. Let's hope... |
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.
macOS CI jobs fail after
macos-latestupgraded to Xcode 26.5. Meson's C compiler sanity check compiles fine but the binary is rejected at runtime:dyld: missing LC_LOAD_DYLIB (must link with at least libSystem.dylib). The conda-forgearm64-apple-darwin20.0.0-clang(from thecompilerspixi dependency) doesn't automatically linklibSystem.dylibunless it knows where the active macOS SDK is.The Fortran sanity check passes because
gfortranpulls in-lgfortranwhich transitively depends onlibSystem. Only bare C programs hit this.Changes
.github/workflows/smoke_test.yml: Add a macOS-only pre-build step that exportsSDKROOT,CONDA_BUILD_SYSROOT, andMACOSX_DEPLOYMENT_TARGET=11.0(matching the compiler'sdarwin20target triplet) usingxcrun --sdk macosx --show-sdk-pathto dynamically resolve the correct SDK path regardless of Xcode version.