Download

Unable to build Unreal Engine on ubuntu 18.04

I have followed the steps described on https://docs.unrealengine.com/en-US/Platforms/Linux/BeginnerLinuxDeveloper/SettingUpAnUnrealWorkflow/index.html, but it fails to make with the following error:

javier@Bullet:~/Projects/UnrealEngine$ make
bash “/home/javier/Projects/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/javier/Projects/UnrealEngine).
Creating makefile for CrashReportClient (no existing makefile)
Creating makefile for UnrealHeaderTool (no existing makefile)
Waiting for ‘git status’ command to complete
------- Build details --------
Using toolchain located at ‘/home/javier/Projects/UnrealEngine/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v16_clang-9.0.1-centos7/x86_64-unknown-linux-gnu’.
Using clang (/home/javier/Projects/UnrealEngine/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v16_clang-9.0.1-centos7/x86_64-unknown-linux-gnu/bin/clang++) version ‘9.0.1’ (string), 9 (major), 0 (minor), 1 (patch)
Using bundled libc++ standard C++ library.
Using lld linker
Using llvm-ar : /home/javier/Projects/UnrealEngine/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v16_clang-9.0.1-centos7/x86_64-unknown-linux-gnu/bin/llvm-ar
Using fast way to relink circularly dependent libraries (no FixDeps).

Performing 37 actions (24 in parallel)
[2/37] Compile PCH.CoreUObject.h
[1/37] Compile PCH.Core.h
[4/37] Compile Module.TraceLog.cpp
[6/37] Compile Module.UnrealHeaderTool.cpp
[3/37] Compile BuildSettings.cpp
[5/37] Compile SharedPCH.Core.ShadowErrors.h
In file included from /home/javier/Projects/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/UnrealHeaderTool/Development/Core/PCH.Core.h:67:
In file included from /home/javier/Projects/UnrealEngine/Engine/Source/Runtime/Core/Private/CorePrivatePCH.h:6:
In file included from /home/javier/Projects/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/UnrealHeaderTool/Development/CoreUObject/PCH.CoreUObject.h:57:
In file included from /home/javier/Projects/UnrealEngine/Engine/Source/Runtime/CoreUObject/Private/CoreUObjectPrivatePCH.h:6:
In file included from Runtime/Core/Public/CoreMinimal.h:9:
In file included from Runtime/Core/Public/CoreTypes.h:9:
In file included from Runtime/Core/Public/HAL/Platform.h:135:
In file included from Runtime/Core/Public/Linux/LinuxPlatform.h:9:
In file included from Runtime/Core/Public/Unix/UnixPlatform.h:10:
/usr/include/signal.h:32:10: fatal error: ‘bits/types/sig_atomic_t.h’ file not found
In file included from /home/javier/Projects/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/UnrealHeaderTool/Development/Core/SharedPCH.Core.ShadowErrors.h:55:
In file included from /home/javier/Projects/UnrealEngine/Engine/Source/Runtime/Core/Public/CoreSharedPCH.h:6:
In file included from /home/javier/Projects/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/UnrealHeaderTool/Development/TraceLog/Module.TraceLog.cpp:2:
In file included from Runtime/Core/Public/CoreTypes.h:9:
In file included from Runtime/Core/Public/HAL/Platform.h:135:
In file included from Runtime/Core/Public/Linux/LinuxPlatform.h:9:
In file included from Runtime/Core/Public/Unix/UnixPlatform.h:10:
/usr/include/signal.h:32:10: fatal error: ‘bits/types/sig_atomic_t.h’ file not found
#include <bits/types/sig_atomic_t.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/javier/Projects/UnrealEngine/Engine/Source/Runtime/BuildSettings/Private/BuildSettings.cpp:3:
In file included from /home/javier/Projects/UnrealEngine/Engine/Source/Runtime/TraceLog/Private/Trace/Channel.cpp:2:
In file included from Runtime/TraceLog/Public/Trace/Detail/Channel.h:5:
In file included from Runtime/TraceLog/Public/Trace/Config.h:5:
In file included from Runtime/Core/Public/HAL/Platform.h:135:
In file included from Runtime/Core/Public/Linux/LinuxPlatform.h:9:
In file included from Runtime/Core/Public/Unix/UnixPlatform.h:10:
/usr/include/signal.h:32:10: fatal error: ‘bits/types/sig_atomic_t.h’ file not found
#include <bits/types/sig_atomic_t.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from Runtime/BuildSettings/Public/BuildSettings.h:5:
In file included from Runtime/Core/Public/CoreTypes.h:9:
In file included from Runtime/Core/Public/HAL/Platform.h:135:
In file included from Runtime/Core/Public/Linux/LinuxPlatform.h:9:
In file included from Runtime/Core/Public/Unix/UnixPlatform.h:10:
/usr/include/signal.h:32:10: fatal error: ‘bits/types/sig_atomic_t.h’ file not found
#include <bits/types/sig_atomic_t.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from Runtime/Core/Public/CoreTypes.h:9:
In file included from Runtime/Core/Public/HAL/Platform.h:135:
In file included from Runtime/Core/Public/Linux/LinuxPlatform.h:9:
In file included from Runtime/Core/Public/Unix/UnixPlatform.h:10:
#include <bits/types/sig_atomic_t.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/signal.h:32:10: fatal error: ‘bits/types/sig_atomic_t.h’ file not found
#include <bits/types/sig_atomic_t.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/javier/Projects/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/UnrealHeaderTool/Development/UnrealHeaderTool/Module.UnrealHeaderTool.cpp:2:
In file included from /home/javier/Projects/UnrealEngine/Engine/Source/Programs/UnrealHeaderTool/Private/BaseParser.cpp:3:
In file included from Programs/UnrealHeaderTool/Private/BaseParser.h:5:
In file included from Runtime/Core/Public/CoreMinimal.h:9:
In file included from Runtime/Core/Public/CoreTypes.h:9:
In file included from Runtime/Core/Public/HAL/Platform.h:135:
In file included from Runtime/Core/Public/Linux/LinuxPlatform.h:9:
In file included from Runtime/Core/Public/Unix/UnixPlatform.h:10:
/usr/include/signal.h:32:10: fatal error: ‘bits/types/sig_atomic_t.h’ file not found
#include <bits/types/sig_atomic_t.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
1 error generated.
1 error generated.
1 error generated.
1 error generated.
1 error generated.
Makefile:307: recipe for target ‘CrashReportClient-Linux-Shipping’ failed
make: *** [CrashReportClient-Linux-Shipping] Error 6

I searched the file, and it is there:

javier@Bullet:~/Projects/UnrealEngine$ locate --existing sig_atomic_t.h
/usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h

looks like some dependecies were not downloaded. Are you sure that when you ran ./Setup.sh for the first time all third party softwares were downloaded?
If it fails try

  1. git clone the repository from bash
  2. ./Setup.sh (make sure you see succuss at the end)
  3. ./GenerateProjectFiles.sh
  4. make

Hi Sam, thaks for your answer

I was able to build the version 4.19
From 4.20 it does not make anymore, yes it dowloaded the dependencies,

I am using clang-5.0.1-4, wich comes by default on ubuntu 18.04

Same problem on ubuntu 16.04, I have not tested 20.04 yet

you should not use the system provided version of clang. Use the version which gets downloaded from unreal server when you run ./Setup.sh

If you have used perforce.txt to use linux distro’s clang, then you will have to re-download the source and the dependencies again. I have not found means to go back to unreal’s clang binary once system’s clang is used for compiling.

No, that is not the problem I have removed clang from my system, same issue

/usr/include/signal.h:32:10: fatal error: ‘bits/types/sig_atomic_t.h’ file not found
#include <bits/types/sig_atomic_t.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/UnrealEditor/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/UnrealHeaderTool/Development/UnrealHeaderTool/Module.UnrealHeaderTool.cpp:2:
In file included from /opt/UnrealEditor/UnrealEngine/Engine/Source/Programs/UnrealHeaderTool/Private/BaseParser.cpp:3:
In file included from Programs/UnrealHeaderTool/Private/BaseParser.h:5:
In file included from Runtime/Core/Public/CoreMinimal.h:9:
In file included from Runtime/Core/Public/CoreTypes.h:9:
In file included from Runtime/Core/Public/HAL/Platform.h:135:
In file included from Runtime/Core/Public/Linux/LinuxPlatform.h:9:
In file included from Runtime/Core/Public/Unix/UnixPlatform.h:10:
/usr/include/signal.h:32:10: fatal error: ‘bits/types/sig_atomic_t.h’ file not found
#include <bits/types/sig_atomic_t.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
1 error generated.
1 error generated.
1 error generated.
1 error generated.
1 error generated.
Makefile:302: recipe for target ‘CrashReportClient-Linux-Shipping’ failed
make: *** [CrashReportClient-Linux-Shipping] Error 5

I am attaching the full screen log, you can see it using the command “zmore”

$ zmore screenlog.0.zip

There was no need to remove system clang. I just wanted to know if you had used the perforce.txt

From the screenlog file you attached what I understood was that android ndk version that you are having is does not have the specific header files needed as in recent versions of ndk some headers were unified.
Three possible solution:

  1. downgrade the ndk.
    2.use a newer version of the engine like 4.25 if you can. (better)
  2. modifiy the ue4 source on your own.

I’ve just checked out version 4.26, and removed all related andriod sdk files, and got the same error

So, the problem is on target CrashReportClient-Linux-Shipping, a reference to bits/types/sig_atomic_t.h which is missing, as far as I can see, /usr/include/signal.h is part of the package libc6-dev,I do not see anything related to android

It is part of standard library. I was able to compile the same engine (4.26 preview2) version on fedora with 32 threads 64gb ram. (You seems to have more threads). I have seen in the forums people with very high threads having similar problem with ubuntu and debian.
Signal errors are very complicated issue. Most possible reason could be how they have implimented their os dev enviroment.
Two methods:

  1. If it is a race condition. Since you have many core. Try limiting the total number of thread in using home/username/.config/Unreal Engine/UnrealBuildTool/BuildConfiguration.xml Set MaxProcessorCount = to very low number and see if compiles. refer for settings https://docs.unrealengine.com/en-US/Programming/BuildTools/UnrealBuildTool/BuildConfiguration/index.html

  2. Another method I would recommend you to try it on another distro like fedora / Open suse 15.2 / centos 7 (too old)
    If you go for centos 8 or you will have to configure os without wayland.

I’ve got 24 cores, it is a AMD Ryzen 9 3900XT 12-Core Processor with hypertreading enabled, so I configured BuildConfiguration.xml like this:

<?xml version=“1.0” encoding=“utf-8”?>
<Configuration xmlns=“https://www.unrealengine.com/BuildConfiguration”>
<ParallelExecutor>
<MaxProcessorCount>2</MaxProcessorCount>
</ParallelExecutor>
</Configuration>

But no luck

javier@Bullet:/opt/Unreal/UnrealEngine$ make
bash “/opt/Unreal/UnrealEngine/Engine/Build/BatchFiles/Linux/Build.sh” CrashReportClient Linux Shipping
Fixing inconsistent case in filenames.
Setting up Mono
Running command : Engine/Binaries/DotNET/UnrealBuildTool.exe CrashReportClient Linux Shipping
Using ‘git status’ to determine working set for adaptive non-unity build (/opt/Unreal/UnrealEngine).
Creating makefile for CrashReportClient (no existing makefile)
Creating makefile for UnrealHeaderTool (no existing makefile)
------- Build details --------
Using toolchain located at ‘/opt/Unreal/UnrealEngine/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu’.
Using clang (/opt/Unreal/UnrealEngine/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 : /opt/Unreal/UnrealEngine/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).

Performing 38 actions (24 in parallel)
[6/38] Compile Module.UnrealHeaderTool.cpp
[2/38] Compile PCH.CoreUObject.h
[3/38] Compile Module.TraceLog.cpp
[5/38] Compile SharedPCH.Core.ShadowErrors.h
[1/38] Compile PCH.Core.h
[4/38] Compile BuildSettings.cpp
In file included from /opt/Unreal/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/UnrealHeaderTool/Development/TraceLog/Module.TraceLog.cpp:2:
In file included from /opt/Unreal/UnrealEngine/Engine/Source/Runtime/TraceLog/Private/Trace/BlockPool.cpp:3:
In file included from Runtime/TraceLog/Public/Trace/Config.h:5:
In file included from /opt/Unreal/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/UnrealHeaderTool/Development/UnrealHeaderTool/Module.UnrealHeaderTool.cpp:2:
In file included from Runtime/Core/Public/HAL/Platform.h:139:
In file included from Runtime/Core/Public/Linux/LinuxPlatform.h:9:
In file included from Runtime/Core/Public/Unix/UnixPlatform.h:10:
/usr/include/signal.h:32:10: fatal error: ‘bits/types/sig_atomic_t.h’ file not found
#include <bits/types/sig_atomic_t.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/Unreal/UnrealEngine/Engine/Source/Programs/UnrealHeaderTool/Private/BaseParser.cpp:3:
In file included from Programs/UnrealHeaderTool/Private/BaseParser.h:5:
In file included from Runtime/Core/Public/CoreMinimal.h:9:
In file included from Runtime/Core/Public/CoreTypes.h:9:
In file included from Runtime/Core/Public/HAL/Platform.h:139:
In file included from Runtime/Core/Public/Linux/LinuxPlatform.h:9:
In file included from Runtime/Core/Public/Unix/UnixPlatform.h:10:
/usr/include/signal.h:32:10: fatal error: ‘bits/types/sig_atomic_t.h’ file not found
#include <bits/types/sig_atomic_t.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/Unreal/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/UnrealHeaderTool/Development/Core/SharedPCH.Core.ShadowErrors.h:60:
In file included from /opt/Unreal/UnrealEngine/Engine/Source/Runtime/Core/Public/CoreSharedPCH.h:6:
In file included from Runtime/Core/Public/CoreTypes.h:9:
In file included from Runtime/Core/Public/HAL/Platform.h:139:
In file included from Runtime/Core/Public/Linux/LinuxPlatform.h:9:
In file included from Runtime/Core/Public/Unix/UnixPlatform.h:10:
/usr/include/signal.h:32:10: fatal error: ‘bits/types/sig_atomic_t.h’ file not found
#include <bits/types/sig_atomic_t.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/Unreal/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/UnrealHeaderTool/Development/CoreUObject/PCH.CoreUObject.h:63:
In file included from /opt/Unreal/UnrealEngine/Engine/Source/Runtime/CoreUObject/Private/CoreUObjectPrivatePCH.h:6:
In file included from Runtime/Core/Public/CoreMinimal.h:9:
In file included from Runtime/Core/Public/CoreTypes.h:9:
In file included from Runtime/Core/Public/HAL/Platform.h:139:
In file included from Runtime/Core/Public/Linux/LinuxPlatform.h:9:
In file included from Runtime/Core/Public/Unix/UnixPlatform.h:10:
/usr/include/signal.h:32:10: fatal error: ‘bits/types/sig_atomic_t.h’ file not found
#include <bits/types/sig_atomic_t.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/Unreal/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/UnrealHeaderTool/Development/Core/PCH.Core.h:70:
In file included from /opt/Unreal/UnrealEngine/Engine/Source/Runtime/Core/Private/CorePrivatePCH.h:6:
In file included from Runtime/Core/Public/CoreTypes.h:9:
In file included from Runtime/Core/Public/HAL/Platform.h:139:
In file included from Runtime/Core/Public/Linux/LinuxPlatform.h:9:
In file included from Runtime/Core/Public/Unix/UnixPlatform.h:10:
/usr/include/signal.h:32:10: fatal error: ‘bits/types/sig_atomic_t.h’ file not found
#include <bits/types/sig_atomic_t.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/Unreal/UnrealEngine/Engine/Source/Runtime/BuildSettings/Private/BuildSettings.cpp:3:
In file included from Runtime/BuildSettings/Public/BuildSettings.h:5:
In file included from Runtime/Core/Public/CoreTypes.h:9:
In file included from Runtime/Core/Public/HAL/Platform.h:139:
In file included from Runtime/Core/Public/Linux/LinuxPlatform.h:9:
In file included from Runtime/Core/Public/Unix/UnixPlatform.h:10:
/usr/include/signal.h:32:10: fatal error: ‘bits/types/sig_atomic_t.h’ file not found
#include <bits/types/sig_atomic_t.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
1 error generated.
1 error generated.
1 error generated.
1 error generated.
1 error generated.
Makefile:322: recipe for target ‘CrashReportClient-Linux-Shipping’ failed
make: *** [CrashReportClient-Linux-Shipping] Error 6

Same error

I have seen people using ubuntu, one of the major linux distributios DistroWatch.com: Put the fun back into computing. Use Linux, BSD.

So, I think that I am missing a dependency that Setup.sh does not satisfy, but I don’t know how to find out wich one

BTW, the official unreal documentation uses ubuntu, https://docs.unrealengine.com/en-US/Platforms/Linux/BeginnerLinuxDeveloper/SettingUpAnUnrealWorkflow/index.html

“Our development and support teams currently use the latest version of Ubuntu; as a result, we may not be able to provide support for other Linux distributions (including other versions of Ubuntu). Additionally, read about Hardware and Software Specifications , and make sure your system has at least one hundred (100) gigabytes of disk space before performing the following steps.”

So, does the development and support teams actually support what they claim to support?, who are them?, how can I contact them?

**Edit: removed previous post as this is the order to follow to fix the issue. Previous posts order is in reverse and could confuse new user **

Trial 1

Unreal linux build tool chain detects the distribution and uses libc downloaded with unreal or supplied with os based on distribution by checking things like is source os? etc according to the distribution. This is the root of the problem, along with typical installation mistake of os.

If you install any live os please remember to install the build tools. (eg ubuntu, fedora)

Ubuntu

sudo apt-get update
udo apt-get install build-essential llvm

Fedora

sudo dnf groupinstall “Development Tools”
sudo dnf install flex kernel-devel bison dkms

if you have rpmfusion repository enabled and using nvidia drivers.

sudo dnf install akmod-nvidia

(Ubuntu with its dependency on debian has many things different from other distributions. See other at also had similar issue with compiling softwares in ubuntu even after installing the build-essential. https://stackoverflow.com/questions/…23339#11823339 https://stackoverflow.com/questions/…file-not-found
)

Redhat/Fedora has better engineering than Ubuntu. Eg it all software are forced to use universal libraries rather than libraries being packed with each software. There could be many copies of same libraries/dependencies is some distribution.

Trial 2
--------

I have seen in the forums people with very high threads having similar problem with ubuntu and debian.
Signal errors are very complicated issue. Most possible reason could be how they have implimented their os dev enviroment.
Two methods:

  1. If it is a race condition. Since you have many core. Try limiting the total number of thread in using home/username/.config/Unreal Engine/UnrealBuildTool/BuildConfiguration.xml Set MaxProcessorCount = to very low number and see if compiles. refer for settings https://docs.unrealengine.com/en-US/…ion/index.html

  2. Another method I would recommend you to try it on another distro like fedora / Open suse 15.2 / centos 7 (too old)
    If you go for centos 8 or you will have to configure os without wayland.

Trial 3
--------

Are you on a very old distro with obsolate android ndk. Then remove it

Trial 4
---------

Are you using any methods like perforce.txt to use system provided clang. Each version of unreal will only work with a specific version of clang eg 4.25 with clang 9. 4.26 with clang 10 etc. Have you modified build tools to use gcc for compiling.
If anything like this is done then revoke it.
if you used git to clone (git clone unrealsourceweblink)Try in console with

git reset --hard
If it does not work Easiest method will be to remove the unreal source and redowload (use git clone if it is possible)

Trial 5

If it still does not work ask in forum or if its a bug report it!

PS

Many things in documentation such as system requirements, linux installation method etc are old (as of 2020). In requirements it says 100 gb for source. But now the compiled engine is around 120gb and having 100gb will not work.

BINGO !!!

This fixes the problem:

$ sudo apt-get install build-essential flex libelf-dev libc6-dev-amd64 binutils-dev libdwarf-dev

Thank you very much Sam, for your patience and your answers

I hope there is a way to update Setup.sh or the official documentation, so no one else has to guess the way to do it

They have not updated system configuration for 2 years. Linux installation guide was never updated. Linux setup method is somewhat outdated. The method to configure QT as given in that documentation is absolutely wrong.

PS: If you not able to compile project from within QT / Kdev or get intelligence / code complete please ask here. I have have tons of undocumented methods!.