# Unreal Fails to Build on Linux

**URL:** <https://forums.unrealengine.com/t/unreal-fails-to-build-on-linux/77732>\
**Category:** Platform & Builds\
**Tags:** Linux, unreal-engine\
**Created:** [November 6, 2016, 4:38pm UTC](https://forums.unrealengine.com/t/unreal-fails-to-build-on-linux/77732 "2016-11-06T16:38:04Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_f45f3649](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f45f3649](https://forums.unrealengine.com/u/anonymous_user_f45f3649)\
**Post date:** [November 6, 2016, 4:38pm UTC](https://forums.unrealengine.com/t/unreal-fails-to-build-on-linux/77732/1 "2016-11-06T16:38:04Z")

</div>

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: [A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums](https://wiki.unrealengine.com/Building_On_Linux)

Thanks!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_dc789324](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_dc789324](https://forums.unrealengine.com/u/anonymous_user_dc789324)\
**Post date:** [May 19, 2020, 3:27am UTC](https://forums.unrealengine.com/t/unreal-fails-to-build-on-linux/77732/2 "2020-05-19T03:27:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kwagongowl](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kwagongowl/32/971594_2.png) [@kwagongowl](https://forums.unrealengine.com/u/kwagongowl)\
**Post date:** [June 6, 2020, 10:21pm UTC](https://forums.unrealengine.com/t/unreal-fails-to-build-on-linux/77732/4 "2020-06-06T22:21:44Z")

</div>

SIMILAR PROBLEM HERE

```auto

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

```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_da45df39](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_da45df39](https://forums.unrealengine.com/u/anonymous_user_da45df39)\
**Post date:** [July 15, 2020, 10:13am UTC](https://forums.unrealengine.com/t/unreal-fails-to-build-on-linux/77732/5 "2020-07-15T10:13:19Z")

</div>

Hi, did anyone found a solution to this problem?

---

<div class="post-metadata">

**Author:** ![anon54403118](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon54403118](https://forums.unrealengine.com/u/anon54403118)\
**Post date:** [July 15, 2020, 12:36pm UTC](https://forums.unrealengine.com/t/unreal-fails-to-build-on-linux/77732/6 "2020-07-15T12:36:50Z")

</div>

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

First I navigated to /home/UnrealEngine

I ran

```auto

./Setup.sh

```

then

```auto

./GenerateProjectFiles.sh

```

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

finally I ran \*\*WITHOUT \*\*sudo

```auto

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

---

<div class="post-metadata">

**Author:** ![ThPrsnr6](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ThPrsnr6](https://forums.unrealengine.com/u/ThPrsnr6)\
**Post date:** [September 24, 2020, 2:54pm UTC](https://forums.unrealengine.com/t/unreal-fails-to-build-on-linux/77732/7 "2020-09-24T14:54:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![JJC1492](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JJC1492](https://forums.unrealengine.com/u/JJC1492)\
**Post date:** [October 24, 2020, 5:25am UTC](https://forums.unrealengine.com/t/unreal-fails-to-build-on-linux/77732/8 "2020-10-24T05:25:35Z")

</div>

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)

```auto

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

```

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

```auto

**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,

```auto

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

```

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

```auto

**ls -l**

```

The output i got was

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

Now type ./Setup.sh

```auto

**./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

```auto

**./GenerateProjectFiles.sh**

```

Then,

```auto

**make**

```

Now it will be compiled successfully

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_9725d89e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_9725d89e](https://forums.unrealengine.com/u/anonymous_user_9725d89e)\
**Post date:** [October 13, 2021, 3:42am UTC](https://forums.unrealengine.com/t/unreal-fails-to-build-on-linux/77732/9 "2021-10-13T03:42:18Z")

</div>

i followed all the advice listed earlier in this thread, but unfortunately i am completely unable to compile UE4.27 on kubuntu-20.04…

i went through the  
./Setup.sh  
./GenerateProjectFiles.sh  
make

processes several times, each time i would get lots of non-fatal errors until the compilation process just froze or crashed.  
it seems like several of the files just wouldn’t compile at all, advising me to include files from /tmp in the bugreport to [bugs.llvm.org](http://bugs.llvm.org)

however, now i get even less far in the compilation attempt :

i can’t even make it to the  
make UE4Editor UE4Game UnrealPak CrashReportClient ShaderCompileWorker UnrealLightmass  
command.

rene@sparrow:~/data1/unrealEngine/zip/UnrealEngine-4.27.0-release$ ./Setup.sh  
Fixing inconsistent case in filenames.  
Setting up Mono  
Checking dependencies…  
The following file(s) have been modified:  
Engine/Binaries/ThirdParty/Mono/Linux/etc/mono/registry/last-btime  
Would you like to overwrite your changes (y/n)? y  
Updating dependencies: 100% (1/1), 0.6 MiB cached, done.  
Result: 0  
Register the engine installation…  
Installing a bundled clang toolchain  
Toolchain already installed skipping.

Target arch set to: x86\_64-unknown-linux-gnu  
Building ThirdParty libraries

If you don’t see SUCCESS message in the end, then building did not finish properly.  
In that case, take a look into /home/rene/data1/unrealEngine/zip/UnrealEngine-4.27.0-release/Engine/Build/BatchFiles/Linux/BuildThirdParty.log for details.

No third party libs needed to be built locally

\*\*\*\*\*\*\*\*\*\* SUCCESS \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
Setup successful.  
rene@sparrow:~/data1/unrealEngine/zip/UnrealEngine-4.27.0-release$ ./GenerateProjectFiles.sh  
Attempting to set up UE4 pretty printers for gdb (existing UE4Printers.py, if any, will be overwritten)…  
updated UE4Printers.py  
found necessary entries in ~/.gdbinit file, not changing it.

Setting up Unreal Engine 4 project files…

Fixing inconsistent case in filenames.  
Setting up Mono  
Generating data for project indexing… 100%  
Generating data for project indexing… 0%Stacktrace:

/proc/self/maps:  
00400000-00811000 r-xp 00000000 08:02 23200930 /home/rene/data1/unrealEngine/zip/UnrealEngine-4.27.0-release/Engine/Binaries/ThirdParty/Mono/Linux/bin/mono  
00a10000-00a1c000 rw-p 00410000 08:02 23200930 /home/rene/data1/unrealEngine/zip/UnrealEngine-4.27.0-release/Engine/Binaries/ThirdParty/Mono/Linux/bin/mono  
00a1c000-00a33000 rw-p 00000000 00:00 0  
019c9000-027f6000 rw-p 00000000 00:00 0 [heap]  
404c8000-4079d000 rwxp 00000000 00:00 0  
41589000-41599000 rwxp 00000000 00:00 0  
7fc00fc00000-7fc00fd00000 rw-p 00000000 00:00 0  
7fc00fe00000-7fc00ff00000 rw-p 00000000 00:00 0  
7fc010000000-7fc010100000 rw-p 00000000 00:00 0  
7fc010200000-7fc010300000 rw-p 00000000 00:00 0  
7fc010400000-7fc010500000 rw-p 00000000 00:00 0  
7fc010600000-7fc010700000 rw-p 00000000 00:00 0  
7fc010800000-7fc010900000 rw-p 00000000 00:00 0  
7fc010a00000-7fc010b00000 rw-p 00000000 00:00 0  
7fc010c00000-7fc010d00000 rw-p 00000000 00:00 0  
7fc010e00000-7fc010f00000 rw-p 00000000 00:00 0  
7fc011000000-7fc011100000 rw-p 00000000 00:00 0  
7fc011200000-7fc011300000 rw-p 00000000 00:00 0  
7fc011400000-7fc011500000 rw-p 00000000 00:00 0  
7fc011600000-7fc011700000 rw-p 00000000 00:00 0  
7fc011800000-7fc011900000 rw-p 00000000 00:00 0  
7fc011a00000-7fc011b00000 rw-p 00000000 00:00 0  
7fc011c00000-7fc011d00000 rw-p 00000000 00:00 0  
7fc011e00000-7fc011f00000 rw-p 00000000 00:00 0  
7fc012000000-7fc012100000 rw-p 00000000 00:00 0  
malloc(): unsorted double linked list corrupted  
./GenerateProjectFiles.sh: line 30: 9948 Aborted (core dumped) mono “$BASE\_PATH/…/…/…/Binaries/DotNET/UnrealBuildTool.exe” -projectfiles “$@”

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_9725d89e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_9725d89e](https://forums.unrealengine.com/u/anonymous_user_9725d89e)\
**Post date:** [October 13, 2021, 3:42am UTC](https://forums.unrealengine.com/t/unreal-fails-to-build-on-linux/77732/10 "2021-10-13T03:42:48Z")

</div>

i may have a problem with the motherboard or cpu or RAM on the machine i used in my previous reply to this message.

trying a compile sequence on another, more stable machine now, and it’s looking good so far.

will let you know how it turns out…

---

<div class="post-metadata">

**Author:** ![joaulo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/joaulo/32/464778_2.png) [@joaulo](https://forums.unrealengine.com/u/joaulo)\
**Post date:** [November 3, 2021, 6:25pm UTC](https://forums.unrealengine.com/t/unreal-fails-to-build-on-linux/77732/11 "2021-11-03T18:25:50Z")

</div>

I have same problem, also discussed (_but not resolved_) here:  
[https://answers.unrealengine.com/questions/1017417/view.html](https://answers.unrealengine.com/questions/1017417/view.html)  
It seems to be related in my case to a multithreading issue.  
I managed to have 2 PC with different hardware but the same **Debian Linux Bullseye** installed and I can compile without errors on the oldest one, while I have a lot of random errors on my new **Ryzen 9 3900X**.  
Forcing to compile with **only 1 core** at a time solved the problem and I’ve been able to build but it took too much time to be considered a solution.  
I suppose that this output while building is a clue:

 ![logical and physical cores](https://d3kjluh73b9h9o.cloudfront.net/original/3X/7/4/74c7e9ebaefc72d925a9fc86972df3f47eeade8e.jpeg)

Ryzen 9 3900X has **12 physical** cores and not 24 as stated in the output, maybe it has to do with the errors?

Anyway if anyone had any suggestions on how to solve the problem I would be very grateful.

---

<div class="post-metadata">

**Author:** ![teknoleet](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@teknoleet](https://forums.unrealengine.com/u/teknoleet)\
**Post date:** [May 18, 2022, 6:04pm UTC](https://forums.unrealengine.com/t/unreal-fails-to-build-on-linux/77732/12 "2022-05-18T18:04:05Z")

</div>

Just change the owner for the folder and subfolders and run make again

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

```
