[release/7.0.2xx] Runtime fails to generate native System.Private.CoreLib in source-build bootstrap
See original GitHub issueI 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:
Generating native image of System.Private.CoreLib for Linux.x64.Release. Logging to
/tarball/src/runtime/artifacts/source-build/self/src/dotnet.sh /tarball/src/runtime/artifacts/source-build/self/src/artifacts/bin/coreclr/Linux.x64.Release/crossgen2/crossgen2.dll -o:/tarball/src/runtime/artifacts/source-build/self/src/artifacts/bin/coreclr/Linux.x64.Release/System.Private.CoreLib.dll -r:/tarball/src/runtime/artifacts/source-build/self/src/artifacts/bin/coreclr/Linux.x64.Release/IL/*.dll --targetarch:x64 -O /tarball/src/runtime/artifacts/source-build/self/src/artifacts/bin/coreclr/Linux.x64.Release/IL/System.Private.CoreLib.dll --perfmap-format-version:1 --perfmap --perfmap-path:/tarball/src/runtime/artifacts/source-build/self/src/artifacts/bin/coreclr/Linux.x64.Release/
Specify which project file to use because this '/tarball/src/runtime/artifacts/source-build/self/src/src/coreclr' contains more than one project file.
/tarball/src/runtime/artifacts/source-build/self/src/src/coreclr/crossgen-corelib.proj(104,5): error MSB3073: The command "/tarball/src/runtime/artifacts/source-build/self/src/dotnet.sh /tarball/src/runtime/artifacts/source-build/self/src/artifacts/bin/coreclr/Linux.x64.Release/crossgen2/crossgen2.dll -o:/tarball/src/runtime/artifacts/source-build/self/src/artifacts/bin/coreclr/Linux.x64.Release/System.Private.CoreLib.dll -r:/tarball/src/runtime/artifacts/source-build/self/src/artifacts/bin/coreclr/Linux.x64.Release/IL/*.dll --targetarch:x64 -O /tarball/src/runtime/artifacts/source-build/self/src/artifacts/bin/coreclr/Linux.x64.Release/IL/System.Private.CoreLib.dll --perfmap-format-version:1 --perfmap --perfmap-path:/tarball/src/runtime/artifacts/source-build/self/src/artifacts/bin/coreclr/Linux.x64.Release/" exited with code 1.
Build FAILED.
/tarball/src/runtime/artifacts/source-build/self/src/src/coreclr/crossgen-corelib.proj(104,5): error MSB3073: The command "/tarball/src/runtime/artifacts/source-build/self/src/dotnet.sh /tarball/src/runtime/artifacts/source-build/self/src/artifacts/bin/coreclr/Linux.x64.Release/crossgen2/crossgen2.dll -o:/tarball/src/runtime/artifacts/source-build/self/src/artifacts/bin/coreclr/Linux.x64.Release/System.Private.CoreLib.dll -r:/tarball/src/runtime/artifacts/source-build/self/src/artifacts/bin/coreclr/Linux.x64.Release/IL/*.dll --targetarch:x64 -O /tarball/src/runtime/artifacts/source-build/self/src/artifacts/bin/coreclr/Linux.x64.Release/IL/System.Private.CoreLib.dll --perfmap-format-version:1 --perfmap --perfmap-path:/tarball/src/runtime/artifacts/source-build/self/src/artifacts/bin/coreclr/Linux.x64.Release/" exited with code 1.
0 Warning(s)
1 Error(s)
Inside src/coreclr
are multiple project files, crossgen-corelib.proj
, runtime.proj
, and runtime-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?
Issue Analytics
- State:
- Created 10 months ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is also the default setup for Android/iOS builds, see e.g.:
https://github.com/xamarin/xamarin-android/blob/ac643dddb5e9ef968fa758a6bc77a084242780e7/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.DefaultProperties.targets#L71-L73
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 https://github.com/dotnet/runtime/pull/78733 (verified locally that it fixes the build break)