-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NativeAOT] xcode15+ linker issue #97745
Comments
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsThere is a chance that this is something with my machine, but it looks like I cannot build run tests with 8.0 I have 15.2 and tried downgrade to 15.0 with the same result. It does not seem possible to downgrade further as older versions claim to be incompatible with the new OS. I am using the following command:
That works fine on /Users/vs/Hosting01/runtime/artifacts/bin/coreclr/osx.arm64.Release/build/Microsoft.NETCore.Native.targets(308,5): error MSB3073: The command ""/Users/vs/Hosting01/runtime/artifacts/bin/coreclr/osx.arm64.Release/ilc-published/ilc" @"/Users/vs/Hosting01/runtime/artifacts/tests/coreclr/obj/osx.arm64.Release/Managed/nativeaot/SmokeTests/StackTraceMetadata/StackTraceMetadata_Stripped/native/StackTraceMetadata_Stripped.ilc.rsp"" exited with code 139.
|
@filipnavara - could this be another linker issue similar to #92520? |
I think the lab is still on xcode 14 and that could be the reason this does not happen in CI |
This is ILC crashing. One option to troubleshoot would be just to re-run this line under a debugger. |
Passing This does seem to be some kind of incompatibility with the new linker.
|
Generally speaking, yes. I won’t have time to look into it until next week, unfortunately. |
I think nothing is blocked on this yet, so this is mostly a heads up. |
Yes, it is supported. Prerequisites in our documentation do not ask for a specific old XCode version. |
That is desirable, but practically it is hard to guarantee support for something newer than what the lab runs. Maybe the right course of action for 8.0 is to use |
Yes, we have same problem with support of new OS versions. We take fixes for these types of issues in servicing. |
Shouldn't the milestone be set to |
Nevermind, there is definitely something broken even on I did some debug build earlier and I started seeing this, which may be related:
|
The issue I get in the |
So far I traced it to |
So, the linker indeed produces garbage unwind tables (as verified by
The function offsets are supposed to be sorted. I'll collect the build artifacts and submit a report to Apple. |
Feedback sent to Apple (FB13584275). For reference, here's the repro with files and a Broken linker will produce unsorted/corrupted unwind tables, which can be verified with |
The bogus unwinding information comes from functions in the Update: It does not. :/ |
Response from Apple:
|
Regarding:
Apple announced that they are removing this linker option in https://developer.apple.com/documentation/xcode-release-notes/xcode-16-release-notes so this problem becomes more pressing. |
Apple updated my Feedback tickets with request to try Xcode 16 and report back. |
The original problem with corrupted unwind tables seems to be fixed [with Xcode 16 Beta 1] on the few small samples that I tried. We need to do a full run to make sure that there are no other issues. |
FWIW, with Xcode 16 (released last Monday), we get: |
I am aware of this. I run the smoke tests with ld-prime from Xcode 16 release and it seems to be ok. Likewise, the macOS/iOS/tvOS workloads were updated last week to use ld-prime on Xcode 16+: xamarin/xamarin-macios#21231. Technically we are still relying on some unwritten guarantees about code/data layout. I have two issues open with Apple to further investigate the usage of |
I think this is fixed right? |
Should we stop passing runtime/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets Line 285 in a7fc1ea
Note that Xamarin iOS made that change in their build targets https://github.com/xamarin/xamarin-macios/pull/21231/files#diff-2e24f1b6f44df7580244d00f106fa1a9e2257536fbca9d7bbdc74571549324a9R1631 |
Agreed with the comment above, we should align the behavior with Xamarin workload and drop As far as the the reliance on unwritten guarantees about code/data layout goes, I had some feedback from Apple. Basically, they suggest that We may opt to not do anything about the For the posterity, here are the excerpts from Apple feedback. Re: Stack overflow in classic ld with many consecutive
Re: Dead stripping incorrectly stripping code when
|
There is a chance that this is something with my machine, but it looks like I cannot build run tests with 8.0
It could be related to xcode 15+
I have 15.2 and tried downgrade to 15.0 with the same result. It does not seem possible to downgrade further as older versions claim to be incompatible with the new OS.
I am using the following command:
/build.sh clr.alljits+clr.tools+clr.nativeaotlibs+clr.nativeaotruntime+libs -rc Release -lc Release ; src/tests/build.sh nativeaot Release 'tree nativeaot' ; src/tests/run.sh --runnativeaottests Release
That works fine on
main
branch (product and tests build and tests pass).But on
release/8.0
branch I get a bunch of errors like:/Users/vs/Hosting01/runtime/artifacts/bin/coreclr/osx.arm64.Release/build/Microsoft.NETCore.Native.targets(308,5): error MSB3073: The command ""/Users/vs/Hosting01/runtime/artifacts/bin/coreclr/osx.arm64.Release/ilc-published/ilc" @"/Users/vs/Hosting01/runtime/artifacts/tests/coreclr/obj/osx.arm64.Release/Managed/nativeaot/SmokeTests/StackTraceMetadata/StackTraceMetadata_Stripped/native/StackTraceMetadata_Stripped.ilc.rsp"" exited with code 139.
The text was updated successfully, but these errors were encountered: