-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[release/7.0.2xx] Runtime fails to generate native System.Private.CoreLib in source-build bootstrap #29177
Comments
Tagging subscribers to this area: @hoyosjs Issue DetailsI have been looking at this issue for a little bit and can't seem to make any progress, so I'm hoping someone here can point me in the right direction. The runtime-portable build is failing in the 7.0.2xx source build bootstrap scenario only with the following error:
Inside
|
Also, here is a link to the failure in CI: https://dev.azure.com/dnceng/internal/_build/results?buildId=2048260&view=logs&j=05a957c8-6537-5d6d-69e3-d72786d35c31&t=8f2f8c4f-4a49-5a74-0521-8049d6bde132&l=25268 And the binlog: |
This is one of the first places where the runtime that was just built runs an app. This failure likely means that the runtime that was just built is badly broken. What are the steps to reproduce this locally? |
This can be reproduced in a source-build bootstrap context. The fastest way is to
|
When I re-run the failing command, I see that it is trying to download .NET SDK 7.0.200 and failing:
What is the runtime that you expect |
It should be using the SDK from |
These variables are what we set to get everything using the correct SDK, I'm not sure which in particular is the right one for runtime but just setting all of them should work fine. |
I have set these variables to point to The problem is that the path to crossgen2 that this is trying to execute is Is looks like there is a breaking change in the .NET SDK 7.0.xxx that added cc @dsplaisted |
The problem was introduced by changes in sdk\7.0.200\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets . I have confirmed that the issue goes away if I copy Microsoft.NET.RuntimeIdentifierInference.targets from .NET SDK 7.0.100. @lbussell If you need to unblock the source build, you should be able to add temporary source build patch that reverts Microsoft.NET.RuntimeIdentifierInference.targets to .NET SDK 7.0.100 version. @nagilson Could you please investigate whether the behavior change is a bug in .NET SDK, or whether this behavior is by design and we need to workaround it in dotnet/runtime build? |
Thanks @jkotas for the ping and investigation. It was probably this PR: #28484 Before I can give a definitive answer, I need a bit more information ( see WorkaroundsFirst: @lbussell as a work-around, setting Another option may be: ExplanationI'm guessing this is caused by the following: There is a point in time in which QuestionsIs the above information correct, may someone from |
Yes, crossgen project does exactly that: https://github.com/dotnet/runtime/tree/main/src/coreclr/tools/aot/crossgen2
This sounds like the most appropriate fix. Submitted dotnet/runtime#78733 (verified locally that it fixes the build break) |
Fixes dotnet/sdk#29177 Co-authored-by: Jan Kotas <[email protected]>
This is also the default setup for Android/iOS builds, see e.g.: |
The additional information is included above. We didn't expect RID Inference to be a breaking change but there were after-effects, like here: dotnet/sdk#29164 or here dotnet/sdk#29177
I have been looking at this issue for a little bit and can't seem to make any progress, so I'm hoping someone here can point me in the right direction.
The runtime-portable build is failing in the 7.0.2xx source build bootstrap scenario only with the following error:
Inside
src/coreclr
are multiple project files,crossgen-corelib.proj
,runtime.proj
, andruntime-prereqs.proj
. I checked that these are also present in the runtime that's in .NET 7.0.1xx.I also checked that the error from the .NET CLI isn't new to .NET 7.0.2xx. I'm not sure where else to look. Maybe @ViktorHofer knows who to tag?
The text was updated successfully, but these errors were encountered: