UnrealBuildTool always fails for Windows32 platform

Trying to package any code to Windows32 fails. I mean any code because it can be either a Blueprint project with an installed plugin (like Substance) or a project with any C++ in it.

I’ve uninstalled VS 2015 and am using VS 2017. I don’t remember if it was working with VS 2015 on UE 4.15, but Windows (64-bit) packages fine.

Reproduction Steps

  • Create a new project on Unreal Engine 4.15.2
  • If it’s a Blueprint project: add a C++ class or activate any installed plugin with code (like Substance). The C++ class can be anything, even the None template.
  • Try to package with File > Package Project > Windows > Windows (32-bit)

Logs

Messages on the Output Log (removed UATHelper: Packaging (Windows (32-bit)): for clearance)

Running AutomationTool...
Automation.ParseCommandLine: Parsing command line: -ScriptsForProject="A:/Libraries/Documents/Dev/Unreal Projects/Winx86Test/Winx86Test.uproject" BuildCookRun -nocompile -nocompileeditor -installed -nop4 -project="A:/Libraries/Documents/Dev/Unreal Projects/Winx86Test/Winx86Test.uproject" -cook -stage -archive -archive
directory="A:/Libraries/Documents/Dev/Unreal Projects/Winx86Test/Package" -package -clientconfig=Development -ue4exe=UE4Editor-Cmd.exe -pak -prereqs -nodebuginfo -targetplatform=Win32 -build -CrashReporter -utf8output
Automation.Process: Setting up command environment.
BuildCookRun.SetupParams: Setting up ProjectParams for A:\Libraries\Documents\Dev\Unreal Projects\Winx86Test\Winx86Test.uproject
Project.Build: ********** BUILD COMMAND STARTED **********
CommandUtils.Run: Run: C:\Program Files\Epic Games\4.15\Engine\Binaries\DotNET\UnrealBuildTool.exe Winx86Test Win32 Development -Project="A:\Libraries\Documents\Dev\Unreal Projects\Winx86Test\Winx86Test.uproject"  "A:\Libraries\Documents\Dev\Unreal Projects\Winx86Test\Winx86Test.uproject"  -remoteini="A:\Libraries\Doc
uments\Dev\Unreal Projects\Winx86Test" -noxge -generatemanifest -NoHotReload
LogSlate: Took 0.000180 seconds to synchronously load lazily loaded font '../../../Engine/Content/Editor/Slate/Fonts/DroidSansMono.ttf' (77K)
UnrealBuildTool: Performing full C++ include scan (building a new target)
CommandUtils.Run: Run: Took 1.4581824s to run UnrealBuildTool.exe, ExitCode=0
CommandUtils.Run: Run: C:\Program Files\Epic Games\4.15\Engine\Binaries\DotNET\UnrealBuildTool.exe Winx86Test Win32 Development -Project="A:\Libraries\Documents\Dev\Unreal Projects\Winx86Test\Winx86Test.uproject"  "A:\Libraries\Documents\Dev\Unreal Projects\Winx86Test\Winx86Test.uproject"  -remoteini="A:\Libraries\Doc
uments\Dev\Unreal Projects\Winx86Test" -noxge -NoHotReload -ignorejunk
UnrealBuildTool: Creating makefile for Winx86Test (no existing makefile)
UnrealBuildTool: Performing full C++ include scan (no include cache file)
UnrealBuildTool: Performing 6 actions (4 in parallel)
UnrealBuildTool: ERROR: UBT ERROR: Failed to produce item: A:\Libraries\Documents\Dev\Unreal Projects\Winx86Test\Binaries\Win32\Winx86Test.exe
UnrealBuildTool: Total build time: 6.69 seconds (Local executor: 0.00 seconds)
CommandUtils.Run: Run: Took 7.1158917s to run UnrealBuildTool.exe, ExitCode=5
Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.CommandUtils+CommandFailedException: Command failed (Result:5): C:\Program Files\Epic Games\4.15\Engine\Binaries\DotNET\UnrealBuildTool.exe Winx86Test Win32 Development -Project="A:\Libraries\Documents\Dev\Unreal Projects\Winx86Test\Winx86Te
st.uproject"  "A:\Libraries\Documents\Dev\Unreal Projects\Winx86Test\Winx86Test.uproject"  -remoteini="A:\Libraries\Documents\Dev\Unreal Projects\Winx86Test" -noxge -NoHotReload -ignorejunk. See logfile for details: 'UnrealBuildTool-2017.05.21-20.46.21.txt' 
    at AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary`2 EnvVars, SpewFilterCallbackType SpewFilterCallback)
    at AutomationTool.CommandUtils.RunAndLog(CommandEnvironment Env, String App, String CommandLine, String LogName, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary`2 EnvVars, SpewFilterCallbackType SpewFilterCallback)
    at AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, String CommandLine, String LogName, Dictionary`2 EnvVars)
    at AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, FileReference Project, String Target, String Platform, String Config, String AdditionalArgs, String LogName, Dictionary`2 EnvVars)
    at AutomationTool.UE4Build.BuildWithUBT(String TargetName, UnrealTargetPlatform TargetPlatform, String Config, FileReference UprojectPath, Boolean ForceMonolithic, Boolean ForceNonUnity, Boolean ForceDebugInfo, Boolean ForceFlushMac, Boolean DisableXGE, String InAddArgs, Boolean ForceUnity, Dictionary`2 EnvVars)
    at AutomationTool.UE4Build.Build(BuildAgenda Agenda, Nullable`1 InDeleteBuildProducts, Boolean InUpdateVersionFiles, Boolean InForceNoXGE, Boolean InUseParallelExecutor, Boolean InForceNonUnity, Boolean InForceUnity, Boolean InShowProgress, Dictionary`2 PlatformEnvVars, Nullable`1 InChangelistNumberOverride, Dictio
nary`2 InTargetToManifest)
    at Project.Build(BuildCommand Command, ProjectParams Params, Int32 WorkingCL, ProjectBuildTargets TargetMask)
    at BuildCookRun.DoBuildCookRun(ProjectParams Params)
    at BuildCookRun.ExecuteBuild()
    at AutomationTool.BuildCommand.Execute()
    at AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)
    at AutomationTool.Automation.Process(String[] Arguments)
    at AutomationTool.Program.MainProc(Object Param)
    at AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param)
    at AutomationTool.Program.Main()
Program.Main: AutomationTool exiting with ExitCode=5 (5)
BUILD FAILED
PackagingResults:Error: Error Unknown Error

UnrealBuildTool-2017.05.21-20.46.21.txt:

Creating makefile for Winx86Test (no existing makefile)
Performing full C++ include scan (no include cache file)
Performing 6 actions (4 in parallel)
ERROR: UBT ERROR: Failed to produce item: A:\Libraries\Documents\Dev\Unreal Projects\Winx86Test\Binaries\Win32\Winx86Test.exe
Total build time: 6.69 seconds (Local executor: 0.00 seconds)

Hello RVillani,

I understand that you posted this issue quite a while ago, but are you still experiencing this issue? If so, I’ll be happy to investigate it with you. It does seem related to Visual Studio which could be part of your 2017 installation options but could also likely be remedied by having 2015 installed, even if you’re using 2017. If Win32 isn’t supported by 2017 (which I haven’t looked into yet) it would at least be able to use the 2015 toolchain to compile when necessary.

1 Like

Wow! I’ve just seen this comment now!

Thanks for your time, Matthew! I’m afraid to re-install 2015 because VS setup tends to mess things up quite easily, so I won’t test it anytime soon. What I will test if one day I need to compile for Win32 again is changing the toolchain setting for the project. Do you think that could make a difference?

1 Like

That could make a difference, as long as you do still have the 2015 toolchain installed.

1 Like

Hello RVillani,

I just wanted to check in and see if you were still having trouble with this issue. I tried packaging a Win32 project that uses VS 2017, and it packaged successfully. Unfortunately I do still have VS 2015 installed on my computer, so I do not exactly match your use case.

1 Like

Hello RVillani,

We have not heard back from you for a while. Do you still need help with this issue? I will be marking this post as resolved for internal tracking purposes, but please feel free to add a comment and re-open this post if you need any additional assistance.

1 Like