Unity 2022.2.17: Android build fails with Burst 1.8.4

So I was trying out Burst and it looks like it causes the Android build to fail.

If you create a new 3D project and build to Android it will build correctly.

However if you install Burst from the package manager and build to Android it will give an error: “/home/linux/Unity/Hub/Editor/2022.2.17f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/clang ‘@/tmp/tmpc94559e.tmp’”

I’m using Ubuntu 20.04.

Hello @de_CLAS_Softworks , can you post the full error you get?

There are three errors:

Library/Bee/artifacts/Android/AsyncPluginsFromLinker: Burst internal compiler error: Burst.Compiler.IL.Aot.AotLinkerException: Non 0 exit code | The native link step failed. Check previous exception in the log - linker command line : “/home/linux/Unity/Hub/Editor/2022.2.17f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/clang ‘@/tmp/tmp6214f32e.tmp’”
UnityEngine.GUIUtility:processEvent (int,intptr,bool&) (at /home/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:190)

Building Library/Bee/artifacts/Android/AsyncPluginsFromLinker failed with output:
UnityEditor.Build.BuildFailedException: Burst compiler (1.8.4) failed running

stdout:
Starting 1 library requests
Error: Burst internal compiler error: Burst.Compiler.IL.Aot.AotLinkerException: Non 0 exit code | The native link step failed. Check previous exception in the log - linker command line : “/home/linux/Unity/Hub/Editor/2022.2.17f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/clang ‘@/tmp/tmp6214f32e.tmp’”

at Burst.Compiler.IL.Aot.AotNativeLinkBase.RunNativeLinkerTool (System.String command, System.String arguments, System.String errorMessage, System.String commandType, System.String workingDirectory, System.Boolean muteOutputs) [0x000f8] in :0
at Burst.Compiler.IL.Aot.AotNativeLinkAndroid.Link (Burst.Backend.TargetCpu targetCpu, System.Collections.Generic.List1[T] inputFiles, System.String outputFile, System.Boolean enableDebugInfo) [0x000cd] in <e897daa8366b4183b121ad602adf2292>:0 at Burst.Compiler.IL.Aot.AotCompiler.Link (System.Collections.Generic.List1[T] groups, System.String nameSuffix, Burst.Compiler.IL.Aot.AotCompilerOptions compilerOptions, System.IO.TextWriter consoleOut, System.IO.TextWriter consoleError) [0x0023f] in :0
at Burst.Compiler.IL.Server.LibraryCompiler.LinkAndFinalize (Burst.Compiler.IL.Server.CompilationJob request, Burst.Compiler.IL.Server.CompilerServerJobExecutionContext executionContext, Burst.Compiler.IL.Server.SharedLibraryCompilationState sharedState, System.Int32 methodGroupIndex, Burst.Compiler.IL.NativeCompiler nativeCompiler, Burst.Compiler.IL.Aot.AotCompilerOptions defaultOptions, Burst.Compiler.IL.Aot.AotModuleGroup aotModuleGroup) [0x00674] in :0
stderr:

at Unity.Burst.Editor.BurstAotCompiler+BclRunner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) [0x00237] in ./Library/PackageCache/com.unity.burst@1.8.4/Editor/BurstAotCompiler.cs:1706
at Unity.Burst.Editor.BurstAotCompiler+BclRunner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) [0x0004d] in ./Library/PackageCache/com.unity.burst@1.8.4/Editor/BurstAotCompiler.cs:1583
at Unity.Burst.Editor.BurstAotCompiler+BclRunner.RunManagedProgram (System.String exe, System.String args, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) [0x00001] in ./Library/PackageCache/com.unity.burst@1.8.4/Editor/BurstAotCompiler.cs:1558
at Unity.Burst.Editor.BurstAotCompiler.OnPostBuildPlayerScriptDLLsImpl (Unity.Burst.Editor.BurstAotCompiler+BurstAOTSettings settings, UnityEditor.Compilation.Assembly[ ] playerAssemblies) [0x00a76] in ./Library/PackageCache/com.unity.burst@1.8.4/Editor/BurstAotCompiler.cs:706
at Unity.Burst.Editor.BurstAOTCompilerPostprocessor.DoGenerate (UnityEditor.Compilation.Assembly[ ] assemblies) [0x0001b] in ./Library/PackageCache/com.unity.burst@1.8.4/Editor/BurstAotCompiler.cs:265
at Unity.Burst.Editor.BurstAOTCompilerPostprocessor.GenerateNativePluginsForAssemblies (UnityEditor.Build.IGenerateNativePluginsForAssemblies+GenerateArgs args) [0x0008a] in ./Library/PackageCache/com.unity.burst@1.8.4/Editor/BurstAotCompiler.cs:179
at UnityEditor.Modules.BeeBuildPostprocessor.GenerateNativePluginsForAssemblies (PlayerBuildProgramLibrary.Data.GenerateNativePluginsForAssembliesArgs args) [0x00050] in /home/bokken/build/output/unity/unity/Editor/Mono/Modules/BeeBuildPostprocessor.cs:605
at Bee.BeeDriver.BuildRequest+<>c__DisplayClass63_0`1[T].b__0 (System.Object o) [0x00000] in /home/bokken/build/output/unity/unity/Tools/Bee/Bee.BeeDriver2/BuildRequest.cs:66
at Bee.BeeDriver.BeeDriver_RunBackend+<>c__DisplayClass1_0.b__0 () [0x00000] in /home/bokken/build/output/unity/unity/Tools/Bee/Bee.BeeDriver2/BeeDriver_RunBackend.cs:88
at System.Threading.Tasks.Task.InnerInvoke () [0x0000f] in <1c2f3ebc0f564fcdbe2213fe0bae3193>:0
at System.Threading.Tasks.Task.Execute () [0x00000] in <1c2f3ebc0f564fcdbe2213fe0bae3193>:0
— End of stack trace from previous location where exception was thrown —

at Bee.BeeDriver.BeeDriver_RunBackend.ProcessRPCRequest (Bee.BinLog.RPCActionMessage msg, Bee.BeeDriver.BuildRequest+RPCCallback rpcCallback, IPCConnection ipcConnection, System.Threading.Tasks.Task writePipeConnectionTask, Bee.BeeDriver.InternalState state) [0x000c9] in /home/bokken/build/output/unity/unity/Tools/Bee/Bee.BeeDriver2/BeeDriver_RunBackend.cs:88
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /home/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:190)

Build completed with a result of ‘Failed’ in 74 seconds (73825 ms)
2 errors
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /home/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:190)

Hmm, yeah those errors were a lot less helpful than I hoped.
Can you file a bug report with a repro project (in the edtior: Help > Report a Bug…) and post the report number in here?
Then we can have a better look at it

At the moment I’m up against a deadline so I have to move on. It shouldn’t be too hard to recreate since all you have to do is create a new project and attempt to build it out. Thanks for your time.

i have the same problem, how did you fix it??

I had the same problem (after an update from 2021 to 2022.3) and I have followed the advice from this thread Errors when compiling
Change scripting backend from mono to il2cpp (project settings / player / Other settings / Configuration)
Then another error appear saying than clang was not found but again I followed the advice of ifilatov on this thread
Build failure on Android + Unity 2022.2.0b14
and his fix script did work !!
Hope this can help, dear linux users

Just linking to another related thread: Android build Burst compiler (1.8.7) failed running. - Unity Engine - Unity Discussions

I’m having the same trouble and I’m using Windows 10, and this happen to all my projects for Android and for Windows too, even when I try creating a new project, making it very simple and compiling it. I’m using the 2022.3.2f1 editor and I updated all packages, and I already tried installing 2022.3.57f1 and 6000.0.36f1 and had the same problem.
But curiously, I tried in 2019.4.29f1 and all projects compile perfectly, and I tried copying all assets from a project to a new one in this editor and compiled fine, but new editors have more useful tools and I don’t want to move all my projects to it, it’s better to find a solution to use the new editors.

Hi, MaxPower741. Please report your issue via the Bug Reporter (“Help → Report a Bug…” in the Editor). Make sure to attach your faulty project, too. We’ll then take a further look into this! Cheers.