Unreal Engine 4 building error, under Ubuntu 14.04.3

Аfter this command:
make UE4Editor UE4Game UnrealPak CrashReportClient ShaderCompileWorker UnrealLightmass

I’ve got this:


[77/690] Compile Module.Kismet.4_of_4.cpp
clang: error: unable to execute command: Killed
clang: error: clang frontend command failed due to signal (use -v to see invocation)

make sure you have clang 3.5 installed and the correct symlinks are set. you must be able to start clang and clang++ . if that doesn’t work you can’t compile ue4

clang-3.5 is OK.

Here is more exact info:
link text

I mean clang is installed. Second time it hapened again.


[21/21] Link UnrealHeaderTool
-------- End Detailed Actions Stats -----------------------------------------------------------
Total build time: 120.53 seconds
Parsing headers for ShaderCompileWorker
Using binned.
[2015.09.28-16.05.25:119][ 0]LogLinux:Warning: dlopen failed: /media/Data/UnrealEngine-release/Engine/Binaries/Linux/: cannot read file data: Is a directory
[2015.09.28-16.05.25:119][ 0]LogModuleManager:Warning: ModuleManager: Unable to load module ‘/media/Data/UnrealEngine-release/Engine/Binaries/Linux/’ because the file couldn’t be loaded by the OS.
[2015.09.28-16.05.25:119][ 0]LogLinux:Warning: dlopen failed: /media/Data/UnrealEngine-release/Engine/Binaries/Linux/: cannot read file data: Is a directory
[2015.09.28-16.05.25:119][ 0]LogModuleManager:Warning: ModuleManager: Unable to load module ‘/media/Data/UnrealEngine-release/Engine/Binaries/Linux/’ because the file couldn’t be loaded by the OS.
[2015.09.28-16.05.25:119][ 0]LogLinux:Warning: dlopen failed: /media/Data/UnrealEngine-release/Engine/Binaries/Linux/: cannot read file data: Is a directory
[2015.09.28-16.05.25:119][ 0]LogModuleManager:Warning: ModuleManager: Unable to load module ‘/media/Data/UnrealEngine-release/Engine/Binaries/Linux/’ because the file couldn’t be loaded by the OS.
[2015.09.28-16.05.25:119][ 0]LogLinux:Warning: dlopen failed: /media/Data/UnrealEngine-release/Engine/Binaries/Linux/: cannot read file data: Is a directory
[2015.09.28-16.05.25:119][ 0]LogModuleManager:Warning: ModuleManager: Unable to load module ‘/media/Data/UnrealEngine-release/Engine/Binaries/Linux/’ because the file couldn’t be loaded by the OS.
[2015.09.28-16.05.25:119][ 0]LogTaskGraph: Started task graph with 3 named threads and 6 total threads.

After:
./UE4Editor and it said:
No such file or directory

Then I tryed on Ubuntu 15.04. That is waht I got:
link text

This looks normal - continue the build.

I forgot to say, after this I can’t do this: ./UE4Editor. There is no such file.

Another attempt:

I did install clang-3.3 on 14.0.4.3, I have not succeed when tried to install it on 15.04.

And it doesn’t help - on 14.04.3 with clang-3.3 there was the same problem as on 15.04 with clang-3.5.

On the other laptop I had this:

... [1/21] Compile CorePrivatePCH.h In file included from /home/user/UnrealEngine-release/Engine/Intermediate/Build/Linux/x86_64-unknown-linux-gnu/UnrealHeaderTool/Development/Core/CorePrivatePCH.h:4: In file included from /home/user/UnrealEngine-release/Engine/Source/Runtime/Core/Private/CorePrivatePCH.h:16: Runtime/Core/Public/HAL/PlatformIncludes.h:5:10: fatal error: 'new' file not found
#include 
         ^ 1 error generated. [2/21] Compile Module.Json.cpp In file included from /home/user/UnrealEngine-release/Engine/Intermediate/Build/Linux/x86_64-unknown-linux-gnu/UnrealHeaderTool/Development/Json/Module.Json.cpp:2: In file included from /home/user/UnrealEngine-release/Engine/Source/Runtime/Json/Private/JsonModule.cpp:3: In file included from Runtime/Json/Private/JsonPrivatePCH.h:5: In file included from Runtime/Json/Public/Json.h:9: In file included from Runtime/Core/Public/Core.h:16: Runtime/Core/Public/HAL/PlatformIncludes.h:5:10: fatal error: 'new' file not found
#include 
         ^ 1 error generated. [3/21] Compile Module.Projects.cpp In file included from /home/user/UnrealEngine-release/Engine/Intermediate/Build/Linux/x86_64-unknown-linux-gnu/UnrealHeaderTool/Development/Projects/Module.Projects.cpp:2: In file included from /home/user/UnrealEngine-release/Engine/Source/Runtime/Projects/Private/ProjectsPrivatePCH.h:6: In file included from Runtime/Projects/Public/Projects.h:9: In file included from Runtime/Core/Public/Core.h:16: Runtime/Core/Public/HAL/PlatformIncludes.h:5:10: fatal error: 'new' file not found ...

Make sure libstdc++ is installed.

I can’t:

...
     libstdc++6-4.9-dbg-arm64-cross : Conflicts: libstdc++6-4.8-dbg-arm64-cross but 4.8.4-1ubuntu15cross0.15 is to be installed
     libstdc++6-4.9-dbg-armel-cross : Conflicts: libstdc++6-4.7-dbg-armel-cross but 4.7.4-2ubuntu1cross1.86 is to be installed
     libstdc++6-4.9-dbg-armhf-cross : Conflicts: libstdc++6-4.7-dbg-armhf-cross but 4.7.4-2ubuntu1cross1.86 is to be installed
                                      Conflicts: libstdc++6-4.8-dbg-armhf-cross but 4.8.4-1ubuntu10cross0.15 is to be installed
     libstdc++6-4.9-dbg-powerpc-cross : Conflicts: libstdc++6-4.8-dbg-powerpc-cross but 4.8.4-1ubuntu10cross0.18 is to be installed
     libstdc++6-4.9-dbg-ppc64el-cross : Conflicts: libstdc++6-4.8-dbg-ppc64el-cross but 4.8.4-1ubuntu10cross0.7 is to be installed
    E: Unable to correct problems, you have held broken packages.

Which linux distro/version is more compatable with UE4 ? Which distro/version should I try ?

Try installing libstdc++

I had the same issue and it turned out that UnrealBuildTool is running the build in parallel (as many cores as you have). However, mono is taking up 1GB of memory and each clang invokation can take up to 1.5GB memory as well. With my 4 cores, it quickly filled my memory, which in turned cause Linux’s OOM killer to kill clang, hence the error message.

You can add this line:

<MaxProcessorCount>1</MaxProcessorCount>

to Engine/Saved/UnrealBuildTool/BuildConfiguration.xml to disallow parallel builds (or limit the number of concurrent builds based on your available memory. I used 2).

See Engine/Programs/UnrealBuildTool/BuildConfiguration.xml for further instructions on how to change configuration.

MaxProcessorCount = 1 or 2 doesn’t help. Still no UE4Editor.

...
Parsing headers for ShaderCompileWorker
  Running UnrealHeaderTool ShaderCompileWorker "/home/xubuntu/Data/UnrealEngine-release/Engine/Intermediate/Build/Linux/x86_64-unknown-linux-gnu/ShaderCompileWorker/Development/UnrealHeaderTool.manifest" -LogCmds="loginit warning, logexit warning, logdatabase error"
Using binned.
[2015.10.26-12.48.49:952][  0]LogModuleManager:Warning: ModuleManager: Unable to load module 'PakFile' because the file '/home/xubuntu/Data/UnrealEngine-release/Engine/Binaries/Linux/' was not found.
[2015.10.26-12.48.49:952][  0]LogModuleManager:Warning: ModuleManager: Unable to load module 'SandboxFile' because the file '/home/xubuntu/Data/UnrealEngine-release/Engine/Binaries/Linux/' was not found.
[2015.10.26-12.48.49:952][  0]LogModuleManager:Warning: ModuleManager: Unable to load module 'StreamingFile' because the file '/home/xubuntu/Data/UnrealEngine-release/Engine/Binaries/Linux/' was not found.
[2015.10.26-12.48.49:952][  0]LogModuleManager:Warning: ModuleManager: Unable to load module 'NetworkFile' because the file '/home/xubuntu/Data/UnrealEngine-release/Engine/Binaries/Linux/' was not found.
...

So, first of all, your build problem seems to be fixed, isn’t it?

The errors that you get, I also get them but that doesn’t stop the editor from running, or any build issues. I don’t know what those are, but apparently they are not essential. If the editor doesn’t run for you, try asking another question (because your original question is about clang getting killed) and provide the complete log.

If you get a crash when running UE4Editor at 35% loading, the answer to this question could help.

If I have 8GB RAM should I care about MaxProcessorCount ?

And what if interrupt this: make UE4Editor UE4Game UnrealPak CrashReportClient ShaderCompileWorker UnrealLightmass - can I just do this command again ?

I also have 8GB of RAM. However, with the system taking it’s usual memory (less than 1GB), mono taking 1GB and each clang taking up to 1.5GB, yes, you most definitely need to care about MaxProcessorCount. That is if you have more than two CPU cores and especially if you want to do other stuff, for example have a browser open.

In theory, calling make again should work, because the files that are not compiled should not be there. However, the build system of the Unreal Engine is not standard (it doesn’t use autotools or cmake for example), so I can’t say anything about its behavior. Worse, it’s written in C# and runs under mono (which is an unofficial C# interpreter). I personally can’t trust someone who thinks writing a build system in C# is a good idea to be able to guarantee atomic build steps. In my case, I touched the files that failed to get compiled so that they would definitely be built again.

You should be able to simply re-run the command. In case you run into any problems (which would be a bug in UBT worth reporting), you can delete Engine/Intermediate directory.