Repository navigation
[FIX] Fix macOS CMake builds: drop Corrosion's hard-coded CLT SDK link dir - #2384
Merged
Merged
Conversation
Corrosion adds /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib
as an interface link directory of the Rust static library on macOS
(still the case in Corrosion 0.6.1). Since the macos-26-arm64 runner
image of 2026-10-13, that symlink points to a macOS 27 SDK while the
selected toolchain is Xcode 26.6, and its ld rejects the 27 SDK's .tbd
stubs ("unknown architecture"). Every macOS CMake build has failed to
link since.
The libraries rustc asks for (-lSystem -lc -lm) resolve through the
compiler's own SDK without the extra -L, as the shell and autoconf
builds on the same runner show, so clear the property.
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.
In raising this pull request, I confirm the following (please check boxes):
Reason for this PR:
Sanity check:
Repro instructions:
Any macOS CMake build on the current
macos-26-arm64runner image (e.g. thecmake,cmake_ocr_hardsubxandcmake_ffmpeg_mp4jobs of "Build CCExtractor on Mac", failing on master since Oct 15) stops at the final link:Corrosion hard-codes
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/libas anINTERFACE_LINK_DIRECTORIESentry of the Rust static library on macOS (Corrosion.cmake, still present in Corrosion 0.6.1, so upgrading doesn't help). The runner image of 2026-10-13 installed a macOS 27 SDK and repointed thatMacOSX.sdksymlink to it, while the selected toolchain is still Xcode 26.6 (SDK 26.5). Compilation uses the Xcode SDK, but the explicit-Lmakes Xcode 26'sldpick up the 27 SDK's.tbdstubs, which it can't parse.The libraries rustc asks for (
-lSystem -lc -lm) resolve through the compiler's own SDK without that-L— the shell and autoconf builds on the same runner link fine — so this clears the property on Apple aftercorrosion_import_crate. Linux and Windows are unaffected (the block isif(APPLE)).Verified on the macOS runners: all 9 jobs of "Build CCExtractor on Mac" pass on this branch, including the three CMake jobs. Diagnosis (runner SDK layout, the CMake link script showing the stray
-L) came from a throwaway CI branch.