Unreal Engine Compiler Error

Hi all,

I am following the tutorial Building and Hosting an Unreal Engine Dedicated Server with AWS and Docker | by Luke Brady | The Startup | Medium on how to build an Unreal Engine dedicated server.
I am currently trying to build bare Unreal Engine in Visual Studio. I cloned the git repo and started the build process. I am getting the following error:


13>Using 'git status' to determine working set for adaptive non-unity build (E:\Stuff\Projects\UE4\UnrealEngine).
13>Parsing headers for LiveCodingConsole
13> Running UnrealHeaderTool LiveCodingConsole "E:\Stuff\Projects\UE4\UnrealEngine\Engine\Intermediate\Build\Win64\LiveCodingConsole\Development\LiveCodingConsole.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -abslog="E:\Stuff\Projects\UE4\UnrealEngine\Engine\Programs\UnrealBuildTool\Log_UHT.txt"
13>Reflection code generated for LiveCodingConsole in 1,2327669 seconds
13>Building LiveCodingConsole...
13>Using Visual Studio 2019 14.26.28806 toolchain (D:\Tools\Visual Studio 2019 Community\VC\Tools\MSVC\14.26.28801) and Windows 10.0.18362.0 SDK (C:\Program Files (x86)\Windows Kits\10).
13>Building 3 actions with 12 processes...
13> [1/3] Module.LiveCodingConsole.cpp
13>E:\Stuff\Projects\UE4\UnrealEngine\Engine\Source\Runtime\Core\Public\Modules/ModuleManager.h(309): error C2440: 'static_cast': cannot convert from 'IModuleInterface' to 'TModuleInterface &'
13> with
13> 
13> TModuleInterface=ILiveCodingServer
13> ]
13> E:\Stuff\Projects\UE4\UnrealEngine\Engine\Source\Runtime\Core\Public\Modules/ModuleManager.h(309): note: static_cast and safe_cast to reference can only be used for valid initializations or for lvalue casts between related classes
13> E:/Stuff/Projects/UE4/UnrealEngine/Engine/Source/Programs/LiveCodingConsole/Private/LiveCodingConsole.cpp(472): note: see reference to function template instantiation 'TModuleInterface &FModuleManager::LoadModuleChecked<ILiveCodingServer>(const FName)' being compiled
13> with
13> 
13> TModuleInterface=ILiveCodingServer
13> ]
13>D:\Tools\Visual Studio 2019 Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(46,5): error MSB3073: The command "chcp 65001 >NUL && ..\..\Build\BatchFiles\Build.bat LiveCodingConsole Win64 Development -WaitMutex -FromMsBuild" exited with code 6.
13>Done building project "LiveCodingConsole.vcxproj" -- FAILED.

I am not too experienced in compiling stuff, so I don’t know if this is actually an issue.

D:\Tools\Visual Studio 2019 Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(46,5): error MSB3073: The command “chcp 65001 >NUL && …\Build\BatchFiles\Build.bat LiveCodingConsole Win64 Development -WaitMutex -FromMsBuild” exited with code 6.
Looks like the build will fail.

Any comments?

Unfortunately, this stuff runs for hours on my machine.
Can I somehow only compile certain modules or do I always have to build the whole project?

Thanks
Nico

Hi guys,

sooo, I did just manage to compile UE4.25.3! YAY!

What I did wrong was cloning the actual head of the github project. Changing to the 4.25.3 release fixed the error above.
Then I had multiple heap space errors. I resolved these by increasing the size of my page file to 4096 MB/10240 MB (https://www.thewindowsclub.com/increase-page-file-size-virtual-memory-windows). Don’t forget to restart afterwards.

I also had Windows restarting due to installing updates during compilation which corrupted my build and I had to do a full rebuild.

My build took ~7 hours which is probably due to me using a slow but big hard drive for it. My SSDs are full of games. :slight_smile:
https://forums.unrealengine.com/core/image/gif;base64

Probably went through most of the possible things that can happen there.

However, there she is:

Also, the first start of the editor took some minutes to finish (stuck at 45%). This is due to the fact that UE precomiles some shaders there. So, just wait, it will eventually start up.

I just thought this might help some people.

Thanks
Nico