Unable to use ReadyToRun on Debian 8 due to incorrect runtime bits resolution by SDK
See original GitHub issueOriginal bug: https://github.com/dotnet/coreclr/issues/24565
Repro app is here: https://github.com/wieslawsoltes/Draw2D. To repro:
- clone
- Edit Draw2D.csproj and add netcoreapp3.0 to the list of target frameworks
- run this command:
dotnet publish ./src/Draw2D/Draw2D.csproj -f netcoreapp3.0 -c Release -r debian.8-x64 -o Draw2D_netcoreapp3.0_debian.8-x64
Running the application throws a Failed to initialize CoreCLR,, HRESULT: 0x80131500
error.
Looking at the msbuild verbose logs, you can see that the SDK is copying the runtime bits from the runtime.debian.8-x64.microsoft.netcore.runtime.coreclr/1.0.7/runtimes/debian.8-x64 package, which is incorrect.
On Debian9 targets, the runtime bits are copied correctly (version 3). On Debian8, the SDK doesn’t resolve correctly. Here’s an example error I got:
/home/fadi/dotnet_preview5/sdk/3.0.100-preview5-011569/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.ConflictResolution.targets(39,5): message NETSDK1041: Encountered conflict between 'CopyLocal:/home/fadi/.nuget/packages/runtime.debian.8-x64.microsoft.netcore.runtime.coreclr/1.0.7/runtimes/debian.8-x64/native/libcoreclr.so' and 'CopyLocal:/home/fadi/.nuget/packages/runtime.linux-x64.microsoft.netcore.app/3.0.0-preview5-27709-08/runtimes/linux-x64/native/libcoreclr.so'. NETSDK1037: Could not determine winner due to equal file and assembly versions. [/home/fadi/git/Draw2D/src/Draw2D/Draw2D.csproj]
Also, it ends up copying the runtime bits from the 1.0.7 runtime package. Example:
Copying file from "/home/fadi/.nuget/packages/runtime.debian.8-x64.microsoft.netcore.runtime.coreclr/1.0.7/runtimes/debian.8-x64/native/libcoreclr.so" to "/home/fadi/git/Draw2D/src/Draw2D/bin/Release/netcoreapp3.0/debian.8-x64/libcoreclr.so".
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (6 by maintainers)
Top Results From Across the Web
When running published executable with ...
On Debian9 targets, the runtime bits are copied correctly. On Debian8, the SDK doesn't resolve correctly. Here's an example error I got:.
Read more >ReadyToRun deployment overview - .NET
R2R binaries improve startup performance by reducing the amount of work the just-in-time (JIT) compiler needs to do as your application loads.
Read more >Install the .NET SDK or the .NET Runtime on Debian
Demonstrates the various ways to install .NET SDK and .NET Runtime on Debian.
Read more >Building .NET Core AWS Lambda with ReadyToRun on ...
I decided to start from the two biggest problems: a big deployment package and a huge cold start. The Lambda function has been...
Read more >Common Problems | TeamCity On-Premises Documentation
Build works locally but fails or misbehaves in TeamCity ... the agent is under Connected — the agent is ready to run builds....
Read more >
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 Free
Top 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
Yes, I tried to repro this and wasn’t able to.
Filed #3364