Linux Build Core.h file not found

Hello Everyone,

Basically when I build the Unreal Editor, on Linux, an error occurs that the file Core.h is missing.


Context:

Unreal Engine: 4.11

OS: Ubuntu 14.04

IDE: Qt Creator v 3.6.0; Qt v 5.5.1

Unreal Engine has been successfully built on Linux, following the wiki guide (A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums)

Qt Creator plugin has been built (GitHub - fire/QtCreatorSourceCodeAccess) and “Salamander Rake’s” video guide has been followed (- YouTube).

I’m following the tutorial on the Github - Epic - UnrealEngine 4.11 - Readme: https://github.com/EpicGames/UnrealEngine/blob/4.11/Engine/Build/BatchFiles/Linux/README.md

I’m using this tutorial to import the generated project file (UE4.pro) into an IDE, in this case Qt Creator, but I do not believe the IDE is the cause of the problem below.


Objective

Establish an environment to develop a modified version of the Unreal Engine (modify the source code on github) on and for Linux.


Problem

When I try to follow the following steps, from the tutorial on the Github Readme (as mentioned above):

"
If you intend to develop the editor, you can build a debug configuration of it:

make UE4Editor-Linux-Debug

"

An error occurs.


Compile Output/Error

Running steps for project UE4…
Starting: “/usr/bin/make”



In file included from …/UnrealEngine/Engine/Source/Developer/AITestSuite/Private/AITestSuite.cpp:3:
…/UnrealEngine/Engine/Source/Developer/AITestSuite/Private/AITestSuitePrivatePCH.h:3:10: fatal error: ‘Core.h’ file not found
#include “Core.h”
^
1 error generated.
make: *** [AITestSuite.o] Error 1
16:56:43: The process “/usr/bin/make” exited with code 2.

Full Compile Output in attachment.

Complete Error Log


What I have Found

There are various Core.h files located in the UnrealEngine Directory:

  1. /UnrealEngine/Engine/Source/Runtime/Core/Public/Core.h
  2. /UnrealEngine/Engine/Source/ThirdParty/llvm/3.5.0/include/llvm-c/Core.h
  3. /UnrealEngine/Engine/Source/ThirdParty/llvm/3.6.2/include/llvm-c/Core.h
  4. /UnrealEngine/Engine/Source/ThirdParty/SpeedTree/SpeedTreeSDK-v7.0/Include/Core/Core.h

Similar Questions (but answers not applicable to this problem)

  1. Core.h missing in first Linux project - C++ - Unreal Engine Forums
  2. qt linux core.h not found - C++ - Unreal Engine Forums

The answer offered here was to switch to the UnrealEngine 4.8 branch, but I doubt downgrading would be the best solution here.


If there is any additional information that must be provided, please let me know and I will provide it.

Thank you very much for your inputs.

Ivan

I have partly resolved the error. I say partly resolved because I know how to fix the error and work around it, but I do not know exactly why it is caused or how (in detail) it is fixed.

From my tests, what causes this error is the Clean Step Argument ARGS=-Clean. I do not know why this causes the problem, but it does. This step was executed when I did a rebuild (which executes a clean and build, file by file).

The rebuild in itself does not cause the error, but the error comes from this specific Clean Step Argument ARGS=-Clean.


How to Fix the Error

  1. Change the Clean Argument to something other than ARGS=-Clean. Can be changed to, for example: UE4Editor-Linux-Debug ARGS="-clean"
  2. Change the build step to have the following Make Argument: UE4Editor-Linux-Debug
  3. Perform a build or a rebuild step

How To Work Around The Error

Perform a Clean Step with the following arguments (instead of ARGS=-clean): UE4Editor-Linux-Debug ARGS="-clean"

This did a successful clean and the missing Core.h error did not appear during the clean process.


Possible Indications of How the Error is Fixed

During the build step (with Make Argument: UE4Editor-Linux-Debug) an interesting line appears - Fixing libUE4Editor-AITestSuite-Linux-Debug.so

This may be why the AITestSuitePrivatePCH.h file, which has an include for the Core.h, is fixed.

To verify this argument I have checked the following files (AITestSuitePrivatePCH.h, AITestSuite.h, AITestSuite.cpp) after the missing Core.h error appears and after the error is resolved, but there are no changes in these documents, so I cannot confirm that the fixing of libUE4Editor-AITestSuite-Linux-Debug.so during the build step is what resolved the error.

The Complete Compile Output Log (of the build step which fixes the error) is in attachment.

Full Log - Fix Missing Core.h file

I hope this may help someone who comes about this error.

Ivan