Build of UE4Editor on Arch Linux fails

Hi guys. I am trying to build UE4Editor on Arch Linux. Unfortunally the build process of the Editor (i.e. “make UE4Editor”) fails at a certain stage.

I’m getting the following error message:

[853/862] Link libUE4Editor-WorldBrowser.so
-------- End Detailed Actions Stats -----------------------------------------------------------
ERROR: UBT ERROR: Failed to produce item: /home/dbulczak/Development/UnrealEngine/Engine/Binaries/Linux/libUE4Editor-Renderer.so
Total build time: 2667.29 seconds
Makefile:193: recipe for target 'UE4Editor' failed

Thus the linking of libUE4Editor-Renderer.so with libUE4Editor-WorldBrowser seems to fail. Build of Linux Debug version (make UE4Editor-Linux-Debug) works, but it is quite slow thus I want to use the release build. Does anyone know how to fix my issue?

Edit:
I have just restarted “make UE4Editor” and I receive the following error message:
1. parser at end of file
2. /home/dbulczak/Development/UnrealEngine/Engine/Source/Runtime/Renderer/Private/SceneVisibility.cpp:267:14: instantiating function definition 'FrustumCull'
3. /home/dbulczak/Development/UnrealEngine/Engine/Source/Runtime/Renderer/Private/SceneVisibility.cpp:286:4 <Spelling=/home/dbulczak/Development/UnrealEngine/Engine/Source/Runtime/Core/Public/Stats/Stats2.h:1715:33>: instantiating function definition ‘GetStatName’
4. /home/dbulczak/Development/UnrealEngine/Engine/Source/Runtime/Renderer/Private/SceneVisibility.cpp:286:4 <Spelling=/home/dbulczak/Development/UnrealEngine/Engine/Source/Runtime/Core/Public/Stats/Stats2.h:1715:33>: LLVM IR generation of declaration ‘FrustumCull(const FScene *, FViewInfo &)::(anonymous class)::operator()(int32)::FStat_STAT_FrustumCull_Loop::GetStatName’
5. /home/dbulczak/Development/UnrealEngine/Engine/Source/Runtime/Renderer/Private/SceneVisibility.cpp:286:4 <Spelling=/home/dbulczak/Development/UnrealEngine/Engine/Source/Runtime/Core/Public/Stats/Stats2.h:1715:33>: Mangling declaration ‘FrustumCull(const FScene *, FViewInfo &)::(anonymous class)::operator()(int32)::FStat_STAT_FrustumCull_Loop::GetStatName’
clang-3.7: error: unable to execute command: Segmentation fault (core dumped)
clang-3.7: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 3.7.0 (tags/RELEASE_370/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang-3.7: note: diagnostic msg: PLEASE submit a bug report to Bugzilla Main Page and include the crash backtrace, preprocessed source, and associated run script.
clang-3.7: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-3.7: note: diagnostic msg: /tmp/Module-e3c695.cpp
clang-3.7: note: diagnostic msg: /tmp/Module-e3c695.sh
clang-3.7: note: diagnostic msg: 

********************
-------- End Detailed Actions Stats -----------------------------------------------------------
ERROR: UBT ERROR: Failed to produce item: /home/dbulczak/Development/UnrealEngine/Engine/Binaries/Linux/libUE4Editor-Renderer.so
Total build time: 14.80 seconds
Makefile:193: recipe for target 'UE4Editor' failed
make: *** [UE4Editor] Error 5

Thus it seems, that clang 3.7 can not compile some files. Any solution for this problem?

I commented on your forum post about this issue (Build of Editor fails on Arch Linux - C++ - Epic Developer Community Forums) and am still looking for a solution since I’m having the exact same problem.

At this point I’m wondering if this has something to do with the fact that I’m using NVIDIA’s Optimus technology in this particular laptop. Unfortunately I can’t disable the integrated Intel GPU and use the discreet card exclusively.

Are you also using Optimus (bumblebee/primus/optirun)? I mentioned in the forum post that my other laptop is using the discreet card exclusively and can compile and run the Editor just fine on a similar Fedora 23 setup as my Optimus computer.

Good news! I think I may have found a workaround… at least one that works for me. After reading another answer (Error while building for UE4Editor - Platform & Builds - Epic Developer Community Forums) I decided to try an earlier version of clang since the available version from Fedora 23’s repos is 3.7. I had to manually install version 3.5.1 (3.6.0 didn’t work for me). Here’s the process I used, mostly taken from https://forums.unrealengine.com/showthread.php?53451-Successful-4-6-0-build-on-Fedora-20-x86_64:

sudo dnf erase clang llvm
cd /home/<username>/Downloads
wget http://llvm.org/releases/3.5.1/clang+llvm-3.5.1-x86_64-fedora20.tar.xz
tar xvf clang+llvm-3.5.1-x86_64-fedora20.tar.xz
cd clang+llvm-3.5.1-x86_64-fedora20
sudo cp -R * /usr/local/
cd <GitUnrealEngineFolder>
./Setup.sh
./GenerateProjectFiles.sh
make UE4Editor UE4Game UnrealPak CrashReportClient ShaderCompileWorker UnrealLightmass
make -j1 ShaderCompileWorker

I have no idea why the editor builds fine on my other non-optimus laptop using clang 3.7.

I had exactly the same error that you had. I changed the clang version and it worked. The default clang version is 3.7.
do a :

pacman -S clang35

Say yes when it asks you if you want to replace the clang 3.7 version.

Look at the archlinux wiki page too:

https://wiki.archlinux.org/index.php/Unreal_Engine_4

FYI information I used the trick with the ld link in my ~/bin.

Before you relaunch the make command, you should clean all the files:

rm -rf Engine/Intermediate/Shaders Engine/Saved Engine/DerivedDataCache Engine/Intermediate/CachedAssetRegistry.bin
rm -rf Engine/Intermediate/Build/Linux/x86_64-unknown-linux-gnu/UE4Editor Engine/Binaries/Linux/libUE4Editor-* Engine/Binaries/Linux/UE4Editor
rm -f Engine/Binaries/Linux/Unreal* Engine/Binaries/Linux/UE* \
      Engine/Binaries/Linux/libUnreal* Engine/Binaries/Linux/libUE* Engine/Binaries/Linux/libSh* \
      Engine/Binaries/Linux/ShaderCompileWorker* Engine/Binaries/Linux/SlateViewer* Engine/Binaries/Linux/CrashReportClient*
rm -rf Engine/Intermediate/Build Engine/Binaries/Linux/HTML5 Engine/Binaries/Linux/Linux Engine/Binaries/Linux/Android Engine/Binaries/Linux/IOS Engine/Binaries/Linux/HTML5

I have taken this from A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums. As I did’nt want to touch the makefile, I added this in a clean.sh file and launch with:

bash clean.sh

Not vrey pro but it works.

Thanks for post yours solutions. But don’t work here. I tried many times. Resulting on this:

  1. [55/896] Compile Module.UnrealEd.14_of_21.cpp
    clang: error: unable to execute command: Killed
    clang: error: clang frontend command failed due to signal (use -v to see invocation)
    clang version 3.5.2 (tags/RELEASE_352/final)
    Target: x86_64-unknown-linux-gnu
    Thread model: posix
    clang: note: diagnostic msg: PLEASE submit a bug report to Bugzilla Main Page and include the crash backtrace, preprocessed source, and associated run script.
  2. [58/896] Compile Module.UnrealEd.7_of_21.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-d40934.cpp
clang: note: diagnostic msg: /tmp/Module-d40934.sh
clang: note: diagnostic msg:


  1. [123/896] Compile Module.Kismet.5_of_5.cpp
    clang: error: unable to execute command: Killed
    clang: error: clang frontend command failed due to signal (use -v to see invocation)
    clang version 3.5.2 (tags/RELEASE_352/final)
    Target: x86_64-unknown-linux-gnu
    Thread model: posix
    clang: note: diagnostic msg: PLEASE submit a bug report to Bugzilla Main Page and include the crash backtrace, preprocessed source, and associated run script.
    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-1e365d.cpp
clang: note: diagnostic msg: /tmp/Module-1e365d.sh
clang: note: diagnostic msg:


  1. [124/896] Compile AIModule.generated.cpp
    clang: error: unable to execute command: Killed
    clang: error: clang frontend command failed due to signal (use -v to see invocation)
    clang version 3.5.2 (tags/RELEASE_352/final)
    Target: x86_64-unknown-linux-gnu
    Thread model: posix
    clang: note: diagnostic msg: PLEASE submit a bug report to Bugzilla Main Page and include the crash backtrace, preprocessed source, and associated run script.
    [126/896] Compile Module.DatabaseSupport.cpp
    [125/896] Compile Module.HardwareSurvey.cpp
    [127/896] Compile Module.UMG.cpp
    [128/896] Compile UMG.generated.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-ec07c9.cpp
clang: note: diagnostic msg: /tmp/Module-ec07c9.sh
clang: note: diagnostic msg:


  1. [206/896] Compile Module.GraphEditor.cpp
    clang: error: unable to execute command: Killed
    clang: error: clang frontend command failed due to signal (use -v to see invocation)
    clang version 3.5.2 (tags/RELEASE_352/final)
    Target: x86_64-unknown-linux-gnu
    Thread model: posix
    clang: note: diagnostic msg: PLEASE submit a bug report to Bugzilla Main Page and include the crash backtrace, preprocessed source, and associated run script.
  2. [213/896] Compile Module.Foliage.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-21aaf3.cpp
clang: note: diagnostic msg: /tmp/Module-21aaf3.sh
clang: note: diagnostic msg:


  1. [280/896] Compile Module.LevelEditor.1_of_3.cpp
    clang: error: unable to execute command: Killed
    clang: error: clang frontend command failed due to signal (use -v to see invocation)
    clang version 3.5.2 (tags/RELEASE_352/final)
    Target: x86_64-unknown-linux-gnu
    Thread model: posix
    clang: note: diagnostic msg: PLEASE submit a bug report to Bugzilla Main Page and include the crash backtrace, preprocessed source, and associated run script.
    [281/896] Compile Module.LevelEditor.2_of_3.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-a391e8.cpp
clang: note: diagnostic msg: /tmp/Module-a391e8.sh
clang: note: diagnostic msg:


  1. [296/896] Compile Module.KismetCompiler.cpp
    clang: error: unable to execute command: Killed
    clang: error: clang frontend command failed due to signal (use -v to see invocation)
    clang version 3.5.2 (tags/RELEASE_352/final)
    Target: x86_64-unknown-linux-gnu
    Thread model: posix
    clang: note: diagnostic msg: PLEASE submit a bug report to Bugzilla Main Page and include the crash backtrace, preprocessed source, and associated run script.
  2. [301/896] Compile Module.Renderer.4_of_9.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-314de1.cpp
clang: note: diagnostic msg: /tmp/Module-314de1.sh
clang: note: diagnostic msg:


  1. [369/896] Compile Module.Documentation.cpp
    clang: error: unable to execute command: Killed
    clang: error: clang frontend command failed due to signal (use -v to see invocation)
    clang version 3.5.2 (tags/RELEASE_352/final)
    Target: x86_64-unknown-linux-gnu
    Thread model: posix
    clang: note: diagnostic msg: PLEASE submit a bug report to Bugzilla Main Page and include the crash backtrace, preprocessed source, and associated run script.
    clang: error: unable to execute command: Killed
    clang: error: clang frontend command failed due to signal (use -v to see invocation)
    clang version 3.5.2 (tags/RELEASE_352/final)
    Target: x86_64-unknown-linux-gnu
    Thread model: posix
    clang: note: diagnostic msg: PLEASE submit a bug report to Bugzilla Main Page and include the crash backtrace, preprocessed source, and associated run script.
    [370/896] Compile Paper2D.generated.cpp
    [371/896] Compile Module.Paper2D.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-36bab4.cpp
clang: note: diagnostic msg: /tmp/Module-36bab4.sh
clang: note: diagnostic msg:


[372/896] Compile Module.MeshPaint.cpp
[373/896] Link libUE4Editor-Media.so
[374/896] Compile Module.SettingsEditor.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-5a5f70.cpp
clang: note: diagnostic msg: /tmp/Module-5a5f70.sh
clang: note: diagnostic msg:


  1. [693/896] Link libUE4Editor-UE4Game.so
    ERROR: UBT ERROR: Failed to produce item: /home/fabiomen10/UnrealEngine/Engine/Binaries/Linux/libUE4Editor-UnrealEd.so
    Total build time: 4254,22 seconds
    make: *** [Makefile:188: UE4Editor] Error 5

If you can help me. I’ve this problem below.