Skip to content

Fix macOS CI: set SDKROOT/CONDA_BUILD_SYSROOT for conda-forge cross-compiler#342

Merged
briantoby merged 3 commits into
mainfrom
copilot/fix-github-actions-job-failure
Jun 26, 2026
Merged

Fix macOS CI: set SDKROOT/CONDA_BUILD_SYSROOT for conda-forge cross-compiler#342
briantoby merged 3 commits into
mainfrom
copilot/fix-github-actions-job-failure

Conversation

Copilot AI commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

macOS CI jobs fail after macos-latest upgraded 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-forge arm64-apple-darwin20.0.0-clang (from the compilers pixi dependency) doesn't automatically link libSystem.dylib unless it knows where the active macOS SDK is.

The Fortran sanity check passes because gfortran pulls in -lgfortran which transitively depends on libSystem. Only bare C programs hit this.

Changes

  • .github/workflows/smoke_test.yml: Add a macOS-only pre-build step that exports SDKROOT, CONDA_BUILD_SYSROOT, and MACOSX_DEPLOYMENT_TARGET=11.0 (matching the compiler's darwin20 target triplet) using xcrun --sdk macosx --show-sdk-path to dynamically resolve the correct SDK path regardless of Xcode version.
- name: Set macOS SDK paths
  if: runner.os == 'macOS'
  run: |
    SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
    echo "SDKROOT=$SDKROOT" >> $GITHUB_ENV
    echo "CONDA_BUILD_SYSROOT=$SDKROOT" >> $GITHUB_ENV
    echo "MACOSX_DEPLOYMENT_TARGET=11.0" >> $GITHUB_ENV

Copilot AI added 2 commits June 26, 2026 22:13
…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
Copilot AI requested a review from briantoby June 26, 2026 22:14
@briantoby

Copy link
Copy Markdown
Collaborator

this did not fail in several tries. Let's hope...

@briantoby briantoby closed this Jun 26, 2026
@briantoby briantoby reopened this Jun 26, 2026
@briantoby briantoby marked this pull request as ready for review June 26, 2026 23:35
@briantoby briantoby merged commit 865f144 into main Jun 26, 2026
24 checks passed
@briantoby briantoby deleted the copilot/fix-github-actions-job-failure branch June 26, 2026 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants