Error building Unreal Engine 4.26 on Linux Debian 11 (Bullseye)

Hi, I’m trying to compile Unreal Engine 4.26 but I have some errors.
I was running 4.25 without problems, I’ve checked out 4.26.1 release, I’ve run and with success.
Running “make” at some point I get the error:

clang++: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 10.0.1
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /media/workspace/DevTools/engines/UnrealEngine/UE426/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu/bin
clang++: note: diagnostic msg: PLEASE submit a bug report to and include the crash backtrace, preprocessed source, and associated run script.
[69/72] Compile Module.CoreUObject.6_of_8.cpp
[70/72] Compile Module.Core.11_of_14.cpp
clang++: note: diagnostic msg:

Preprocessed source(s) and associated run script(s) are located at:
clang++: note: diagnostic msg: /tmp/Module-678cf3.cpp
clang++: note: diagnostic msg: /tmp/
clang++: note: diagnostic msg:

Any idea how to fix?

Hi joaulo.

I just checked out a clean 4.26.1-release branch @ 5df54b7 and was able to run this successfully:

./ && ./ -Makefile && make

My current Debian details are down below. Is there some other project or something else I could do to try and repro this? Also curious how much RAM you’ve got on your machine? Thanks!

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux bullseye/sid
Release: testing
Codename: bullseye

$ uname -a
Linux mikesart-tr3 5.10.0-4-amd64 #1 SMP Debian 5.10.19-1 (2021-03-02) x86_64 GNU/Linux

------- Build details --------
Using toolchain located at ‘/epic/p4/UE4/UE4.git/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu’.
Using clang (/epic/p4/UE4/UE4.git/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu/bin/clang++) version ‘10.0.1’ (string),
10 (major), 0 (minor), 1 (patch)
Using bundled libc++ standard C++ library.
Using lld linker
Using llvm-ar : /epic/p4/UE4/UE4.git/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu/bin/llvm-ar
Using fast way to relink circularly dependent libraries (no FixDeps).

Hi joaulo.

I just cloned 4.26.1-release @ 5df54b7, and built everything clean and it worked.

The version of Debian I’m using is down below. Are you similar to this, and how much RAM do you have?


$ uname -a
Linux mikesart-tr3 5.10.0-4-amd64 #1 SMP Debian 5.10.19-1 (2021-03-02) x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux bullseye/sid
Release: testing
Codename: bullseye

Some things we can try here.

  1. Could you double check that “sudo dmesg -H” doesn’t show anything getting killed due to oom or other? 64GB should be enough, but just want to double check on this.

  2. Maybe set your own compiler up:


extract that, and then set up the env to point to wherever you put it. Something like:

export LINUX_MULTIARCH_ROOT=/epic/v17_clang-10.0.1-centos7

Maybe do a git clean -d -fx -i to make sure your git repo is completely clean. Doing the -i so you don’t delete anything important in there! :slight_smile:

Then run the regular ./ && ./ -Makefile && make thing.

  1. You can try building with the system compiler as well. Couple caveats - I’ve got clang 11.0.1 on my system and we haven’t tested with that yet. You’ll have to apply the below patch to get it to build if that’s what you’ve got.

After applying the patch, you should be able to build with something like:

ARGS="-ForceUseSystemCompiler" make BlankProgram

Let me know how it goes. Thanks Joaulo!  

Clang 11 patch:

mikesart@mikesart-tr3 :/epic/UE4.git (4.26.1-release *)$ git diff
        — i/Engine/Source/Programs/UnrealBuildTool/Platform/Linux/LinuxToolChain.cs
        +++ w/Engine/Source/Programs/UnrealBuildTool/Platform/Linux/LinuxToolChain.cs
        @@ -186,7 +186,7 @@ namespace UnrealBuildTool
                    // prevent unknown clangs since the build is likely to fail on too old or too new compilers
        -           else if ((CompilerVersionMajor * 10 + CompilerVersionMinor) > 100 || (CompilerVersionMajor * 10 + CompilerVersionMinor) < 60)
        +           else if ((CompilerVersionMajor * 10 + CompilerVersionMinor) > 110 || (CompilerVersionMajor * 10 + CompilerVersionMinor) < 60)

Hi Michael and thanks for the support, as far as I can see you are on Debian Testing too so the system should be identical … I wonder why I have compiling problems.
I have a Ryzen 9 processor, 64Gb of RAM, Nvidia 1060 6Gb video card.
Source code folder is on a HD with NTFS filesystem (shared with Windows partition on the same machine).
I honestly don’t know what you can do to reproduce the problem…
I had a 4.25 checkout compiled and working, I did a 4.26.1 checkout and had problems compiling. So I redid a clean git clone of 4.26 in a new folder and I ran the usual commands (setup & generateprojectfiles & make) and on the make I still have the same error.
I can’t figure out what it depends on, maybe some package installed or not installed on the system?
But as I understand it, the dependencies are now all downloaded locally …
Is there a way to build Unreal using system installed tools instead of downloaded ones, to see if it makes a difference?

Some other info on my system:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux bullseye/sid
Release: testing
Codename: bullseye

$ uname -a
Linux Paradiso 5.10.0-4-amd64 #1 SMP Debian 5.10.19-1 (2021-03-02) x86_64 GNU/Linux

Hi Michael, I’ve checked point 1), no oom errors.
The only error message in dmesg appeared after clang error in make:
[10799.137176] clang++[34206]: segfault at 5 ip 00007fa3927e4790 sp 00007fffd7775550 error 4 in[7fa3927d8000+11000]
[10799.137186] Code: 0f b6 f0 4c 89 e7 e8 7f f1 ff ff 48 8b 44 24 18 49 89 84 24 a0 00 00 00 e9 2e fe ff ff 0f 1f 44 00 00 49 8b 84 24 98 00 00 00 <80> 38 48 0f 85 57 ff ff ff 48 ba c7 c0 0f 00 00 00 0f 05 48 39 50
I’ll try with point 2) and eventually 3) and let you know.
Thank you!

ok, why my comments are unformatted? If I try to edit comment I can see text formatted in preview… :frowning:

What do the files look like? Ie, if you do

cat /media/workspace/DevTools/engines/UnrealEngine/UE426/Engine/Intermediate/Build/Linux/B4D820EA/CrashReportClientEditor/Shipping/CoreUObject/Module.CoreUObject.7_of_8.cpp.o.rsp

Or whatever on the files it’s complaining about, do they look valid?

I’ve tried also with method 2) but got the same error.
Trying to trace the error seems to point at:

<eof> parser at end of file

but using built in clang vs, downloaded clang I got the error in different files… that doesn’t make sense to me.
I’ve seen there is no clang v10 in Debian so I’ll try with system clang v11 and method 3) but… what a pain.

…and finally I’ve tried method 3), but no luck. Same errors, but building somehow proceeded until get stuck at:

[2148/2782] Copy


Well, I’m not sure Joaulo. Is there any chance this could be causing issues?

Source code folder is on a HD with NTFS filesystem

How difficult would it be to try building on a native drive with ext4 or something?

If you have time, maybe try something like strace building a smaller project (if it repros?) and see if it has more information about what’s going on. Otherwise, ugh. Sorry Joaulo. Wish I could repro this here. Take care.

I’ve checked the files but it seems all right. There is no new line at the end of the file but I don’t think this should be the problem.
I’ve also tried to compile in a fresh new folder and new git clone on a ext4 disk but got the same result.
The fact is that errors are always the same but at different point/file each time I recompile.
It seems… random.
I suppose I’ll stick with 4.25 for now and come back to try again when a new version will be released.
Thank you for your time and patience Michael.

Smaller project? You mean an UE4 project?
But 4.25 compile and run.

Something like this should be way smaller to build than editor:

make BlankProgram

If you look in the Makefile, there is a long list of targets. If BlankProgram doesn’t have errors, maybe TestPAL or SlateViewer might?

If it can repro with one of those smaller projects maybe strace becomes easier to use and track down what’s going wrong.

Well, BlankProgram, SlateViewer and TestPAL compiled with no errors.

make UE4Editor instead gives me errors (full log attached: link text)

Update: I couldn’t find a solution. But I have noticed a strange behavior: after getting a build error, if I run make again without cleaning build, the build proceeds on the last error and stops at the next error.
Proceeding in this way I have reached the end of the compilation process … and UE4Editor starts!
But it seems quite unstable and crashes frequently.
I’ve been around for a while with this kind of thing, but this is the first time I’ve seen something so weird and unpredictable.

I also am receiving similar errors as joaulo and followed ALMOST all the suggestions Michael Sartain suggested (I didn’t try building with clang v11.0.1 and applying the patch) but am still not able to build UE4Editor v4.26. I was successfully building v4.25.

The v4.26 branch builds with v17_clang-10.0.1-centos7

$ lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04 Codename: bionic
Memory: 32 GB

$ uname -a

Linux jarvis 5.4.0-70-generic #78~18.04.1-Ubuntu SMP Sat Mar 20 14:10:07 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

I will try the build process with the newer version of clang and see how that goes.

UPDATE: just to be sure I followed #2 suggested by Michael Sartain again and no-go.

As for item #3:

I proceeded to build (unknowingly) the whole llvm toolchain (which took like 12 hours on a single core) that had clang-13. Along with that, I made the following change to the Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu’ file:

else if ((CompilerVersionMajor 10 + CompilerVersionMinor) > 130 || (CompilerVersionMajor * 10 + CompilerVersionMinor) < 60)

I then proceeded to set the LINUX_MULTIARCH_ROOT environment variable to point to the llvm folder, but during the build of UE4, it wasn’t able to detect clang. I attempted to compare the directory structure of the v17_clang-10.0.1-centos7 file that gets used when building UE4 v4.26 but I wasn’t sure how to change the llvm structure to match it or if that was even the right thing to do.

Anyways, I never got it working. I don’t mind working in v4.25, but everyone else at work is using the Windows version of UE4 with v4.26 and I cannot use any of their environments. Maybe one day but not today…

Can you try this:

a) ./ && ./
b) Edit your Engine/Saved/UnrealBuildTool/BuildConfiguration.xml and limit the number of cores to build with, like the example below.
c) Run make

And see if that allows you to build without errors? It’ll probably take forever, but it’ll maybe let us know if the number of parallel build processes is an issue. And yeah, definitely double check you’re not running out of hard drive space as well. Thanks!

mikesart@mikesart-tr3:/epic/p4/UE4/UE4.git (4.26)$ cat Engine/Saved/UnrealBuildTool/BuildConfiguration.xml
<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="">