Search Unity

Burst Compiler error when building for Android

Discussion in 'Burst' started by benoneal, Sep 10, 2018.

  1. benoneal

    benoneal

    Joined:
    Apr 15, 2016
    Posts:
    31
    Since preview 25 of the burst compiler, I've been unable to build for Android. The error I'm getting is:

    Error building Player: Win32Exception: ApplicationName='C:\Users\Ben O'Neal\AppData\Local\Unity\cache\packages\staging-packages.unity.com\com.unity.burst@0.2.4-preview.29\.Runtime\bcl.exe', CommandLine='@C:\Users\BENO'N~1\AppData\Local\Temp\tmp6f2b20b.tmp', CurrentDirectory='C:/Users/Ben O'Neal/ECS Prototype/Assets/..', Native error= The system cannot find the file specified.

    When I look in those directories, they definitely contain the relevant files.

    I have a funny feeling it's related somehow to my user name containing both a space and an apostrophe, but I'm really just grasping at straws with that hypothesis if I'm honest.

    I haven't seen anyone else encounter this specific issue in my searching. Anyone have any ideas?
     
    erenaydin likes this.
  2. Micz84

    Micz84

    Joined:
    Jul 21, 2012
    Posts:
    451
    I have an issue with a burst on Android too. I get those errors


    Code (CSharp):
    1.  
    2. System.InvalidOperationException: Failing to execute linker: D:\Projekty\TestBeta\Library\PackageCache\com.unity.burst@0.2.4-preview.24\.Runtime\linker\blink.exe  --platform=Android --target=ARMV7A_NEON32 --output="C:\Users\MichalLeszczynski\AppData\Local\Temp\burst-aoto24qes0r.wjj\lib_burst_generated.so" --il2cpp-plugin-folder="C:\Program Files\Unity\Hub\Editor\2018.3.0b1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools" "C:\Users\MichalLeszczynski\AppData\Local\Temp\burst-aoto24qes0r.wjj\lib_burst_generated.o"
    3.    w Burst.Compiler.IL.Aot.AotCompiler.CallLinkerProcess(TargetPlatform platform, TargetCpu targetCpu, List`1 plugins, List`1 inputFiles, String outputFile)
    4.    w Burst.Compiler.IL.Aot.AotCompiler.Link(Module module, AotCompilerOptions compilerOptions)
    5.    w Burst.Bcl.Program.Main(String[] args)
    6.  
    Code (CSharp):
    1. Failed running D:\Projekty\TestBeta\Library\PackageCache\com.unity.burst@0.2.4-preview.24\.Runtime\bcl.exe @C:\Users\MICHAL~1\AppData\Local\Temp\tmp656fe9c4.tmp
    2.  
    3. stdout:
    4. Android NDK not found. Make sure environment variable ANDROID_NDK_ROOT is not empty.
    5. Usage: blink.exe [options] <input .o/.obj/.ll files...>
    6.       --help                 Show Help
    7.       --platform=VALUE       Target Platform <Windows|macOS|Linux|Android|iOS|
    8.                                PS4|XboxOne|Wasm|UWP>
    9.       --target=VALUE         Target CPU <Auto|X86_SSE2|X86_SSE4|X64_SSE2|X64_
    10.                                SSE4|AVX|AVX2|AVX512|WASM32|ARMV7A_NEON32|ARMV8A_
    11.                                AARCH64|THUMB2_NEON32>
    12.       --il2cpp-plugin-folder=VALUE
    13.                              Plugin folder
    14.       --output=VALUE         Output shared library file
    15.  
    16. An unexpected exception occurred:
    17. stderr:
    18.  
    19. System.InvalidOperationException: Failing to execute linker: D:\Projekty\TestBeta\Library\PackageCache\com.unity.burst@0.2.4-preview.24\.Runtime\linker\blink.exe  --platform=Android --target=ARMV7A_NEON32 --output="C:\Users\MichalLeszczynski\AppData\Local\Temp\burst-aoto24qes0r.wjj\lib_burst_generated.so" --il2cpp-plugin-folder="C:\Program Files\Unity\Hub\Editor\2018.3.0b1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools" "C:\Users\MichalLeszczynski\AppData\Local\Temp\burst-aoto24qes0r.wjj\lib_burst_generated.o"
    20.    w Burst.Compiler.IL.Aot.AotCompiler.CallLinkerProcess(TargetPlatform platform, TargetCpu targetCpu, List`1 plugins, List`1 inputFiles, String outputFile)
    21.    w Burst.Compiler.IL.Aot.AotCompiler.Link(Module module, AotCompilerOptions compilerOptions)
    22.    w Burst.Bcl.Program.Main(String[] args)
    23.  
    24. UnityEngine.Debug:LogError(Object)
    25. UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
    26. UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
    27. Unity.Burst.Editor.BurstAotCompiler:OnPostBuildPlayerScriptDLLs(BuildReport) (at Library/PackageCache/com.unity.burst@0.2.4-preview.24/Editor/BurstAotCompiler.cs:215)
    28. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    Code (CSharp):
    1. Exception: D:\Projekty\TestBeta\Library\PackageCache\com.unity.burst@0.2.4-preview.24\.Runtime\bcl.exe did not run properly!
    2. UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:130)
    3. UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
    4. Unity.Burst.Editor.BurstAotCompiler.OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@0.2.4-preview.24/Editor/BurstAotCompiler.cs:215)
    5. UnityEditor.Build.BuildPipelineInterfaces.OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:452)
    6. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    7.  
    One of the errors informs that Android NDK was not found, but I have envarioment variable and unity set up.
     
    erenaydin likes this.
  3. fabrizio_unity

    fabrizio_unity

    Unity Technologies

    Joined:
    May 3, 2018
    Posts:
    47
    Hello,
    This is a known issue and it was fixed in version 0.2.4-preview.28. Can you please upgrade the burst package and let us know whether it fixes this issue or not?

    Thanks
     
  4. Micz84

    Micz84

    Joined:
    Jul 21, 2012
    Posts:
    451
    Right now
    I have updated burst to 0.2.4-preview.30. I still experience an issue with the burst compiler. This time is something different, may be related to my username (I have Polish character in my username). I have attached to screenshots. When I just build I get fewer errors and apk is created but it does not run properly on the phone. When I use build and run apk does not build.
     

    Attached Files:

  5. Micz84

    Micz84

    Joined:
    Jul 21, 2012
    Posts:
    451
    It was the right direction. I have created a username without special character and I do not get the first error but still, get those attached when using build and run.
     

    Attached Files:

  6. benoneal

    benoneal

    Joined:
    Apr 15, 2016
    Posts:
    31
    @fabrizio_unity unfortunately it appears to still be an issue for me. Every time I try to build for android, I get these errors (unity 2018.2.8f1, burst @0.2.4-preview.30):

    Code (CSharp):
    1. Win32Exception: ApplicationName='C:\Users\Ben O'Neal\AppData\Local\Unity\cache\packages\staging-packages.unity.com\com.unity.burst@0.2.4-preview.30\.Runtime\bcl.exe', CommandLine='@C:\Users\BENO'N~1\AppData\Local\Temp\tmp2f054439.tmp', CurrentDirectory='C:/Users/Public/Documents/Unity Projects/Impetus Prototype/Assets/..', Native error= The system cannot find the file specified.
    2.  
    3. System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) (at <93cc5a601cf645d2a15a96c4600351ac>:0)
    4. System.Diagnostics.Process.Start () (at <93cc5a601cf645d2a15a96c4600351ac>:0)
    5. (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start()
    6. UnityEditor.Utils.Program.Start (System.EventHandler exitCallback) (at C:/buildslave/unity/build/Editor/Mono/Utils/Program.cs:44)
    7. UnityEditor.Utils.Program.Start () (at C:/buildslave/unity/build/Editor/Mono/Utils/Program.cs:28)
    8. UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:106)
    9. UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
    10. Unity.Burst.Editor.BurstAotCompiler.OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport report) (at C:/Users/Ben O'Neal/AppData/Local/Unity/cache/packages/staging-packages.unity.com/com.unity.burst@0.2.4-preview.30/Editor/BurstAotCompiler.cs:220)
    11. UnityEditor.Build.BuildPipelineInterfaces.OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:452)
    12. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    Code (CSharp):
    1. Error building Player: Win32Exception: ApplicationName='C:\Users\Ben O'Neal\AppData\Local\Unity\cache\packages\staging-packages.unity.com\com.unity.burst@0.2.4-preview.30\.Runtime\bcl.exe', CommandLine='@C:\Users\BENO'N~1\AppData\Local\Temp\tmp2f054439.tmp', CurrentDirectory='C:/Users/Public/Documents/Unity Projects/Impetus Prototype/Assets/..', Native error= The system cannot find the file specified.
    2.  
    Code (CSharp):
    1. Build completed with a result of 'Failed'
    2. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    Code (CSharp):
    1. UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
    2.   at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x0021f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:187
    3.   at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:94
    4. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
     
    IgorAherne likes this.
  7. xoofx

    xoofx

    Unity Technologies

    Joined:
    Nov 5, 2016
    Posts:
    417
    I have tried to create an account similar to yours e.g `Test 2'ONeal` but I haven't been able to replicate this issue. Could you try to create a local account without any spaces or characters to make sure that this is not this issue? Looking at the error, it is not even able to launch the burst AOT compiler, so there is likely something wrong with the path setup (the user? the project?)... but still not sure which one.


    There errors you are getting now are different, I don't see any errors related to burst, so not sure what's going on then.
     
  8. xoofx

    xoofx

    Unity Technologies

    Joined:
    Nov 5, 2016
    Posts:
    417
    I actually checked with a 2018.3 version, as the package is stored locally, that might be the issue in 2018.2 where it was picking it from user directory. I will double check this.
     
  9. benoneal

    benoneal

    Joined:
    Apr 15, 2016
    Posts:
    31
    I restarted into safe mode and renamed my user folder (and corresponding registry entries) to exclude spaces and the apostrophe, and now I'm not getting that error at all, and can successfully build for android. o_O

    One additional thing I did change (which may confound the issue), is that I removed an old symlink I had to my user folder when I renamed it.
     
  10. Micz84

    Micz84

    Joined:
    Jul 21, 2012
    Posts:
    451
    I have removed packages one by one and left a very simple project. Finally, I have found what was causing the second issue. I had a model in fbx and it had a material. I have disabled material import in my fbx as I haven't used it and now it builds. So there were two issues folder name with a special character (Polish diacritic) and issue with imported material.
     
  11. andrew-lukasik

    andrew-lukasik

    Joined:
    Jan 31, 2013
    Posts:
    249
    Unity 2018.3.b10 + Burst 0.2.4-preview.37 creates the same problem it seems (ie:"Android NDK not found. Make sure environment variable ANDROID_NDK_ROOT is not empty").
    Moving sdk from "C:\Users\andre\AppData\Local\Android\Sdk" to "C:\Program Files\Android\sdk" helped. No idea why tho.
     
    Last edited: Nov 19, 2018
  12. sandolkakos

    sandolkakos

    Joined:
    Jun 3, 2009
    Posts:
    285
    I was passing for the same problem, and to solve it I needed to create the ANDROID_NDK_ROOT environment variable and restart the Windows.
     
  13. jobesu

    jobesu

    Joined:
    Jun 21, 2012
    Posts:
    4
    Hello,

    I have a similar issue. I've got the following errors when I try to build my project for Android with burst compilation enabled (Unity 2018.3.0b12, Burst 0.2.4-preview.38):

    Code (CSharp):
    1. System.InvalidOperationException: The linker failed. Check previous exception in the log
    2.    at Burst.Compiler.IL.Aot.AotCompiler.CallLinkerProcess(TargetPlatform platform, TargetCpu targetCpu, List`1 plugins, List`1 inputFiles, String outputFile)
    3.    at Burst.Compiler.IL.Aot.AotCompiler.Link(Module module, AotCompilerOptions compilerOptions)
    4.    at Burst.Bcl.Program.Main(String[] args)
    Code (CSharp):
    1. Failed running D:\Unity\Elios\EliosSimuAndroid\Library\PackageCache\com.unity.burst@0.2.4-preview.38\.Runtime\bcl.exe @C:\Users\jobes\AppData\Local\Temp\tmp48cb5f79.tmp
    2.  
    3. stdout:
    4. Compiling for the platform `Android` using the following toolchain : AndroidToolChain
    5. System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
    6.    at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    7.    at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    8.    at Unity.IL2CPP.Shell.ExecuteAndCaptureOutput(ExecuteArgs executeArgs)
    9.    at Burst.Compiler.IL.Aot.AotLinker.Link(IEnumerable`1 objFiles, String outPath)
    10.    at Burst.Linker.Program.Main(String[] args)
    11. Usage: blink.exe [options] <input .o/.obj/.ll files...>
    12.       --help                 Show Help
    13.       --platform=VALUE       Target Platform <Windows|macOS|Linux|Android|iOS|
    14.                                PS4|XboxOne|Wasm|UWP>
    15.       --target=VALUE         Target CPU <Auto|X86_SSE2|X86_SSE4|X64_SSE2|X64_
    16.                                SSE4|AVX|AVX2|AVX512|WASM32|ARMV7A_NEON32|ARMV8A_
    17.                                AARCH64|THUMB2_NEON32>
    18.       --il2cpp-plugin-folder=VALUE
    19.                              Plugin folder
    20.       --output=VALUE         Output shared library file
    21.  
    22. An unexpected exception occurred:
    23. stderr:
    24.  
    25. System.InvalidOperationException: The linker failed. Check previous exception in the log
    26.    at Burst.Compiler.IL.Aot.AotCompiler.CallLinkerProcess(TargetPlatform platform, TargetCpu targetCpu, List`1 plugins, List`1 inputFiles, String outputFile)
    27.    at Burst.Compiler.IL.Aot.AotCompiler.Link(Module module, AotCompilerOptions compilerOptions)
    28.    at Burst.Bcl.Program.Main(String[] args)
    29.  
    30. UnityEngine.Debug:LogError(Object)
    31. UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
    32. UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
    33. Unity.Burst.Editor.BurstAotCompiler:OnPostBuildPlayerScriptDLLs(BuildReport) (at Library/PackageCache/com.unity.burst@0.2.4-preview.38/Editor/BurstAotCompiler.cs:236)
    34. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    Code (CSharp):
    1. System.Exception: D:\Unity\Elios\EliosSimuAndroid\Library\PackageCache\com.unity.burst@0.2.4-preview.38\.Runtime\bcl.exe did not run properly!
    2.   at UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) [0x0011f] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\BuildUtils.cs:130
    3.   at UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) [0x00063] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\BuildUtils.cs:73
    4.   at Unity.Burst.Editor.BurstAotCompiler.OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport report) [0x0054f] in D:\Unity\Elios\EliosSimuAndroid\Library\PackageCache\com.unity.burst@0.2.4-preview.38\Editor\BurstAotCompiler.cs:236
    5. UnityEngine.Debug:LogError(Object)
    6. Unity.Burst.Editor.BurstAotCompiler:OnPostBuildPlayerScriptDLLs(BuildReport) (at Library/PackageCache/com.unity.burst@0.2.4-preview.38/Editor/BurstAotCompiler.cs:240)
    7. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    8.  
     
  14. Ivan-Pestrikov

    Ivan-Pestrikov

    Joined:
    Aug 8, 2014
    Posts:
    21
    Hey!

    Same problem here. Unity 2018.3.0b12, Burst 0.2.4-preview.37

    Following the forum advices, I moved the ndk to the simpliest path: C:\AndroidNdk,
    to C:\Program Files\Android\NDK -- same error.


    stdout:
    System.Exception: Android NDK not found. Make sure environment variable ANDROID_NDK_ROOT is not empty.
    at Unity.IL2CPP.Building.ToolChains.Android.AndroidNDKUtilities.GetNdkRootDir()
    at Unity.IL2CPP.Building.ToolChains.Android.AndroidNDKUtilities..ctor(NPath ndkRootPath, Architecture architecture, Boolean useDependenciesToolChain)
    at Unity.IL2CPP.Building.ToolChains.AndroidToolChain..ctor(Architecture architecture, BuildConfiguration buildConfiguration, Boolean treatWarningsAsErrors, Boolean assemblyOutput, Boolean useDependenciesToolChain, NPath toolchainPath)
    at Unity.IL2CPP.Building.Platforms.AndroidPlatformSupport.MakeCppToolChain(BuildingOptions buildingOptions)
    at Burst.Compiler.IL.Aot.AotLinker..ctor(TargetPlatform aotPlatform, TargetCpu targetCpu, List`1 pluginFolders)
    at Burst.Linker.Program.Main(String[] args)
    Usage: blink.exe [options] <input .o/.obj/.ll files...>
    --help Show Help
    --platform=VALUE Target Platform <Windows|macOS|Linux|Android|iOS|
    PS4|XboxOne|Wasm|UWP>
    --target=VALUE Target CPU <Auto|X86_SSE2|X86_SSE4|X64_SSE2|X64_
    SSE4|AVX|AVX2|AVX512|WASM32|ARMV7A_NEON32|ARMV8A_
    AARCH64|THUMB2_NEON32>
    --il2cpp-plugin-folder=VALUE
    Plugin folder
    --output=VALUE Output shared library file
    An unexpected exception occurred:
    stderr:
    System.InvalidOperationException: The linker failed. Check previous exception in the log
    at Burst.Compiler.IL.Aot.AotCompiler.CallLinkerProcess(TargetPlatform platform, TargetCpu targetCpu, List`1 plugins, List`1 inputFiles, String outputFile)
    at Burst.Compiler.IL.Aot.AotCompiler.Link(Module module, AotCompilerOptions compilerOptions)
    at Burst.Bcl.Program.Main(String[] args)
    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
    Unity.Burst.Editor.BurstAotCompiler:OnPostBuildPlayerScriptDLLs(BuildReport) (at Library/PackageCache/com.unity.burst@0.2.4-preview.37/Editor/BurstAotCompiler.cs:236)
    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
     
  15. sandolkakos

    sandolkakos

    Joined:
    Jun 3, 2009
    Posts:
    285
    You need also to create the
    ANDROID_NDK_ROOT environment variable pointing to the NDK directory.
     
  16. Ivan-Pestrikov

    Ivan-Pestrikov

    Joined:
    Aug 8, 2014
    Posts:
    21
    Yes, the environment variable wasn't set. Thanks! Fixed that.
    But the build error still persists.

    UPD: The build completes successfully, and I can install an apk manually on a device, but it fails to push to a device and to connect a profiler. If I turn "Enable Burst Compilation" off, everything works perfectly (except the jobs speed).

    The Burst itself is amazing. Many thanks to the Unity team!

    Path1.png path2.png error.png
     
    Last edited: Nov 30, 2018
  17. xoofx

    xoofx

    Unity Technologies

    Joined:
    Nov 5, 2016
    Posts:
    417
    Do you have the variable `AndroidNdkRoot` defined in your system?
     
  18. Ivan-Pestrikov

    Ivan-Pestrikov

    Joined:
    Aug 8, 2014
    Posts:
    21
    Yes, the problem was with the `AndroidNdkRoot` defined. The first screenshot in my previous post is the system variables list.
    But now everything works just perfect. Getting ready to launch a small mobile game, built on pure ECS + Jobs + Burst.

     
    Last edited: Dec 13, 2018
    lomzemsoftdev, sandolkakos and 5argon like this.
  19. xoofx

    xoofx

    Unity Technologies

    Joined:
    Nov 5, 2016
    Posts:
    417
    Good, this will be fixed in an upcoming version (to not use AndroidNdkRoot within Unity Editor when `ANDROID_NDK_ROOT ` is actually defined
     
    lomzemsoftdev likes this.
  20. crumby_shirt

    crumby_shirt

    Joined:
    Oct 13, 2013
    Posts:
    3
    I had the same problem with the ANDROID_NDK_ROOT error. Defining the root didn't do it.

    Disabling Burst fixed the problem.
    Project Settings->Burst AOT Settings->Disable Burst Compilation.

    This happened to me in version 2019.1.0f2
     
    M995, jesscorp, NDAP and 1 other person like this.
  21. chulini

    chulini

    Joined:
    May 18, 2013
    Posts:
    3
    Same happened to me in 2019.2.9f1
    Disabling Burst fixed the problem
     
  22. ndesy

    ndesy

    Joined:
    Jul 22, 2019
    Posts:
    20
    In 2019, in preferences, you can uncheck and check again the checkbox to use the bundled android ndk. This should fix the issue.
     
  23. jancokloasu123

    jancokloasu123

    Joined:
    Sep 11, 2019
    Posts:
    2
    anyone can help me, here is full error log :

    BuildFailedException: Burst compiler (1.1.2) failed running

    stdout:
    Unexpected arguments: `the Alchemist\AppData\Local\Temp\tmpb27ff05.tmp Invalid number of parameters Invalid number of parameters Invalid number of parameters Invalid number of parameters ERROR: Invalid syntax. Default option is not allowed more than '2' time(s). Type "SETX /?" for usage. ------------------------------------start------------------------------------ Pinging 127.0.0.1 with 32 bytes of data: Reply from 127.0.0.1: bytes=32 time<1ms TTL=128 Reply from 127.0.0.1: bytes=32 time<1ms TTL=128 Reply from 127.0.0.1: bytes=32 time<1ms TTL=128 Reply from 127.0.0.1: bytes=32 time<1ms TTL=128 Ping statistics for 127.0.0.1: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms "C:\Program Files (x86)\Nox\" -------------------------------------end-------------------------------------`
    Usage: bcl.exe [options]
    bcl.exe --platform=<platform> --assembly=<PathToAssembly.dll_or_exe> --type=<TypeName>
    bcl.exe --platform=<platform> --assembly-folder=<path1;path2> --method=<FullMethodName[--MethodHash];method2>
    bcl.exe --validate-external-tool-chain --platform=<platform>
    --platform=VALUE Target Platform <Windows|macOS|Linux|Android|iOS|
    PS4|XboxOne|Wasm|UWP|Lumin>. Default: Windows
    --backend=VALUE The backend name. Default: `burst-llvm`
    --safety-checks Enable safety checks. Default for safety checks:
    Disabled
    --disable-safety-checks
    Disable safety checks. Default for safety checks:
    Disabled
    --noalias Enable no-alias analysis and optimizations.
    Default: True
    --disable-noalias Disable no-alias analysis and optimizations.
    Default: False
    --disable-opt Disable `ir-opt` and `cpu-opt` optimizations
    --fastmath Enable fast math optimizations
    --target=VALUE Target CPU <Auto|X86_SSE2|X86_SSE4|X64_SSE2|X64_
    SSE4|AVX|AVX2|AVX512|WASM32|ARMV7A_NEON32|ARMV8A_
    AARCH64|THUMB2_NEON32> Default: Auto
    --ir-opt IR Optimization level. Default: 3
    --cpu-opt=VALUE CPU Optimization level. Default: 3
    --float-precision=VALUE
    Precision CPU <Standard|High|Medium|Low> Default:
    Standard
    --float-mode=VALUE Math options <Default|Strict|Deterministic|Fast>
    Default: Default
    --dump=VALUE Dump flags <None|IL|Backend|IR|IROptimized|Asm|
    Function|Analysis|IRPassAnalysis|ILPre|All>
    Default: Function
    --format=VALUE Object format <Elf|Coff|MachO|Wasm> Default: Elf
    --debugtrap Inserts a debug trap on the first instruction of
    the entry point function. Default: False
    --disable-vectors Disable SIMD Vector types special codegen (float4,
    float2...). Default: False
    --debug Enables generation of debug info - PDB, DWARF -.
    Default: False
    --disable-load-debug-symbols
    Disables loading debug info from assembly PDB.
    Default: False
    --generate-static-linkage-methods
    Enables the generatation of static linkage methods.
    Default: False
    --output=VALUE Output path for the generated shared library.
    Default: lib_burst_generated
    --keep-intermediate-files
    Keep intermediate files along the shared library
    generated final file. Default: False
    --nolink Don't link the final object file to a shared
    library but let the object file to be the output.
    Default: false
    --no-native-toolchain Don't look for a native toolchain. Useful if you
    want to provide your own.
    --key-folder=VALUE Key file folder location - required for some
    platforms. Default:
    --assembly-folder=VALUE
    Assembly folders (separated by ; or multiple
    options)
    --method=VALUE Full methodname with optional hash (separated by --
    )
    --type=VALUE A type to decompile all static public methods from.
    A hash will be generated for each method
    --assembly=VALUE An assembly path to look for the type
    --group Start a new group of methods
    --verbose Display methods being compiled. Default: false
    --root-assembly=VALUE Root assembly for finding compile target methods
    --validate-external-tool-chain
    Don't attempt to build anything, just check that
    the current target and host are correctly
    configured for linking
    --patch-assemblies-into=VALUE
    Produce patched managed assemblies and put them in
    this folder
    --pinvoke-name=VALUE Patch assemblies with pinvokes to this name
    --only-static-methods Compile only static methods and not Execute
    methods of job producer interfaces
    --method-prefix=VALUE Compile only static methods and not Execute
    methods of job producer interfaces
    --help Show Help
    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.1.2/Editor/BurstAotCompiler.cs:659)
    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.2/Editor/BurstAotCompiler.cs:597)
    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.2/Editor/BurstAotCompiler.cs:571)
    Unity.Burst.Editor.BurstAotCompiler.OnPostBuildPlayerScriptDLLsImpl (UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.1.2/Editor/BurstAotCompiler.cs:286)
    Unity.Burst.Editor.BurstAotCompiler.OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.1.2/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) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
     
  24. xoofx

    xoofx

    Unity Technologies

    Joined:
    Nov 5, 2016
    Posts:
    417
    The 1.1.2 version had a bug with white space in temp folder which is making the script to fail.

    We can't fix it for 1.1.2 but if you can upgrade to a latest preview of 1.2.0, this should fix your issue.
     
  25. unity_tmTrLyCJHohNrw

    unity_tmTrLyCJHohNrw

    Joined:
    Dec 21, 2017
    Posts:
    4
    nope.

    BuildFailedException: Burst compiler (1.2.0-preview.11) failed running.

    but if change to il2cpp is everything ok.
     
    Last edited: Dec 23, 2019
  26. polikas

    polikas

    Joined:
    Mar 8, 2018
    Posts:
    1
    I have been facing an error with burst compiler while building the project for Android. After several weeks finally I found a solution but still I am getting an error but I have managed to build the project and run the apk file from my phone, which is something at least. I would like to share it, maybe someone will have the same issue.

    Before I found the solution the project was created with Unity version 2019.2.5f1 and Burst Compiler 1.2.3 version.

    burst_compiler_error.PNG

    I was reading forums and other modules to find something, I tried a lot of different things, nothing worked from what I tried.

    How I managed to solve some of the errors and get a successful build for apk file, but I think it is not running properly on the phone and I still have an error. I Created another project with a more stable Unity version 2019.1.12f1 with exactly the same settings as the above project but with the only difference I updated the Burst Compiler to 1.3.0 preview.4.

    Here is the Console output after the progress so far. burst_Compiler_errorr.PNG

    If anyone can help I would really appreciate it, thank you and sorry for my English.