Author Topic: iOS Cross compilation failed on OSX (works on Windows)  (Read 12544 times)

freefall

  • Guest
iOS Cross compilation failed on OSX (works on Windows)
« on: June 04, 2012, 11:29:48 PM »
I've googled for hours and I still haven't found a solution. Fresh reinstall doesn't do the trick either.

I installed the newest version of both Unity and NGUI, trying to compile a simple NGUI test menu to send it to my iPad. Whenever NGUI is in the project (no other plugins or files), and it starts compiling, I get the following error:

  1. Cross compilation job Assembly-CSharp.dll failed.
  2. 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/Fries/New Unity Project/Temp/StagingArea/Data/Managed
  3. result file exists: False
  4. stdout: Mono Ahead of Time compiler - compiling assembly /Users/Fries/New Unity Project/Temp/StagingArea/Data/Managed/Assembly-CSharp.dllThe following assembly referenced from /Users/Fries/New Unity Project/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll could not be loaded: Assembly: Assembly-CSharp-firstpass (assemblyref_index=2) Version: 0.0.0.0 Public Key: (none)The assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (/Users/Fries/New Unity Project/Temp/StagingArea/Data/Managed/).Could not load file or assembly 'Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.Failed to load method 0x600001f from '/Users/Fries/New Unity Project/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll'.
  5. stderr:
  6.  
  7. at UnityEditor.MonoProcessUtility.RunMonoProcess (System.Diagnostics.Process process, System.String name, System.String resultingFile) [0x00000] in :0
  8. 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
  9. at UnityEditor.MonoCrossCompile+JobCompileAOT.ThreadPoolCallback (System.Object threadContext) [0x00000] in :0
  10. UnityEditor.MonoCrossCompile:CrossCompileAOTDirectoryParallel(BuildTarget, CrossCompileOptions, String, String, String)
  11. PostProcessiPhonePlayer:PostProcess(BuildTarget, String, String, String, String, String, String, String, BuildOptions, RuntimeClassRegistry)
  12. UnityEditor.HostView:OnGUI()

I've uploaded my project files here: http://www.mediafire.com/?cj9oofwk7tktwa2

I've tried everything. Any help would be much appreciated, it's driving me pretty crazy!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: iOS Cross compilation failed on OSX (works on Windows)
« Reply #1 on: June 05, 2012, 12:21:34 AM »
I'm not sure if NGUI Free works on iOS. Unfortunately that log isn't telling me much either.

Full version works fine, I know that much.

freefall

  • Guest
Re: iOS Cross compilation failed on OSX (works on Windows)
« Reply #2 on: June 05, 2012, 11:25:34 AM »
I'm not sure if NGUI Free works on iOS. Unfortunately that log isn't telling me much either.

Full version works fine, I know that much.

Thanks for the reply! Could somebody clarify on this? Does the free version work with iOS?

I just wanted to make sure it worked (since in the description it pretty much has all the features) before spending the money.

seandanger

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 2
  • Posts: 32
    • View Profile
    • Bit By Bit Studios
Re: iOS Cross compilation failed on OSX (works on Windows)
« Reply #3 on: November 15, 2012, 06:08:40 PM »
Not to resurrect a dead thread, just wanted to note that I had the same error and removing the free version did fix the issue.  I can also confirm that the full version of course works fine. 

I think the problem stems from the free version's .DLL.  I believe the AOT compiler doesn't probe .dll the same way it would source code.  You could probably write a dummy class that references all methods contained in the DLL in order to work around it but since the error doesn't list which ones it has a problem with, I think upgrading to the full version is probably the easier route :)