maui icon indicating copy to clipboard operation
maui copied to clipboard

AOT compile aot-instances.dll, the AOT compiler exited with code 139.

Open bwinklesky opened this issue 2 years ago • 5 comments

Description

After upgrading to Xcode 16 and upgrading source code to version 9 we are getting this error.

IL stripping assemblies 12:01:24  Tool /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.AOT.osx-arm64.Cross.ios-arm64/9.0.0/Sdk/../tools/mono-aot-cross execution finished (exit code = 139). 12:01:24 
12:01:24  /usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net9.0_18.0/18.0.9617/targets/Xamarin.Shared.Sdk.targets(1277,3): error : Failed to AOT compile aot-instances.dll, the AOT compiler exited with code 139.

Steps to Reproduce

Build a release version for iOS.

Link to public reproduction project repository

No response

Version with bug

9.0.10 SR1

Is this a regression from previous behavior?

No, this is something new

Last version that worked well

8.0.100 SR10

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output


bwinklesky avatar Nov 15 '24 19:11 bwinklesky

Why did you close this ticket ? Did you find a workaround ? I have the same issue

Migoked avatar Nov 28 '24 14:11 Migoked

Why did you close this ticket ? Did you find a workaround ? I have the same issue

I opened the issue in the xamarin-ios repository and ultimately it was routed to the runtime repository.

https://github.com/dotnet/runtime/issues/110003#issuecomment-2506439925

bwinklesky avatar Nov 28 '24 16:11 bwinklesky

I have the same issue, my current workaround in release builds are these settings (maybe some are not necessary, but my sanity is already gone, maybe it helps somebody)

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net9.0-ios18.1|AnyCPU'">
  <MtouchLink>None</MtouchLink> <!-- Disable code linking entirely -->
  <MtouchUseLlvm>True</MtouchUseLlvm> <!-- Disable LLVM compilation -->
  <EnableSGenConc>True</EnableSGenConc> <!-- Disable concurrent garbage collection -->
  <NoSymbolStrip>true</NoSymbolStrip>
  <MtouchNoSymbolStrip>True</MtouchNoSymbolStrip>      
  <EmbedOnDemandResources>True</EmbedOnDemandResources>
  <SuppressTrimAnalysisWarnings>True</SuppressTrimAnalysisWarnings> <!-- Suppress warnings -->
  <EnableTrimAnalyzer>False</EnableTrimAnalyzer> <!-- Disable the trim analyzer -->
  <MtouchExtraArgs>--aot=verbose</MtouchExtraArgs>
  <MtouchExtraArgs>--aot-options=limit-llvm-stack=400MB</MtouchExtraArgs>
  <MtouchExtraArgs>--aot=threads=1</MtouchExtraArgs>
  <MtouchInterpreter>True</MtouchInterpreter>        
</PropertyGroup>

JohannesGESchmidt avatar Nov 29 '24 13:11 JohannesGESchmidt

I have the same issue, my current workaround in release builds are these settings (maybe some are not necessary, but my sanity is already gone, maybe it helps somebody)

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net9.0-ios18.1|AnyCPU'">
  <MtouchLink>None</MtouchLink> <!-- Disable code linking entirely -->
  <MtouchUseLlvm>True</MtouchUseLlvm> <!-- Disable LLVM compilation -->
  <EnableSGenConc>True</EnableSGenConc> <!-- Disable concurrent garbage collection -->
  <NoSymbolStrip>true</NoSymbolStrip>
  <MtouchNoSymbolStrip>True</MtouchNoSymbolStrip>      
  <EmbedOnDemandResources>True</EmbedOnDemandResources>
  <SuppressTrimAnalysisWarnings>True</SuppressTrimAnalysisWarnings> <!-- Suppress warnings -->
  <EnableTrimAnalyzer>False</EnableTrimAnalyzer> <!-- Disable the trim analyzer -->
  <MtouchExtraArgs>--aot=verbose</MtouchExtraArgs>
  <MtouchExtraArgs>--aot-options=limit-llvm-stack=400MB</MtouchExtraArgs>
  <MtouchExtraArgs>--aot=threads=1</MtouchExtraArgs>
  <MtouchInterpreter>True</MtouchInterpreter>        
</PropertyGroup>

Thank you for sharing this, it worked for me ! I was going crazy

Migoked avatar Nov 29 '24 15:11 Migoked

I have the same issue, my current workaround in release builds are these settings (maybe some are not necessary, but my sanity is already gone, maybe it helps somebody)

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net9.0-ios18.1|AnyCPU'">
  <MtouchLink>None</MtouchLink> <!-- Disable code linking entirely -->
  <MtouchUseLlvm>True</MtouchUseLlvm> <!-- Disable LLVM compilation -->
  <EnableSGenConc>True</EnableSGenConc> <!-- Disable concurrent garbage collection -->
  <NoSymbolStrip>true</NoSymbolStrip>
  <MtouchNoSymbolStrip>True</MtouchNoSymbolStrip>      
  <EmbedOnDemandResources>True</EmbedOnDemandResources>
  <SuppressTrimAnalysisWarnings>True</SuppressTrimAnalysisWarnings> <!-- Suppress warnings -->
  <EnableTrimAnalyzer>False</EnableTrimAnalyzer> <!-- Disable the trim analyzer -->
  <MtouchExtraArgs>--aot=verbose</MtouchExtraArgs>
  <MtouchExtraArgs>--aot-options=limit-llvm-stack=400MB</MtouchExtraArgs>
  <MtouchExtraArgs>--aot=threads=1</MtouchExtraArgs>
  <MtouchInterpreter>True</MtouchInterpreter>        
</PropertyGroup>

Thank you for the contribution. ### Unfortunately this didn't fix my issue. I hope this issue gets resolved soon.

Dark-MatterSoftware avatar Dec 22 '24 23:12 Dark-MatterSoftware