iphone crosss compile assertion failed.

Hello,

I’m trying to compila a project to iOS in unty 4.1.2, and getting following error.
Anyone know what is happened?, or how to fix this?

Cross compilation job Assembly-CSharp.dll failed.
UnityEngine.UnityException: Failed AOT cross compiler: /Applications/Unity/Unity.app/Contents/BuildTargetTools/iPhonePlayer/mono-xcompiler --aot=full,asmonly,nodebug,static,outfile="Assembly-CSharp.dll.s" "Assembly-CSharp.dll"  current dir : /Users/use0116/Documents/workspace/ps0070/Temp/StagingArea/Data/Managed
 result file exists: True
stdout: Mono Ahead of Time compiler - compiling assembly /Users/use0116/Documents/workspace/ps0070/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll* Assertion at aot-compiler.c:5051, condition `table_size < 65000' not met
stderr: 

  at UnityEditor.MonoProcessUtility.RunMonoProcess (System.Diagnostics.Process process, System.String name, System.String resultingFile) [0x00000] in <filename unknown>:0 
  at UnityEditor.MonoCrossCompile.CrossCompileAOT (BuildTarget target, System.String crossCompilerAbsolutePath, System.String assembliesAbsoluteDirectory, CrossCompileOptions crossCompileOptions, System.String input, System.String output, System.String additionalOptions) [0x00000] in <filename unknown>:0 
  at UnityEditor.MonoCrossCompile+JobCompileAOT.ThreadPoolCallback (System.Object threadContext) [0x00000] in <filename unknown>:0 
UnityEditor.HostView:OnGUI()

assertion failed in aot-compiler.c:5051 ( function emit_class_name_table() ). In my project, I generated many C# iterator blocks ( over 32000 ), but not over 65000. Do you think that is something related ?

–

Yes I would imagine so - what do you mean you've "generated them"? Sounds like you've blown a Mono lookup table to me...

–

1 Answer

1

Try killing Xcode and building project to another folder.

in my first try, xcode process not exists. I tried it, but still same error occurred.

–

Seems like you are using some libraries that are not supported for iOS.

–

I scanned my project for all using directives. but I could not find no-supported libraries. All libraries are available for monotouch. thanks.

–