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 Setup.sh and GenerateProjectFiles.sh 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 https://bugs.llvm.org/ 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:
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++: note: diagnostic msg: /tmp/Module-678cf3.cpp
clang++: note: diagnostic msg: /tmp/Module-678cf3.sh
clang++: note: diagnostic msg:
*
I just checked out a clean 4.26.1-release branch @ 5df54b7 and was able to run this successfully:
./Setup.sh && ./GenerateProjectFiles.sh -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).
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.
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!
Then run the regular ./Setup.sh && ./GenerateProjectFiles.sh -Makefile && make thing.
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 !
-Mike
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 libgcc_s.so.1[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!
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.
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 . 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.
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 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:
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…
a) ./Setup.sh && ./GenerateProjectFiles.sh
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!