x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Linux UE4 Build Precompiled Header Fatal Error

Hello Everyone,

Basically when I build the Unreal Editor, on Linux, two errors occur: file Core.h is missing and files have been modified since a precompiled header was built.

The first error, the missing Core.h file, was asked in another UE4 AnswerHub question - https://answers.unrealengine.com/questions/412038/linux-build-coreh-file-not-found.html - and therefore the focus of this question will be on the second error, the precompiled header.

I believe these errors are not interrelated.


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 (https://wiki.unrealengine.com/Building_On_Linux)

Qt Creator plugin has been built (https://github.com/fire/QtCreatorSourceCodeAccess) and "Salamander Rake's" video guide has been followed (https://www.youtube.com/watch?v=RnINgMbJx5Q).

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):

"

Alternatively, build the following targets:

make CrashReportClient ShaderCompileWorker UnrealLightmass UnrealPak UE4Editor

"

Two errors occur.


Compile Output/Error

make argument: CrashReportClient

fatal error: file '/usr/include/x86_64-linux-gnu/asm/unistd.h' has been modified since the precompiled header '/home/mynewuser/Downloads/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/CrashReportClient/Development/Core/CorePrivatePCH.h.gch' was built note: please rebuild precompiled header '/home/mynewuser/Downloads/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/CrashReportClient/Development/Core/CorePrivatePCH.h.gch'

make: *** [CrashReportClient] Error 5 16:40:46: The process "/usr/bin/make" exited with code 2. Error while building/deploying project UE4 (kit: Unreal Engine 4_Kit) When executing step "Make"


This error is directly an effect of the make arguments. If I remove the CrashReportClient from the make argument (Therefore leaving it to be: ShaderCompileWorker UnrealLightmass UnrealPak UE4Editor UE4Game), the error which appears is:

make argument: ShaderCompileWorker

fatal error: file '/usr/include/linux/sysctl.h' has been modified since the precompiled header '/home/mynewuser/Downloads/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/ShaderCompileWorker/Development/Core/CorePrivatePCH.h.gch' was built note: please rebuild precompiled header '/home/mynewuser/Downloads/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/ShaderCompileWorker/Development/Core/CorePrivatePCH.h.gch'

make: *** [ShaderCompileWorker] Error 5 18:16:33: The process "/usr/bin/make" exited with code 2. Error while building/deploying project UE4 (kit: Unreal Engine 4_Kit) When executing step "Make"


For Completeness, here are the other errors that appear for the other make arguments:


make argument: UnrealLightmass

fatal error: file '/usr/include/linux/sysctl.h' has been modified since the precompiled header '/home/mynewuser/Downloads/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/UnrealLightmass/Development/Core/CorePrivatePCH.h.gch' was built note: please rebuild precompiled header '/home/mynewuser/Downloads/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/UnrealLightmass/Development/Core/CorePrivatePCH.h.gch'

make: *** [UnrealLightmass] Error 5 18:29:51: The process "/usr/bin/make" exited with code 2. Error while building/deploying project UE4 (kit: Unreal Engine 4_Kit) When executing step "Make"


make argument: UnrealPak

fatal error: file '/usr/include/linux/version.h' has been modified since the precompiled header '/home/mynewuser/Downloads/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/UnrealPak/Development/Core/CorePrivatePCH.h.gch' was built note: please rebuild precompiled header '/home/mynewuser/Downloads/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/UnrealPak/Development/Core/CorePrivatePCH.h.gch'

make: *** [UnrealPak] Error 5 18:31:20: The process "/usr/bin/make" exited with code 2. Error while building/deploying project UE4 (kit: Unreal Engine 4_Kit) When executing step "Make"


make argument: UE4Game

fatal error: file '/usr/include/linux/version.h' has been modified since the precompiled header '/home/mynewuser/Downloads/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/UE4/Development/Core/CorePrivatePCH.h.gch' was built note: please rebuild precompiled header '/home/mynewuser/Downloads/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/UE4/Development/Core/CorePrivatePCH.h.gch'

make: *** [UE4Game] Error 5 18:33:41: The process "/usr/bin/make" exited with code 2. Error while building/deploying project UE4 (kit: Unreal Engine 4_Kit) When executing step "Make"


These errors do not occur only when the make argument is solely: UE4Editor

These errors are occur independent of being single (i.e. make argument: UnrealPak) or composed arguments (i.e. make argument: UnrealPak UE4Game ...).

Full Compile Output of one of these errors is in attachment. I believe there isn't a reason to put all logs here because what changes between them are the lines of error shown above.

Full Compile Output Error Log


Similar Questions (but answers not applicable to this problem)

  1. https://forums.mageia.org/en/viewtopic.php?f=8&t=10468

  2. http://stackoverflow.com/questions/14793329/fixing-file-project-pch-has-been-modified-since-the-precompiled-header-was-bui

Obs 1 - The answer offered here was to switch hard drives, but I doubt this is the solution because in the case presented the developer upgraded to an 120GB HDD and my HD is 500GB.

Obs 2 - This one seems like a possible solution, but I would need to know which folder cache to empty out. If possible I would like to use the ARGS = "-clean" argument because it deletes almost all of the editor, as shown here - https://answers.unrealengine.com/questions/403173/linux-qt-creator-hanging-when-debugging.html


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

Product Version: UE 4.11
Tags:
more ▼

asked Apr 28 '16 at 03:55 PM in Linux

avatar image

Ivan_aa
101 4 8 19

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

I have resolved the error. Thank you RCL for your answer, I had to modify a bit of your suggestion to come to the solution to my problem.


Precompiled Header Files Error [Solution]

As RCL mentioned, precompiled header files were kept from previous build and system header files were built after this, which caused the error.

The solution is to Clean the respective CorePrivatePCH.h.gch files from each of the folders whos make steps caused errors (in this case: CrashReportClient, ShaderCompileWorker, UnrealLightmass, UnrealPak, UE4Game). This clean process can be done in two ways, either manually deleting the files or executing a clean step.

Both options are explained below.

There may be more options available, and even better ones, but these are the two I have come up with so far. I prefer Option one because of the less time that it takes.


Option 1 - Manually Deleting Respective CorePrivatePCH.h.gch files

Make Argument (which caused error) = File to Delete to fix error

CrashReportClient = /UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/CrashReportClient/Development/Core/CorePrivatePCH.h.gch

ShaderCompileWorker = /UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/ShaderCompileWorker/Development/Core/CorePrivatePCH.h.gch

UnrealLightmass = /UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/UnrealLightmass/Development/Core/CorePrivatePCH.h.gch

UnrealPak = /UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/UnrealPak/Development/Core/CorePrivatePCH.h.gch

UE4Game = /UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/UE4/Development/Core/CorePrivatePCH.h.gch

After deleting these files, execute the make step (build) with the following arguments: CrashReportClient ShaderCompileWorker UnrealLightmass UnrealPak UE4Game

Files will now be compiled without any errors.

Time to Build = aproximately 5min.


Option 2 - Executing Clean Steps to delete CorePrivatePCH.h.gch files

Note: This step will delete many files, more than just the needed files, so it will therefore take longer to build afterwards.

Clean Step Arguments: CrashReportClient ShaderCompileWorker UnrealLightmass UnrealPak UE4Game ARGS="-clean"

After deleting these files, execute the make step (build) with the following arguments: CrashReportClient ShaderCompileWorker UnrealLightmass UnrealPak UE4Game

Time to Build = aproximately 37min.


Thank you again RCL for your answer, with it I was able to adjust it to my specific error and come to a specific resolution.

Ivan

more ▼

answered Apr 29 '16 at 02:55 PM

avatar image

Ivan_aa
101 4 8 19

avatar image icomputo Apr 11 '17 at 02:27 AM

gracias, UE 4.15.1 in openSUSE 42.2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

You were probably building those targets in the past, kept generated precompiled header files (which include system headers), and have since updated the system headers (during e.g. system update). This means that you now need to build from scratch - either by passing ARGS=-clean or by deleting Intermediate subdirectory(-ies) manually.

more ▼

answered Apr 28 '16 at 04:05 PM

avatar image

RCL STAFF
2.7k 59 6 88

avatar image Ivan_aa Apr 28 '16 at 06:23 PM

Hello RCL.

First of all, thank you for your input.

I have tried passing ARGS=-clean, but the missing Core.h error I mentioned above and also in another Answer Hub Question ( https://answers.unrealengine.com/questions/412038/linux-build-coreh-file-not-found.html ) appears.

In attachment is the Compile Output Log.

Clean Error Log

Do you know a solution to this matter?

Thank you for your help.

Ivan

avatar image RCL STAFF Apr 28 '16 at 07:55 PM

Could you please that your source directory is complete and Core.h file is indeed there? Alternatively, could you check out the repository in a new place and attempt to build the same targets from scratch?

avatar image Ivan_aa Apr 28 '16 at 11:16 PM

Thank you for your reply and inputs.

I have checked the source directory, it is complete, and the Core.h files are in 4 locations (before and after this error occurs), are also the same before and after the error appears:

  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

I do not know why this was caused, but I did find a solution to the error though, see the answer below.

avatar image Ivan_aa Apr 29 '16 at 02:59 PM

I have partly resolved the missing Core.h error. I have posted the answer here - https://answers.unrealengine.com/questions/412038/linux-build-coreh-file-not-found.html#answer-412881

Thank you again RCL for your answer and help.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

The precompiled issues appears either when you:

  1. Update your kernel headers (Updates of your distro).

  2. Update to newer version of Unreal Engine.

In both cases I would recommend remove your Engine/Intermediate folder. That will include you to recompile everything from the beginning which you will have to anyway when you are developing C++ projects with UE4. Sooner or later it will cause an compile error again. I wouldn't mess around with removing only specific subfolders in the Engine/Intermediate. Yes you should recompile everything again. You might consider not to update your kernel to frequent.

more ▼

answered May 02 '16 at 01:09 PM

avatar image

Yaakuro
314 13 7 19

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question