Search Unity

Build fails for Mac Standalone (caused by Burst)

Discussion in 'Burst' started by davenirline, Aug 11, 2019.

  1. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    987
    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:
    2,685
    Side question. You’re building for mac on mac?
     
  3. davenirline

    davenirline

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

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,685
    Last edited: Aug 14, 2019
  5. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    987
    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:
    47
    eizenhorn likes this.
  7. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    987
    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:
    118

    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
     
    cocuma22, EirikWahl, sacb0y and 3 others like this.
  9. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    874
    What does this mean for the Animation rigging asset? Can i just not use it on mac builds?
     
  10. JohnAustinPontoco

    JohnAustinPontoco

    Joined:
    Dec 23, 2013
    Posts:
    283
    Just an FYI. We're building a Windows build with Linux with the following command:
    Code (CSharp):
    1. xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' $UNITY_EXE \
    2.     -batchmode \
    3.     -quit \
    4.     --burst-disable-compilation
    5.     -disable-assembly-updater \
    6.     -projectPath $MAIN_PROJECT_PATH \
    7.     -logFile $EDITOR_LOG_FILE_STANDALONE_WINDOWS \
    8.     -buildTarget Win64 \
    9.     -executeMethod Editor.ClockworkBuildPipeline.BuildDevelopmentWindows
    and Burst is still being compiled (and failing). The command line flag doesn't seem to be working for us. I'll try the JSON file, though.

    Frustratingly, all of the settings seem to be focused on disabling Burst on a platform whole-sale. We don't ever want to do that, just when we're *cross-compiling*.
     
  11. sheredom

    sheredom

    Unity Technologies

    Joined:
    Jul 15, 2019
    Posts:
    300
    Have you tried the Burst 1.3.0 preview? We added support for cross compiling desktop platforms in that.