- Home /
Cross Compilation Fails every 30+ builds
If I retry the compile, everything compiles correctly. But once out of every 30 or so builds when compiling the project under Unity, I get this "Cross Compilation Failed" error. Really, I just want to make sure I haven't done anything to cause this. I removed some of the directory names in the messages and replaced with .../
Is this a known problem (I can't find much on this site about anyone else running into the same issue)?
Here's the error, sorry for the length:
Cross compilation job Assembly-UnityScript.dll failed. UnityEngine.UnityException: Failed AOT cross compiler: /Applications/Unity/Unity.app/Contents/BuildTargetTools/iPhonePlayer/mono-xcompiler --aot=full,asmonly,nodebug,static,outfile="Assembly-UnityScript.dll.s" "Assembly-UnityScript.dll" current dir : .../Temp/StagingArea/Data/Managed result file exists: True stdout: Mono Ahead of Time compiler - compiling assembly .../Temp/StagingArea/Data/Managed/Assembly-UnityScript.dllCode: 35724 Info: 220 Ex Info: 419 Unwind Info: 955 Class Info: 759 PLT: 126 GOT Info: 1004 GOT Info Offsets: 596 GOT: 600 Offsets: 996Output file: 'Assembly-UnityScript.dll.s'.Linking symbol: '_mono_aot_module_Assembly_UnityScript_info'.Compiled 82 out of 82 methods (100%)Methods without GOT slots: 68 (82%)Direct calls: 1 (100%)JIT time: 39 ms, Generation time: 4 ms, Assembly+Link time: 0 ms. stderr:
at UnityEditor.MonoProcessUtility.RunMonoProcess (System.Diagnostics.Process process, System.String name, System.String resultFile) [0x00000] in :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 :0 at UnityEditor.MonoCrossCompile+JobCompileAOT.ThreadPoolCallback (System.Object threadContext) [0x00000] in :0 UnityEditor.MonoCrossCompile:CrossCompileAOTDirectoryParallel(BuildTarget, CrossCompileOptions, String, String, String) PostProcessiPhonePlayer:PostProcess(BuildTarget, String, String, String, String, String, String, String, BuildOptions, RuntimeClassRegistry) UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
Cross compilation job System.dll failed. UnityEngine.UnityException: Failed AOT cross compiler: /Applications/Unity/Unity.app/Contents/BuildTargetTools/iPhonePlayer/mono-xcompiler --aot=full,asmonly,nodebug,static,outfile="System.dll.s" "System.dll" current dir : .../Temp/StagingArea/Data/Managed result file exists: True stdout: Mono Ahead of Time compiler - compiling assembly .../Temp/StagingArea/Data/Managed/System.dllCode: 1447208 Info: 39539 Ex Info: 53439 Unwind Info: 7286 Class Info: 39935 PLT: 2888 GOT Info: 54749 GOT Info Offsets: 25780 GOT: 25784 Offsets: 99036Output file: 'System.dll.s'.Linking symbol: '_mono_aot_module_System_info'.Compiled 7435 out of 7436 methods (99%)1 methods have other problems (0%)Methods without GOT slots: 4565 (61%)Direct calls: 2854 (42%)JIT time: 731 ms, Generation time: 293 ms, Assembly+Link time: 0 ms. stderr:
at UnityEditor.MonoProcessUtility.RunMonoProcess (System.Diagnostics.Process process, System.String name, System.String resultFile) [0x00000] in :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 :0 at UnityEditor.MonoCrossCompile+JobCompileAOT.ThreadPoolCallback (System.Object threadContext) [0x00000] in :0 UnityEditor.MonoCrossCompile:CrossCompileAOTDirectoryParallel(BuildTarget, CrossCompileOptions, String, String, String) PostProcessiPhonePlayer:PostProcess(BuildTarget, String, String, String, String, String, String, String, BuildOptions, RuntimeClassRegistry) UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
Error building Player: UnityException: Cross compilation failed. UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
Exception: Error building Player: UnityException: Cross compilation failed. UnityEditor.BuildPlayerWindow.BuildPlayerWithDefaultSettings (Boolean askForBuildLocation, BuildOptions forceOptions) UnityEditor.BuildPlayerWindow.BuildPlayerAndRun ()
Your answer
![](https://koobas.hobune.stream/wayback/20220613062844im_/https://answers.unity.com/themes/thub/images/avi.jpg)