Download

Unreal Fails to Build on Linux

Hey All,

I am attempting to build UE4 from source on my Ubuntu 16.04 box. I keep getting this issue:

drcrook@BigBen:~/projects/UE4/UnrealEngine$ sudo make
bash “/home/drcrook/projects/UE4/UnrealEngine/Engine/Build/BatchFiles/Linux/Build.sh” CrashReportClient Linux Shipping
Building CrashReportClient…
Using clang version ‘3.8.0’ (string), 3 (major), 8 (minor), 0 (patch)
Creating makefile for CrashReportClient (no existing makefile)
Performing full C++ include scan (no include cache file)
Building UnrealHeaderTool…
Using clang version ‘3.8.0’ (string), 3 (major), 8 (minor), 0 (patch)
Target is up to date
Parsing headers for CrashReportClient
Running UnrealHeaderTool CrashReportClient “/home/drcrook/projects/UE4/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/CrashReportClient/Shipping/CrashReportClient.uhtmanifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -NoEnginePlugins
Refusing to run with the root privileges.
Error: Failed to generate code for CrashReportClient - error code: CrashOrAssert (3)
UnrealHeaderTool failed for target ‘CrashReportClient’ (platform: Linux, module info: /home/drcrook/projects/UE4/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/CrashReportClient/Shipping/CrashReportClient.uhtmanifest).
Makefile:252: recipe for target ‘CrashReportClient-Linux-Shipping’ failed
make: *** [CrashReportClient-Linux-Shipping] Error 3

Any insights? I am following these instructions: https://wiki.unrealengine.com/Building_On_Linux

Thanks!

I believe it’s because you are compiling it as root (you used the sudo command). Don’t use sudo just run make

Similar problem in Ubuntu 20.04

$ uname -a
Linux alexandr-Aspire-V5-571G 5.4.0-29-generic #33-Ubuntu SMP Wed Apr 29 14:32:27 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

UnrealEngine$ make
bash “/home/alexandr/working/UnrealEngine/Engine/Build/BatchFiles/Linux/Build.sh” CrashReportClient Linux Shipping
Fixing inconsistent case in filenames.
Setting up Mono
Building CrashReportClient…
Using ‘git status’ to determine working set for adaptive non-unity build (/home/alexandr/working/UnrealEngine).
Creating makefile for CrashReportClient (no existing makefile)
ERROR: Platform Linux is not a valid platform to build. Check that the SDK is installed properly.
make: *** [Makefile:302: CrashReportClient-Linux-Shipping] Ошибка 6

SIMILAR PROBLEM HERE



user@machine:~/Repository/UnrealEngine$ make
bash "/home/user/Repository/UnrealEngine/Engine/Build/BatchFiles/Linux/Build.sh" CrashReportClient Linux Shipping
Fixing inconsistent case in filenames.
Setting up Mono
Building CrashReportClient...
Using 'git status' to determine working set for adaptive non-unity build (/home/user/Repository/UnrealEngine).
Creating makefile for CrashReportClient (no existing makefile)
ERROR: Platform Linux is not a valid platform to build. Check that the SDK is installed properly.
Makefile:302: recipe for target 'CrashReportClient-Linux-Shipping' failed
make: *** [CrashReportClient-Linux-Shipping] Error 6


Hi, did anyone found a solution to this problem?

Hi, I think i managed to fix it (busy compiling so we will have to see)

First I navigated to /home/UnrealEngine

I ran



./Setup.sh


then



./GenerateProjectFiles.sh


The first on takes rather quick, the second one a few mins

finally I ran **WITHOUT **sudo



make UE4Editor UE4Game UnrealPak CrashReportClient ShaderCompileWorker UnrealLightmass


every time i tried to use a make command as sudo, I would get error reports. For now it seems to be compiling

Fedora seems to have changed recently, you now login as superuser using sudo!

I don’t know if I am late, what I did was, I changed the owner of my directory from root to my user account

Detailed Steps

At first, go to your the directory, where Unreal Engine 4 is present and it is not advised to use “su”

In my case, it was (For the sake of privacy, I am putting my user name as user)


**cd /home/user/Downloads/**

Then use ls -l to show who owns the directory
in my case, I will get


**ls -l**

The output I got was

xxxxx l root root (then date,then time) UnrealEngine

Now change the owner to your user account. in my case it was user,


**sudo chown -R user:user UnrealEngine**

Now type ls -l to verify that root was replaced by your user name


**ls -l**

The output i got was

xxxxx l user user (then date,then time) UnrealEngine

Now type ./Setup.sh


**./Setup.sh**

since I have already downloaded the file, I pressed “no” when I got

Would you like to override your changes? n

Now Type


**./GenerateProjectFiles.sh**

Then,


**make**

Now it will be compiled successfully