-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Description
CoreCLR R2R (ReadyToRun) template builds with UseMonoRuntime=false EnablePreviewFeatures=true fail to build for certain platform TFMs. The R2R compilation toolchain produces incorrect results or is missing entirely depending on the CI host OS.
This has been failing on every net11.0 branch CI build since the test was added on Jan 27, 2026.
Build Failures
macOS — macCatalyst R2R linker version mismatch
The R2R compiled object files target macCatalyst 15.2 but the linker expects the deployment target of 15.0:
ld : error : object file (.../net11.0-maccatalyst/maccatalyst-x64/R2R/Test.r2r.o) was built for newer 'macCatalyst' version (15.2) than being linked (15.0)
ld : error : object file (.../net11.0-maccatalyst/maccatalyst-arm64/R2R/Test.r2r.o) was built for newer 'macCatalyst' version (15.2) than being linked (15.0)
iOS and Android build fine on macOS — only macCatalyst is affected.
Windows — crossgen2 missing for Apple cross-compilation
The crossgen2 executable is not found when cross-compiling for iOS and macCatalyst on Windows:
error : The crossgen2 executable 'D:\...\packages\microsoft.netcore.app.crossgen2.win-x64\11.0.0-preview.2.26103.111/tools/crossgen2' does not exist.
Both iOS and macCatalyst TFMs fail to build. Android and Windows TFMs build fine. After the iOS/macCatalyst failures, the Windows job gets canceled after ~2 hours due to retry timeouts.
Platform Summary
| TFM | macOS CI | Windows CI |
|---|---|---|
| Android | ✅ Builds | ✅ Builds |
| iOS | ✅ Builds | ❌ crossgen2 missing |
| macCatalyst | ❌ R2R linker version mismatch | ❌ crossgen2 missing |
| Windows | N/A | ✅ Builds |
Environment
- .NET SDK: 11.0.100-preview.2.26103.111
- iOS SDK: Microsoft.iOS.Sdk.net11.0_26.2 (26.2.11375-net11-p2)
- MacCatalyst SDK: Microsoft.MacCatalyst.Sdk.net11.0_26.2 (26.2.11375-net11-p2)
Impact
- Every
net11.0branch CI build fails (46/47 integration tests pass, this 1 fails) - Windows integration test job times out and gets canceled (~2 hours wasted)
Workaround
PR #34304 works around this by removing the broken TFMs per platform:
- macOS: Removes macCatalyst → test validates R2R for Android + iOS
- Windows: Removes macCatalyst + iOS → test validates R2R for Android + Windows
The upstream fix is needed in the .NET SDK/runtime toolchain to:
- Produce R2R images with correct macCatalyst deployment target metadata
- Provide crossgen2 for Apple cross-compilation on Windows
Metadata
Metadata
Assignees
Labels
Type
Projects
Status