- Home /
Build for linux in windows fails: Burst requires gcc/clang toolchains to be installed
Is it possible to build for Linux on Windows? And if so, how?
I'm trying to build ML-Agents examples (https://github.com/Unity-Technologies/ml-agents/tree/master/Project).
In Unity Hub I have Linux Build Support module installed, no other modules. Unity version is 2018.4.20f1.
The error:
BuildFailedException: Burst compiler (1.2.3) failed running
stdout:
Burst requires gcc/clang toolchains to be correctly installed in order to build a standalone player for Linux with X64_SSE4
Unable to find /usr/bin/clang or /usr/bin/gcc, is the gcc/clang toolchain installed?
stderr:
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.2.3/Editor/BurstAotCompiler.cs:752)
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.2.3/Editor/BurstAotCompiler.cs:690)
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.2.3/Editor/BurstAotCompiler.cs:664)
Unity.Burst.Editor.BurstAotCompiler.OnPostBuildPlayerScriptDLLsImpl (UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.2.3/Editor/BurstAotCompiler.cs:332)
Unity.Burst.Editor.BurstAotCompiler.OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.2.3/Editor/BurstAotCompiler.cs:90)
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) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
Answer by ashv17 · May 01, 2020 at 08:37 AM
Upgrade to ml-agents 1 (https://github.com/Unity-Technologies/ml-agents/tree/release_1) and disable burst compiler in the player settings.
Thank you. This led me to the solution of disabling burst from the menu (Jobs -> User Burst Jobs).
Answer by dajohnso · Apr 21, 2020 at 05:33 PM
What compiler are you building with? The text implies you do not have the GCC compiler environment installed and linked into Unity.
You should be looking here... https://gcc.gnu.org/
Thank you for the answer. I installed $$anonymous$$gw-w64 runtime library which provides gcc support for Windows. How do I link it with Unity?
That I don't know yet, new to unity myself :) I would look in the unity manual for building unix to see if there is any help there.
Also I assume you have Linus checked of in ionstall? https://gamedev.stackexchange.com/questions/122252/why-i-cant-do-a-build-for-linux https://docs.unity3d.com/$$anonymous$$anual/BuildSettingsStandalone.html
and, if you dont have a Linux box to test on... http://www.qcfdesign.com/?p=876