Unity-Technologies / EntityComponentSystemSamples

Other
7.16k stars 1.6k forks source link

Building standalone app on Windows fails in burst compiler #129

Closed ArtemKoval closed 5 years ago

ArtemKoval commented 5 years ago

Hi all!

I've been trying to build the standalone Windows app for the samples project. But it fails for 2 different reasons.

  1. If I enable Jobs -> Burst -> Show Timings it fails with this message:
Failed running F:\Projects\Unity\EntityComponentSystemSamples\Samples\Library\PackageCache\com.unity.burst@1.0.0-preview.4\.Runtime\bcl.exe --debug=true @C:\Users\ark\AppData\Local\Temp\tmp743a78b2.tmp

stdout:

Unexpected arguments: `--log-timings`

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>

      --platform=VALUE       Target Platform <Windows|macOS|Linux|Android|iOS|

                               PS4|XboxOne|Wasm|UWP>. 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

      --assembly-folder=VALUE

                             Assembly folders (separated by ; or multiple

                               options)

      --method=VALUE         Full methodname with optionnal 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

      --help                 Show Help

stderr:

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@1.0.0-preview.4/Editor/BurstAotCompiler.cs:358)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
  1. If I disable the flag from the above it fails with this message:
Failed running F:\Projects\Unity\EntityComponentSystemSamples\Samples\Library\PackageCache\com.unity.burst@1.0.0-preview.4\.Runtime\bcl.exe --debug=true @C:\Users\ark\AppData\Local\Temp\tmp72ef9fca.tmp

stdout:

Unable to determine tools version of MSVC Linker, please ensure you have visual studio installed correctly!

stderr:

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@1.0.0-preview.4/Editor/BurstAotCompiler.cs:358)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

I'm absolutely sure I have Visual Studio C++ build tools installed. Also I tried changing various Player settings, like Architecture, Scripting Runtime Version, API Compatibility Level, Scripting Backend, but there are the same 2 errors.

Please let me know what you think.

Unity 2091.1.0b9 0df25da86c755fecd83758fc0b334cfff9487bf7 SHA-1 of this repo

Cheers, Art

leethomason commented 5 years ago

Art, regrets on the slow response - nicely bug report. Could you try on the new version, and if there is still an issue please support a bug through the tool? (Help->Report a Bug). I'm hoping this has been resolved.