Cannot compile converting from 4.4 to 4.6

I am moving our project to 4.6 and I’m getting the following error when trying to build:

1>LogWindows : error : Windows GetLastError: The operation completed successfully. (0)
1>Error : Failed to generate code for UE4Editor - error code: CrashOrAssert (3)
1>  UnrealHeaderTool failed for target 'UE4Editor' (platform: Win64, module info:     C:\dev\UnrealEngineClean\Engine\Intermediate\Build\Win64\UE4Editor\DebugGame\UnrealHeaderTool.manifest).
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command "..\..\Build\BatchFiles\Build.bat UE4Editor Win64 DebugGame" exited with code -1.
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

This happens after the initial ~34 actions for the core and instead seems to fail when moving on to the editor (full log here).

The error isn’t very helpful, almost looks like it is misinterpreting “The operation completed successfully” as an error.

I checked out 4.6 from Github. The only local changes appear to be the DLLs and such that are in the dependencies.

I saw it was crashing running the UHT with the following command line args:

UE4Editor "C:\dev\UnrealEngineClean\Engine\Intermediate\Build\Win64\UE4Editor\DebugGame\UnrealHeaderTool.manifest" -LogCmds="loginit warning, logexit warning, logdatabase error"

So I debugged that and got the following error:

ICU data directory was not discovered:
../../../Engine/Programs/UnrealHeaderTool/Content/Internationalization
../../../Engine/Content/Internationalization

Those directories don’t exist, do I have to re-download the dependencies when upgrading from 4.4 to 4.6?

Update

Downloaded the dependency files - both those directories are still empty and I get the same error.

Update 2

Pulled 4.6 branch clean (as opposed to merging into my current 4.4 branch) and I get the same problem.

Update 3

After reading this from the release notes on 4.6

  • ICU data has been relocated from Content/Localization to Content/Internationalization.

I tried copying the contents of Engine/Content/Localization/ to Engine/Content/Internationalization/ (both just the ICU folder and all the folders). Although it could now find the directory, it fails lower down in the method

I18N->DefaultCulture = FindOrMakeCulture(FPlatformMisc::GetDefaultLocale(), true);

The FindOrMakeCulture returns NULL for both the DefaultCulture and the InvariantCulture.

I realise the dependencies I’ve been downloading are from the 4.5 release but the 4.6 release doesn’t have the dependencies attached so I assume they are the same.

I would really appreciate some help in fixing this as this was only meant to be a one day task and I haven’t even got to whether it works with our project!

This appears to have been fixed by moving Engine/Content/Localization/ICU/… to Engine/Content/Internationalization/ which appears to have got past that step, will post an answer once confirmed.

Please keep updating… I just encountered the same issue.

You need to run Setup.bat (it is a replacement to the dependency files), glad I’m not the only one who didn’t re-read the instructions! That fixed the engine compiling for me, I’ll post it as an answer later.

I realise this problem and others were caused by failing to run the new (to UE4.6) Setup.bat as described here.

It might have been nice if it had also been on release notes as I don’t tend to go to the Github release page, I just pull the branch on my client.