Trying to compile UE5 from source, but fails

I have no idea what is wrong but the build process gets stuck on UnrealHeaderTool and fails with the following error:

D:\extranstudios\source\ue5\Engine\Source\Developer\DerivedDataCache\Private\DerivedDataCacheStoreHierarchy.cpp(740): error C2660: 'UE::DerivedData::MakeArrayView': function does not take 2 arguments

I’m using VS2022 on Windows 10.19044.1466 to compile the engine. I tried searching it up on Google, using a different version of Visual Studio. Nothing has worked.

If requested, I will send the build logs.

1 Like

I had the same issue and it appears to have been a naming conflict that existed related to the MakeArrayView function in HttpDerivedDataCacheStore.cpp. Applying the corrections included in commit 022ac14 resolved the issue for me. The MakeArrayView function and related references in the file were renamed to MakeConstArrayView.

If your task is to create a binary version of the engine from source, here are a few problems that may prevent you from doing it:

  1. If your sources are not from ue5-early-access branch, there may be problems with compilation and in general with work, the README says about it.
  2. Visual studio 2022 in general does not want to work with Unreal, I installed it already after the build, and when creating a project, the engine did not accept 2022 and suggested to install 2019.
  3. I use this .bat command, it’s parameterized, but I don’t think you have any trouble putting the right directories.
"%UE_SOURCE%/Engine/Build/BatchFiles/RunUAT.bat" BuildGraph -target="Make Installed Build Win64" -script="%UE_SOURCE%/Engine/Build/InstalledEngineBuild.xml" -clean -set:HostPlatformOnly=true -set:VS2019=true -set:WithClient=true -set:WithServer=true -set:WithDDC=false -set:BuildDir="%BUILD_DIR%"