Download

[BUG?] Trouble with UnrealBuildTool on Linux, and the solution

I’m migrating my C++ projects from UE 4.26 to UE 5.0.0. I’ve successfully built the engine, and new project files.
When I compile the project’s C++ code in the Editor, it works perfectly; but when I run make MyProjectEditor, I get this error:

bash "/home/user/UnrealEngine/Engine/Build/BatchFiles/Linux/RunMono.sh" "/home/user/UnrealEngine/Engine/Binaries/DotNET/UnrealBuildTool.exe" MyProjectEditor Linux Development  -project="/home/user/Unreal Projects/MyProject/MyProject.uproject" 

Running Mono...

Fixing inconsistent case in filenames.
Setting up Mono
~/UnrealEngine/Engine ~/Unreal Projects/MyProject
Cannot open assembly '/home/user/UnrealEngine/Engine/Binaries/DotNET/UnrealBuildTool.exe': No such file or directory.
make: *** [Makefile:325: MyProjectEditor] Error 2

Looking into this, I see that UnrealBuildTool.exe was used with UE4 but not UE5, and I’ve noticed that with UE5, UnrealBuildTool is natively built for Linux, so Mono isn’t needed.


My Solution

So, my “solution” is to go to the project’s Makefile, and replace

PROJECTBUILD = bash "$(UNREALROOTPATH)/Engine/Build/BatchFiles/Linux/RunMono.sh" "$(UNREALROOTPATH)/Engine/Binaries/DotNET/UnrealBuildTool.exe"

with

PROJECTBUILD = $(BUILD)
That makes it use Engine/Build/BatchFiles/Linux/Build.sh, which is a wrapper around UnrealBuildTool.

I don’t know what the consequences are for this, I just know it seems to work.


My question is, has the UE team forgotten to update how Makefiles are generated for UE5?

Hope this helps anyone else who faces this problem.