AOT Cross Compiler - Fails without Details!

We are trying to port our DLL from PC/Mac/WebPlayer to iPhone now.

The Critical issue we are facing now is that the AOT Cross Compiler error message contains NO DETAILS to tell us why it won't compile.

How do we get useful information from the AOT Compilation failure, so that we can determine what needs to be fixed?? Where are the details? (reason for failure and location)

Your help is appreciated!

============ -- For reference, the AOT Cross Compile output looks like this ---

Exception: Failed AOT cross compiling AGFEngine.dll /Applications/Unity iPhone/Unity --aot=full,static,nodebug,asmonly,outfile="../iPhone-Trampoline/Libraries/AGFEngine.dll.s" "AGFEngine.dll" current dir : /Users/sbrady/Downloads/IphoneAGFTest/Temp/BuildingPlayer/Data std= err=

UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.String iPhoneBundleIdentifier, iPhoneBuildSettings buildSettings, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options) (at /Users/build/builds/unity-iphone/iphone/Editor/Mono/PostprocessBuildPlayer.cs:822)

Could you please send us your project so we can fix this bug? (if you'd leave your casenumber in a comment that'd be great). In the meantime, the only thing I can offer right now is to try to find out which code is tripping up the AOT compiler. It's guaranteed to be a script (or .dll), and not other assets. Try removing half, and see if it can compile then, and try to zoom in to the offending script(s) like that.

AOT Crosscompiler error without details can (and for me often is) caused by 3rd party .net libraries dropped in.

Went nearly nuts when I tried to implement json support using a library that worked fine on the desktop and fine in unity iphone on the editor but when trying to built came up with such great errors ( unable to compile System.Security or in general)

In the end I went through 6 or so C# JSON libraries till I found one (the last available option actually, jsonFX if anybody struggles over this and is hunt by the same thing) which worked on editor and build.

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 is made with Unity 3.x and it referenced the “WWW.audioClip” property, which 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!


Are you on a mac to compile your project and using XCODE with the iPhone SDK installed?

I have the same problem of AOT Cross Compiler error without any notice when building for iOS.

It works OK till yesterday but it happens today suddenly.

It drives me mad.