Error building engine with Automation Tool: BUILD FAILED: failed, retries not enabled:

Hi everyone!
I try to build UE4.23 from source with the Automation Tools and a the InstalledEngineBuild.xml and just can’t get it work.
There are a lot of suggestions to be found on the internet but nothing worked so far.

Plus, the log doesn’t show much about where things go wrong.

My setup is:

  • Windows 10
  • VS2017 (+VS2019) installed.
  • I installed C++ development, Game Development with C++ etc. as packages (as described in the UE4 documentation about setting up Visual Studio)
  • building for consoles (PS4, Xbox One, and Switch) as well.

I actually was able to build the source in VS2019 some time ago, but can’t it it running with Automation Tools to build a version i can share with my teammates.

Attached the individual logs + InstalledEngineBuild.xml as zip file - in case that helps

Here’s what the main log.txt says at the end:
Program.Main: BUILD FAILED: failed, retries not enabled:
Program.Main: UE4BuildException: BUILD FAILED: failed, retries not enabled:
Program.Main: bei AutomationTool.UE4Build.BuildParallelTargets(List1 ParallelTargets, Boolean InShowProgress, String XGETool, Dictionary2 InTargetToManifest) in E:\Sourcecodes\UnrealEngine 4.23\Engine\Source\Programs\AutomationTool\AutomationUtils\UE4Build.cs:Zeile 1163.
Program.Main: bei AutomationTool.UE4Build.Build(BuildAgenda Agenda, Nullable1 InDeleteBuildProducts, Boolean InUpdateVersionFiles, Boolean InForceNoXGE, Boolean InUseParallelExecutor, Boolean InShowProgress, Nullable1 InChangelistNumberOverride, Dictionary2 InTargetToManifest) in E:\Sourcecodes\UnrealEngine 4.23\Engine\Source\Programs\AutomationTool\AutomationUtils\UE4Build.cs:Zeile 1115. Program.Main: bei AutomationTool.CompileTaskExecutor.Execute(JobContext Job, HashSet1 BuildProducts, Dictionary2 TagNameToFileSet) in E:\Sourcecodes\UnrealEngine 4.23\Engine\Source\Programs\AutomationTool\BuildGraph\Tasks\CompileTask.cs:Zeile 166. Program.Main: bei AutomationTool.Node.Build(JobContext Job, Dictionary2 TagNameToFileSet) in E:\Sourcecodes\UnrealEngine 4.23\Engine\Source\Programs\AutomationTool\BuildGraph\Node.cs:Zeile 202.
Program.Main: bei AutomationTool.BuildGraph.BuildNode(JobContext Job, Graph Graph, Node Node, TempStorage Storage, Boolean bWithBanner) in E:\Sourcecodes\UnrealEngine 4.23\Engine\Source\Programs\AutomationTool\BuildGraph\BuildGraph.cs:Zeile 698.
Program.Main: bei AutomationTool.BuildGraph.BuildAllNodes(JobContext Job, Graph Graph, TempStorage Storage) in E:\Sourcecodes\UnrealEngine 4.23\Engine\Source\Programs\AutomationTool\BuildGraph\BuildGraph.cs:Zeile 627.
Program.Main: bei AutomationTool.BuildGraph.Execute() in E:\Sourcecodes\UnrealEngine 4.23\Engine\Source\Programs\AutomationTool\BuildGraph\BuildGraph.cs:Zeile 433.
Program.Main: bei AutomationTool.Automation.Execute(List1 CommandsToExecute, Dictionary2 Commands) in E:\Sourcecodes\UnrealEngine 4.23\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:Zeile 551.
Program.Main: bei AutomationTool.Automation.Process(String] Arguments, StartupTraceListener StartupListener) in E:\Sourcecodes\UnrealEngine 4.23\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:Zeile 521.
Program.Main: bei AutomationTool.Program.MainProc(String] Arguments, StartupTraceListener StartupListener) in E:\Sourcecodes\UnrealEngine 4.23\Engine\Source\Programs\AutomationTool\Program.cs:Zeile 176.
Program.Main: bei AutomationTool.Program.<>c__DisplayClass1_0.<Main>b__2() in E:\Sourcecodes\UnrealEngine 4.23\Engine\Source\Programs\AutomationTool\Program.cs:Zeile 88.
Program.Main: bei AutomationTool.InternalUtils.RunSingleInstance(Func`1 Main) in E:\Sourcecodes\UnrealEngine 4.23\Engine\Source\Programs\AutomationTool\AutomationUtils\Utils.cs:Zeile 725.
Program.Main: bei AutomationTool.Program.Main(String] Arguments) in E:\Sourcecodes\UnrealEngine 4.23\Engine\Source\Programs\AutomationTool\Program.cs:Zeile 88. data: EpicGames.Context = (“while executing <Compile Target=“UE4Game” Configuration=“DebugGame” Platform=“PS4” Arguments=”-precompile -allmodules -nolink -nodebuginfo" AllowXGE=“True” AllowParallelExecutor=“True” Tag="#UE4Game PS4" />", “while executing <Compile Target=“UE4Game” Configuration=“DebugGame” Platform=“PS4” Arguments=”-precompile -nodebuginfo" AllowXGE=“True” AllowParallelExecutor=“True” Clean=“False” Tag="#UE4Game PS4" />", “while executing <Compile Target=“UE4Game” Configuration=“Development” Platform=“PS4” Arguments=”-precompile -allmodules -nolink -nodebuginfo" AllowXGE=“True” AllowParallelExecutor=“True” Tag="#UE4Game PS4" />", “while executing <Compile Target=“UE4Game” Configuration=“Development” Platform=“PS4” Arguments=”-precompile -nodebuginfo" AllowXGE=“True” AllowParallelExecutor=“True” Clean=“False” Tag="#UE4Game PS4" />", “while executing <Compile Target=“UE4Game” Configuration=“Shipping” Platform=“PS4” Arguments=”-precompile -allmodules -nolink -nodebuginfo" AllowXGE=“True” AllowParallelExecutor=“True” Tag="#UE4Game PS4" />", “while executing <Compile Target=“UE4Game” Configuration=“Shipping” Platform=“PS4” Arguments=”-precompile -nodebuginfo" AllowXGE=“True” AllowParallelExecutor=“True” Clean=“False” Tag="#UE4Game PS4" />", “at Engine\Build\InstalledEngineBuild.xml(322)”)
Program.Main: AutomationTool exiting with ExitCode=1 (Error_Unknown)

Is there anything obvious I’m missing?

Thanks in advance! - If there’s anything else you’d need me to post, please let me know.

This old topic is STILL relevant.

Hyper graveyard bump, because I just ran into this same issue, and it took our very small team a month to fix and to work with Microsoft on a regulated way, here’s my Buildgraph line:

.\Engine\Build\BatchFiles\RunUAT.bat BuildGraph -target=“Make Installed Build Win64” -script=‘Engine/Build/InstalledEngineBuild.xml’ -set:WithWin64=True -set:WithLinux=True -set:WithAndroid=False -set:WithClient=True -set:WithServer=True -set:WithHoloLens=False -set:WithDDC=True -set:EmbedSrcSrvInfo=True -set:WithFullDebugInfo=True -set:VS2019=True > buildlog.txt

Now I am using a similar setup, but I’ve not installed the SDKs or the build toolchain direclty to the host. I’m using AutoSDK, which means UE_SDKS_ROOT is set to my AutoSDK path which is mounted to drive letter X: from my Business GSuite Google Drive using rsync/rbind, and I’ve followed the README.md instructions to copy SDK files to my business cloud. AutoSDK lets you build it headless and source the cloud, which is really nice for C0/CI pipelines (you could even rsync an S3 bucket from AWS, if you’re that well off). But anyway…

UnrealBuildTool is able to recognize their existence, so this issue is definitely independent of AutoSDK as a side note. It seems to be more relevant to something that’s gone wrong with C++/CLI build tools Windows SDK and msbuild missing licensing files from Microsoft, and has irked me because rolling back didn’t fix that. This led me into a deep dive into source code to found what’s gone on in source ranges, and that’s unfortunately been fruitless.

My solution was to re-install Visual Studio (counter-intuitive to AutoSDK…), re-copy the SDK files after logging into the IDE with my Microsoft Account once, and then it was fixed. Unfortunetly, the build toolchains need some sort of licensing to be in place on the machine. The error is either related to your system clock being behind or language not being set, or an authentication error which blocks the import of anything SDK related if you have not logged in and authenticated to Microsoft’s servers.

What I had noticed that this issue occoured in my buildlog, upon the first try to important anything from the MSVC build toolchain. Starting UE4/UE5.sln in visual studio and then logging into your Microsoft account should fix it. Use the “Visual Studio 2019 Developer Command Prompt” to pull in the correct environment to kick off the build.

Unfortunetly, Microsoft is forcing us off the ability to do command-line only buildgraph builds via this authentication error. If you want truly unattended installation, you’ll have to perform advanced injection of your Microsoft login account information to Visual Studio’s portion of the registry to avert “retries failed”.

I cannot for legal (Microsoft and Epic Games-related EULA) reasons release how my business does it as I am working with AutoSDK that demands that legal restriction on sharing this type of licensing file injection publicly. That is proprietary to Microsoft and the provided documentation actively discourages sharing that.

But for smaller businesses, you can avoid AutoSDK in the cloud and the legal licensing headache and just re-authenticate your Microsoft Account with the IDE open, verify your system clock settings are synced and correct, and make sure to use the developer command prompt to produce installed builds.

This error is very much related to Microsoft being who they are, and blocking unauthorized users from using the MSVC build tools.

Unfortunetly, because of a regression in LLVM (Clang-ci) for windows as it relates to use of the Windows SDK for versions >2012, in December of 2020, that produces an unrecognized command line option /Zi error related to debugging symbols even if you disable them completely (the appeal of a source build is the debugging symbols and memory profiler to optimize your games professionally), we’re forced to do it the Microsoft way, and don’t have a GNU/GPL friendly clang alternative on the build host at present, and have to use msbuild and that involves authentication with Microsoft and sync up of your system clock to avoid “retries failed:” problems.

Until the clang compiler developers get with Microsoft to address the error or find it a workaround because of missing templates in the header files that refuse to inject without proper licensing intact, this is what it be for using the Windows SDK.