Skip to content

build: Keep macOS Rust links on the selected SDK - #808

Merged
zackees merged 2 commits into
obs-rust:masterfrom
nathan-v:fix/777-macos-tier2-sdk
Oct 15, 2026
Merged

zackees merged 2 commits into
obs-rust:masterfrom
nathan-v:fix/777-macos-tier2-sdk

Conversation

@nathan-v

@nathan-v nathan-v commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #777

Corrosion 0.5.2 injects /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib into the Rust static library's link interface. This puts the CLT libraries ahead of CMake/Xcode's selected SDK. When CLT has SDK 27 but Xcode's linker is older, the Rust-enabled libobs link fails on the new architecture names in libobjc, libSystem, and libz stubs. The C-only build does not inherit this path.

Remove only that injected directory on macOS, preserving other imported library search paths. System libraries then resolve through the selected SDK. No toolchain bump, workflow change, or public API change is needed.

Validation:

  • RED 2e4cd8077: uv run python -m unittest ci/test_rust_macos_sdk.py fails the macOS case because the CLT path survives; the non-macOS control passes. The test configures the real rust.cmake with a stand-in for Corrosion 0.5.2's imported target.
  • GREEN 1cf39f475: both regression tests and all four existing Rust target-selection tests pass.
  • Native macOS, Xcode 27: Tier 2 OFF and ON both pass (132 passed, one test_svt_av1 skip per configuration); exported symbols are identical, 1,877. The real generated ON Xcode project contains four occurrences of the injected CLT path before the fix and zero after. This host's newer linker accepts SDK 27, so it reproduces the bad search order, not the older runner's linker error.
  • For local tests only, XCODE_XCCONFIG_FILE pointed to a temporary file containing ENABLE_HARDENED_RUNTIME = NO, allowing Homebrew cmocka to load. No signing or existing C-test changes are in the PR.
  • ./lint and ./unittest ran before each push. Formatters passed and native Rust workspace tests passed. The full local gates remain blocked by existing host-dependent Python test failures and soldr's unsupported Windows-GNU cross-check on Apple Silicon; Linux Tier 2 was not reached. No local attestation is claimed; PR CI runs the full applicable suite.

Checklist:

AI assistance: Codex investigated the logs, wrote and checked the change and regression test, and ran the validations above under the submitter's direction.

Hosted CI: run 38687004141 passed on GREEN head 1cf39f47590457ab071f819b78a9f4b29591c927, including Linux/macOS/Windows Rust tests, cross lint, all three Tier 2 jobs, and CI Gate. Full release/app builds were out of scope and skipped.

@nathan-v

Copy link
Copy Markdown
Contributor Author

Current-head CI is green: https://github.com/obs-rust/obs-studio/actions/runs/38687004141 (1cf39f4). Native macOS OFF/ON validation also passed; details are in the description. Marked ready for review. I attempted to queue this with gh pr merge, but GitHub rejected EnablePullRequestAutoMerge because nathan-v lacks permission. A maintainer needs to queue the PR.

@zackees
zackees added this pull request to the merge queue Oct 15, 2026
Local-Gate: v1 tree=824d68936c2663319dc6a5f7b00d803023fee371 secs=1624 lanes=lint:run,rust-test:run,cross:run,tier2-linux:run
Ci-Attestation: {"at":1792045924,"gate":"rust/all/fmt","host":"linux-x86_64","key":"7ed8546c182b46bd8b30a7b3db48c450f2e54697e7491981e29eb727b93e5fd4","lane":"lint","parents":["2e4cd80776a087aa2048b89773028f1a36a41c4b"],"secs":55,"stamp":"e47cedcef8e01ea1f8ffd98644973684","tree":"824d68936c2663319dc6a5f7b00d803023fee371","v":1,"via":"run"}
Ci-Attestation: {"at":1792045924,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"7ed8546c182b46bd8b30a7b3db48c450f2e54697e7491981e29eb727b93e5fd4","lane":"lint","parents":["2e4cd80776a087aa2048b89773028f1a36a41c4b"],"secs":55,"stamp":"c9220c317a5cd7ce387a3ca57283a1e0","tree":"824d68936c2663319dc6a5f7b00d803023fee371","v":1,"via":"run"}
Ci-Attestation: {"at":1792045924,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"c95bce327b7ce77a71d45eafc15453adf8d758d82815d3ee84980f4d9acaf066","lane":"rust-test","parents":["2e4cd80776a087aa2048b89773028f1a36a41c4b"],"secs":123,"stamp":"ce86a346e2c2c78912c12f87987246e5","tree":"824d68936c2663319dc6a5f7b00d803023fee371","v":1,"via":"run"}
Ci-Attestation: {"at":1792045924,"gate":"rust/x86_64-pc-windows-msvc/clippy","host":"linux-x86_64","key":"fef8f94025d71c24b0053a6c9b36948ec5e0026ae36c221189277700c1fbfce9","lane":"cross","parents":["2e4cd80776a087aa2048b89773028f1a36a41c4b"],"secs":109,"stamp":"5b9f2e332e3ea8912a9884a5b5401345","tree":"824d68936c2663319dc6a5f7b00d803023fee371","v":1,"via":"run"}
Ci-Attestation: {"at":1792045924,"gate":"rust/x86_64-pc-windows-msvc/dylint","host":"linux-x86_64","key":"fef8f94025d71c24b0053a6c9b36948ec5e0026ae36c221189277700c1fbfce9","lane":"cross","parents":["2e4cd80776a087aa2048b89773028f1a36a41c4b"],"secs":109,"stamp":"e54159f5aeedf14f30c5f0868cdbbd5e","tree":"824d68936c2663319dc6a5f7b00d803023fee371","v":1,"via":"run"}
Ci-Attestation: {"at":1792045924,"gate":"rust/aarch64-apple-darwin/clippy","host":"linux-x86_64","key":"fef8f94025d71c24b0053a6c9b36948ec5e0026ae36c221189277700c1fbfce9","lane":"cross","parents":["2e4cd80776a087aa2048b89773028f1a36a41c4b"],"secs":109,"stamp":"d2791a698483f40e977baa72398e28dd","tree":"824d68936c2663319dc6a5f7b00d803023fee371","v":1,"via":"run"}
Ci-Attestation: {"at":1792045924,"gate":"rust/aarch64-apple-darwin/dylint","host":"linux-x86_64","key":"fef8f94025d71c24b0053a6c9b36948ec5e0026ae36c221189277700c1fbfce9","lane":"cross","parents":["2e4cd80776a087aa2048b89773028f1a36a41c4b"],"secs":109,"stamp":"c167ba0efdda89e6757ad3bd9bc905e9","tree":"824d68936c2663319dc6a5f7b00d803023fee371","v":1,"via":"run"}
Ci-Attestation: {"at":1792045924,"gate":"rust/x86_64-apple-darwin/clippy","host":"linux-x86_64","key":"fef8f94025d71c24b0053a6c9b36948ec5e0026ae36c221189277700c1fbfce9","lane":"cross","parents":["2e4cd80776a087aa2048b89773028f1a36a41c4b"],"secs":109,"stamp":"0331c23c62ed2cc44140bab12aa37a15","tree":"824d68936c2663319dc6a5f7b00d803023fee371","v":1,"via":"run"}
Ci-Attestation: {"at":1792045924,"gate":"rust/x86_64-apple-darwin/dylint","host":"linux-x86_64","key":"fef8f94025d71c24b0053a6c9b36948ec5e0026ae36c221189277700c1fbfce9","lane":"cross","parents":["2e4cd80776a087aa2048b89773028f1a36a41c4b"],"secs":109,"stamp":"128f6ba1906556835813e1e0a1e91d59","tree":"824d68936c2663319dc6a5f7b00d803023fee371","v":1,"via":"run"}
Ci-Attestation: {"at":1792045924,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"84bf42dcd97f1817659dc35b531ceada47a2fb2b1ce32a313f01e029bd005bf6","lane":"tier2-linux","parents":["2e4cd80776a087aa2048b89773028f1a36a41c4b"],"secs":1336,"stamp":"9cfb3ce337f40159b0e981109fb49cd0","tree":"824d68936c2663319dc6a5f7b00d803023fee371","v":1,"via":"run"}
@zackees

zackees commented Oct 15, 2026

Copy link
Copy Markdown
Member

Rebased onto master and ran the stamped local gate. Your RED (2e4cd8077: ci/test_rust_macos_sdk.py keeps the CLT SDK path) / GREEN (1cf39f475) evidence and the full hosted run stand. Thanks for picking up #777.

  • Rebased on master, local gate passed; pushed as bbd213d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

ci: macOS Tier 2 intermittently fails to link libobs against the MacOSX27.0 SDK ("unknown architecture")

2 participants