Search Unity

Build fails for Mac Standalone (caused by Burst)

Discussion in 'Data Oriented Technology Stack' started by davenirline, Aug 11, 2019.

  1. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    471
    We upgraded to Unity 2019.2 and building for Mac now fails. Here are the errors during build:

    System.InvalidOperationException: Error while executing command: xcode-select -p ---> System.ComponentModel.Win32Exception: The system cannot find the file specified
    at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    at Burst.Compiler.IL.Helpers.ProcessHelper.Run(String exePath, String arguments, String workingDirectory, TextWriter consoleOut, TextWriter consoleErr)

    ----------------------------------

    --- End of inner exception stack trace ---
    at Burst.Compiler.IL.Helpers.ProcessHelper.Run(String exePath, String arguments, String workingDirectory, TextWriter consoleOut, TextWriter consoleErr)
    at Burst.Compiler.IL.Aot.AotHelpersMacOS.CheckXCodeInstallation()
    at Burst.Compiler.IL.Aot.AotNativeLink.ValidateExternalToolChain(AotCompilerOptions options)
    at Burst.Compiler.IL.Aot.AotCompiler.Link(List`1 groups, AotCompilerOptions compilerOptions)
    at Burst.Bcl.BclApp.CompileAndLink(List`1 methodGroups)
    at Burst.Bcl.Program.Main(String[] args)

    ----------------------------------

    BuildFailedException: Burst compiler (1.1.1) failed running

    stdout:
    An unexpected exception occurred:
    stderr:
    System.InvalidOperationException: Error while executing command: xcode-select -p ---> System.ComponentModel.Win32Exception: The system cannot find the file specified
    at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    at Burst.Compiler.IL.Helpers.ProcessHelper.Run(String exePath, String arguments, String workingDirectory, TextWriter consoleOut, TextWriter consoleErr)
    --- End of inner exception stack trace ---
    at Burst.Compiler.IL.Helpers.ProcessHelper.Run(String exePath, String arguments, String workingDirectory, TextWriter consoleOut, TextWriter consoleErr)
    at Burst.Compiler.IL.Aot.AotHelpersMacOS.CheckXCodeInstallation()
    at Burst.Compiler.IL.Aot.AotNativeLink.ValidateExternalToolChain(AotCompilerOptions options)
    at Burst.Compiler.IL.Aot.AotCompiler.Link(List`1 groups, AotCompilerOptions compilerOptions)
    at Burst.Bcl.BclApp.CompileAndLink(List`1 methodGroups)
    at Burst.Bcl.Program.Main(String[] args)

    Unity.Burst.Editor.BurstAotCompiler+BclRunner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.1.1/Editor/BurstAotCompiler.cs:663)
    Unity.Burst.Editor.BurstAotCompiler+BclRunner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.1.1/Editor/BurstAotCompiler.cs:601)
    Unity.Burst.Editor.BurstAotCompiler+BclRunner.RunManagedProgram (System.String exe, System.String args, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.1.1/Editor/BurstAotCompiler.cs:575)
    Unity.Burst.Editor.BurstAotCompiler.OnPostBuildPlayerScriptDLLsImpl (UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.1.1/Editor/BurstAotCompiler.cs:290)
    Unity.Burst.Editor.BurstAotCompiler.OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.1.1/Editor/BurstAotCompiler.cs:46)
    UnityEditor.Build.BuildPipelineInterfaces.OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:452)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    ----------------------------------



    Addtional notes:
    • We're using Mono as IL2CPP build takes too much time (large code base)
    • Burst version: 1.1.1
     
  2. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    1,369
    Side question. You’re building for mac on mac?
     
  3. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    471
    I'm on Windows 10. I'm building for both Windows and Mac. Windows build works.
     
  4. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    1,369
    Last edited: Aug 14, 2019
  5. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    471
    Well, it used to work before. That would suck if Unity changed it. I'm talking about Mac standalone build here. Not iOS. This is also local build.
     
  6. fabrizio_unity

    fabrizio_unity

    Unity Technologies

    Joined:
    May 3, 2018
    Posts:
    9
    eizenhorn likes this.
  7. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    471
    It used to work before, I mean the build completes. Does this mean that it will no longer be supported? That Windows can't build projects to Mac standalone with Burst enabled?

    What are our options then? Should we need a Mac machine to build a Mac standalone now? It's just a little inconvenience that we didn't have before. We have a script that automatically builds for Windows and Mac. I guess we can't do that now.
     
  8. Lee_Hammerton

    Lee_Hammerton

    Unity Technologies

    Joined:
    Jul 26, 2018
    Posts:
    30

    Burst compilation has never worked when performing cross compilation, however prior to recent versions the build would still succeed as you saw.

    From 2019.2 the bug that prevented a burst build failure from being seen as a build failure has been fixed. In order to continue to cross compile, you will need to disable burst for the affected platform.

    Note in the past, your builds may have been succeeding, but you won't have been getting the benefits of burst on the mac builds (since burst will have failed).

    You should be able to disable burst for the affected platform by using the Burst Aot Settings (however there is potentially a bug meaning the UI setting is not being written back to the file).

    If you got to the ProjectSettings/Folder, you should see a number of BurstAotSettings_xxx.json files, and you can set the disable compilation value to true for the particular platform, e.g.

    "DisableBurstCompilation": true
     
    qsw745 and davenirline like this.