AOT cross compiler failing on iOS

I am trying to build a game for iOS and I keep getting the following error:

Error building Player: InvalidOperationException: The process must exit before getting the requested information.
UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck(String[], String, BuildTarget, BuildOptions)
UnityEditor.BuildPlayerWindow:BuildPlayerWithDefaultSettings(Boolean, BuildOptions)
UnityEditor.BuildPlayerWindow:ShowBuildTargetSettings()
UnityEditor.BuildPlayerWindow:OnGUI()
System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)
System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
System.Reflection.MethodBase:Invoke(Object, Object[])
UnityEditor.HostView:Invoke(String, Object)
UnityEditor.HostView:Invoke(String)
UnityEditor.HostView:OnGUI()

[/Applications/buildAgent/work/71ca6fec1b41cc30/Projects/../Editor/Src/Commands/BuildPlayerUtility.cpp line 1501] 
(Filename: /Applications/buildAgent/work/71ca6fec1b41cc30/Projects/../Editor/Src/Commands/BuildPlayerUtility.cpp Line: 1501)

Unity hangs for a few minutes while compiling mscorlib.dll then stops and displays the above message.

I initially thought that this started happening after installing Unity 3.2 so I reinstalled the previous version and created a new project. I still get the same error message. T

I don't remember installing anything recently that could interact with Unity.

Does anybody have any ideas about what's happening?

I restarted my machine a few times and it's working again now. Not sure what happened.

This problem appears if you have launched Unity through MonoDevelop as a debugger. Quit Unity & launch it directly. This will fix the problem.