dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.42k stars 4.76k forks source link

Failed to AOT compile aot-instances.dll, the AOT compiler exited with code 134 #110003

Open rolfbjarne opened 2 days ago

rolfbjarne commented 2 days ago

From @mlancione on Wed, 20 Nov 2024 05:02:37 GMT

Apple platform

iOS

Framework version

net9.0-*

Affected platform version

.NET 9.0.100

Description

Getting a failed to AOT compile error when building the below repro project.

It seems that adding Microsoft.Maui.Essentials and Microsoft.Extensions.DependencyInjection NuGet packages and referencing a Microsoft.Extensions.DependencyInjection type in code causes the build error.

Note: The build error only happens when UseInterpreter=false and TrimMode=partial.

Steps to Reproduce

Build repro project:

AOTBuildError.zip

Did you find any workaround?

Setting either UseInterpreter=true or TrimMode=full will avoid the build error.

Build logs

msbuild.binlog.zip

Copied from original issue xamarin/xamarin-macios#21663

rolfbjarne commented 2 days ago

From @rolfbjarne on Wed, 20 Nov 2024 08:51:05 GMT

I can reproduce by just executing dotnet build, this seems like a runtime issue.

dotnet-policy-service[bot] commented 1 day ago

Tagging subscribers to 'os-ios': @vitek-karas, @kotlarmilos, @ivanpovazan, @steveisok, @akoeplinger See info in area-owners.md if you want to be subscribed.

vitek-karas commented 1 day ago

Looks similar to https://github.com/dotnet/runtime/issues/109966.

@BrzVlad could you please try to repro this as well and see if it's the same problem?