Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Not able to do standalone Build with Burst

Discussion in 'Burst' started by Opeth001, Nov 6, 2019.

  1. Opeth001

    Opeth001

    Joined:
    Jan 28, 2017
    Posts:
    1,068
    hello everyone,
    im getting an error when building for standalone.

    Code (CSharp):
    1. BuildFailedException: Burst compiler (1.2.0-preview.8) failed running
    2.  
    3. stdout:
    4. Burst requires Visual Studio (installable via Add Component in the Unity Installer) & the C++ build tools for Visual Studio, along with the Windows 10 SDK in order to build a standalone player for Windows with X64_SSE4
    5. Unable to determine tools version of MSVC Linker, please ensure you have visual studio installed correctly!
    6. stderr:
    7.  
    8. 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.0-preview.8/Editor/BurstAotCompiler.cs:725)
    9. 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.0-preview.8/Editor/BurstAotCompiler.cs:663)
    10. 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.0-preview.8/Editor/BurstAotCompiler.cs:637)
    11. Unity.Burst.Editor.BurstAotCompiler.OnPostBuildPlayerScriptDLLsImpl (UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.2.0-preview.8/Editor/BurstAotCompiler.cs:332)
    12. Unity.Burst.Editor.BurstAotCompiler.OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.2.0-preview.8/Editor/BurstAotCompiler.cs:90)
    13. UnityEditor.Build.BuildPipelineInterfaces.OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport report) (at <8fdb511b120d4b249e3a836bb395bfee>:0)
    14. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    15.  
     
  2. brunocoimbra

    brunocoimbra

    Joined:
    Sep 2, 2015
    Posts:
    677
    In the error it is already telling what you need to do:

    Burst requires Visual Studio (installable via Add Component in the Unity Installer) & the C++ build tools for Visual Studio, along with the Windows 10 SDK in order to build a standalone player for Windows with X64_SSE4

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

    Opeth001

    Joined:
    Jan 28, 2017
    Posts:
    1,068
    i didnt get what i should install, i already installed modules required from the unity installer.

     
  4. brunocoimbra

    brunocoimbra

    Joined:
    Sep 2, 2015
    Posts:
    677
    You need to install Visual Studio with the C++ build tools, along with the Windows 10 SDK.

    In the Add Modules there is an option to install the Visual Studio, the other stuff (if not installed by default) you should install through the Visual Studio itself. upload_2019-11-6_16-13-2.png
     
  5. siggigg

    siggigg

    Joined:
    Apr 11, 2018
    Posts:
    247
    The option is in the Visual Studio installer, not Unity ;)
     
  6. Opeth001

    Opeth001

    Joined:
    Jan 28, 2017
    Posts:
    1,068
    im not using the Visual Studio but the JetBrains Rider.
    XD the most awesome thing on this is fixed it by commenting the [BurstCompile] Attribute on a new Job i created.


    Code (CSharp):
    1.  //[BurstCompile]
    2.     private struct ProcessReceivedMessagesJob : IJob
    3.     {
    4.         public DataStreamWriter ServerBuffer;
    5.         public ComponentDataFromEntity<MovementInput> MovementInputFromEntity;
    6.         public ComponentDataFromEntity<AimInput> AimInputFromEntity;
    7.         [ReadOnly] public NativeArray<Entity> AllPlayersEntities;
    8.  
    9.         public void Execute()
    10.         {
    11.             if (ServerBuffer.Length == 0)
    12.                 return;
    13.  
    14.  
    15.  
    16.             var streamReader = new DataStreamReader(ServerBuffer,0, ServerBuffer.Length);
    17.  
    18.             // Iterates over all Messages From Server
    19.             var readerCtx = default(DataStreamReader.Context);
    20.  
    21.             while (streamReader.GetBytesRead(ref readerCtx) < streamReader.Length)
    22.             {
    23.                 var messageId = streamReader.ReadByte(ref readerCtx);
    24.  
    25.                 switch (messageId)
    26.                 {
    27.                     // Set Inputs to All Concerned Players
    28.                     case MessageBufferIndexes.Server_PlayersJoySticksInputs:
    29.                         Debug.Log("Client:Players JoySticks Inputs Server Received ");
    30.                         var concernedPlayersMask = streamReader.ReadUInt(ref readerCtx);
    31.  
    32.                         for (var playerId = 0; playerId < 32; playerId++)
    33.                         {
    34.                             // Continue Player not int Message
    35.                             if (!NetworkingUtils.BitByIndex(concernedPlayersMask, playerId)) continue;
    36.                          
    37.                             var joystickInput = new JoystickInputs { };
    38.                             //Read Construct and set MovementInputs
    39.                             joystickInput.Deserialize(streamReader, ref readerCtx);
    40.                             MovementInputFromEntity[AllPlayersEntities[playerId]].FromJoystickInput(joystickInput);
    41.  
    42.                             //Read Construct and set AimInputs
    43.                             joystickInput.Deserialize(streamReader, ref readerCtx);
    44.                             AimInputFromEntity[AllPlayersEntities[playerId]].FromJoystickInput(joystickInput);
    45.                         }
    46.                         break;
    47.                      
    48.                     default:
    49.                         Debug.Log("Client: Oops Unknown Message");
    50.                         //TODO: Handle Unknown Messages From Server
    51.                         break;
    52.                 }
    53.             }
    54.  
    55.  
    56.             ServerBuffer.Clear();
    57.         }
    58.     }
    59.  
     
  7. Deleted User

    Deleted User

    Guest

    Well, that makes your job non burstable.
     
  8. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,626
    So your solution to getting burst to work in standalone build is turning burst off? :rolleyes:

    As your error quite plainly states burst requires c++ build tools. Technically I don't believe you need visual studios installed just the tools but it's easier if you just install it all.
     
    Opeth001 likes this.
  9. Opeth001

    Opeth001

    Joined:
    Jan 28, 2017
    Posts:
    1,068
    at the end i found out i forgot to comment the Debug.log lines and that's why the job cant be bursted, but the error shown had nothing to do with the build problem.
     
  10. Lee_Hammerton

    Lee_Hammerton

    Unity Technologies

    Joined:
    Jul 26, 2018
    Posts:
    111
    Oh, that is unfortunate, the error message should only be shown if we detect the pre-required components are missing at the start of compilation, not if there is an error during compilation. I`ll try and recreate that locally and log an issue.
     
    Evercloud, Opeth001 and Nothke like this.
  11. avi8111

    avi8111

    Joined:
    Sep 2, 2019
    Posts:
    2
    You have to use unity hub and install another new version of unity. I can't find other function could add moudules except this way
     
  12. Regretful123

    Regretful123

    Joined:
    Nov 5, 2014
    Posts:
    18
    I am running into this exact same problem. Visual Studio 2019 was installed separately from Unity Hub (As part of writing down Docker step by step instruction). Both C++ Development for Windows and Universal Platform tools were also manually installed separately. I'm already pulling my hair out trying to figure out what's the missing piece to bundle all of this together.

    Using Unity 2019.4.21f1
    Visual Studio 2019
    Windows 10 Enterprise
    Burst v1.4.8 (Since I cannot upgrade to a newer version of burst if Unity does not have xbox one or PS5 build target. )
    Already have both Desktop development with C++ and Universal Windows Platform Development installed from Visual Studio Installer.
     
    Neiist likes this.
  13. whidzee

    whidzee

    Joined:
    Nov 20, 2012
    Posts:
    161
    I was getting this error. Just want to share my findings. Everything was working well on a game i had made which i come back to every now and then to make small updates, I am using an older version of Unity that I don't want to upgrade due to possilby breaking my game. then i suddenly was getting this error when building. (as well as performance spikes from Vegetation Studio Pro)

    It turns out because I had installed a newer version of Visual Studio to work on a new game, as well as keeping the older one that was originally tied to my game, I was getting these performance issues and this burst error when building.

    I solved my problem by uninstalling the newer version of Visual Studio and things automatically improved. I couldn't believe it. anyway, just posting here in case someone else has the same error