Failed AOT cross compiler???

Hello,

I am using Emgu/OpenCV in Unity to develop an iPhone application. When I go to build it I get these 2 errors:

Error building Player: UnityException: Failed AOT cross compiler: /Applications/Unity/Unity.app/Contents/BuildTargetTools/iPhonePlayer/mono-xcompiler --aot=full,asmonly,nodebug,static,outfile=“Mono.WebBrowser.dll.s” “Mono.WebBrowser.dll” current dir : /Users/bmcc/Documents/Unity/myProject/Temp/StagingArea/Data/Managed std=
output:
result file exists: False
UnityEditor.HostView:OnGUI()

Exception: Error building Player: UnityException: Failed AOT cross compiler: /Applications/Unity/Unity.app/Contents/BuildTargetTools/iPhonePlayer/mono-xcompiler --aot=full,asmonly,nodebug,static,outfile=“Mono.WebBrowser.dll.s” “Mono.WebBrowser.dll” current dir : /Users/bmcc/Documents/Unity/myProject/Temp/StagingArea/Data/Managed std=
output:
result file exists: False
UnityEditor.BuildPlayerWindow.BuildPlayerWithDefaultSettings (Boolean askForBuildLocation, BuildOptions forceOptions)
UnityEditor.BuildPlayerWindow.GUIBuildButtons (Boolean enableBuildButton, Boolean enableBuildAndRunButton, Boolean canInstallInBuildFolder)
UnityEditor.BuildPlayerWindow.ShowBuildTargetSettings ()
UnityEditor.BuildPlayerWindow.OnGUI ()
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[ ] parameters)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj)
UnityEditor.HostView.Invoke (System.String methodName)
UnityEditor.HostView.OnGUI ()

Does anyone have a clue on how to resolve these errors?

Thanks

have you fixed this? im getting it too

I have not fixed it yes but I speculated that I cannot build C# .dlls into an iPhone build. So I stripped out everything that I needed from the EMGU wrapper and now I get this error:

Error building Player: UnityException: Failed AOT cross compiler: /Applications/Unity/Unity.app/Contents/BuildTargetTools/iPhonePlayer/mono-xcompiler --aot=full,asmonly,nodebug,ficall,static,outfile=“Mono.WebBrowser.dll.s” “Mono.WebBrowser.dll” current dir : /Users/charlieprouse/Desktop/Test Projects/iPhone Input Backup/Temp/StagingArea/Data/Managed std=
output:
result file exists: False
UnityEditor.HostView:OnGUI()

Exception: Error building Player: UnityException: Failed AOT cross compiler: /Applications/Unity/Unity.app/Contents/BuildTargetTools/iPhonePlayer/mono-xcompiler --aot=full,asmonly,nodebug,ficall,static,outfile=“Mono.WebBrowser.dll.s” “Mono.WebBrowser.dll” current dir : /Users/charlieprouse/Desktop/Test Projects/iPhone Input Backup/Temp/StagingArea/Data/Managed std=
output:
result file exists: False
UnityEditor.BuildPlayerWindow.BuildPlayerWithDefaultSettings (Boolean askForBuildLocation, BuildOptions forceOptions)
UnityEditor.BuildPlayerWindow.GUIBuildButtons (Boolean enableBuildButton, Boolean enableBuildAndRunButton, Boolean canInstallInBuildFolder)
UnityEditor.BuildPlayerWindow.ShowBuildTargetSettings ()
UnityEditor.BuildPlayerWindow.OnGUI ()
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[ ] parameters)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj)
UnityEditor.HostView.Invoke (System.String methodName)
UnityEditor.HostView.OnGUI ()

I have moved on temporarily, when I return to it I will update this thread with my findings.

Well, what I did to fix mine was I edited the project folder because it contained a / and it built successfully

Try and see what happens

Can you paste the absolute path so I can see exactly what you mean?

Thanks

edit the folder of the project which contains assets and library …

thts what i did

Hi there I’m getting this error too when I include in my project System.ServiceModel.dll in order to use a WCF Client in my project :

“Cross compilation job Mono.WebBrowser.dll failed” … Failed AOT cross compiler

The application runs fine in Androïd and Windows …

Did you manage to find a solution ?

thx.

pure managed C# assemblies are no problems

But you can not crosscompile Desktop OS library bound stuff (Mono.xxx more or less is with native code to os bridges) on iOS where it logically is not present.

generally any assembly that uses native code bridges has a good chance to fail as the native code is then either expected to be windows unmanaged dll or an osx bundle / so file, nothing that exists on iOS at all

Thank you very much for your quick response Dreamora, I finally understood the nature of the problem thanks to your explanations :slight_smile:

So am I stuck here or is there another way to connect to a remote wcf service from a unity builded iOS application ?

Thanks again !

I would assume impossible unless MonoTouch supports it but even then: will not work in any form with unity

Also had the AOT Cross Compiler error (when building for iOS).

Turned out that the error wasn’t about the generics, but about the obsolete stuff contained within the DLL. To be more concrete, the DLL was made with Unity 3.x and it referenced the WWW.audioClip property - and this property doesn’t exist in Unity 4.x anymore.

So, you should always check for which Unity version (3.5.x, 4.x etc.) the DLL was being built!

Danko

Deleting [PROJECT]/obj/ and [PROJECT]/temp/ did the job for me :slight_smile: