You are not logged in.

#1 2017-03-03 22:23:00

qwattash
Member
Registered: 2014-06-18
Posts: 2

Building Unreal Engine 4 from sources (git) - compilation error

Hi everyone,

I'm trying to build UE4 from sources (I know that there is an AUR package but I want to have a devel build and change branches and so on).

Following the instructions, I cloned the repo, patched the Setup script that forces to use clang35, if you ask it's because I don't really want to downgrade my clang just for unreal engine, plus the AUR package seems to be using the latest clang, so I did not see really a reason for that.
I have all the other dependencies installed.

The build goes on for some of the tools (e.g. UE4Editor builds without complaining) but for a bunch of tools this error:

Building ShaderCompileWorker...
Using clang version '3.9.1' (string), 3 (major), 9 (minor), 1 (patch)
Creating makefile for ShaderCompileWorker (no existing makefile)
Using bundled libc++ standard C++ library.
/home/qwattash/git/UnrealEngine/Engine/Source/Runtime/Core/Private/Async/Async.cpp(1): error: Expected Async.h to be first header included.
/home/qwattash/git/UnrealEngine/Engine/Source/Runtime/Core/Private/Containers/LockFreeList.cpp(1): error: Expected LockFreeList.h to be first header included.
/home/qwattash/git/UnrealEngine/Engine/Source/Runtime/Core/Private/Containers/StackTracker.cpp(1): error: Expected StackTracker.h to be first header included.
/home/qwattash/git/UnrealEngine/Engine/Source/Runtime/Core/Private/Containers/Ticker.cpp(1): error: Expected Ticker.h to be first header included.
/home/qwattash/git/UnrealEngine/Engine/Source/Runtime/Core/Private/Containers/Union.cpp(1): error: Expected Union.h to be first header included.
... (omitted ndr)

Although if I look into one of the cpp files, say Async.ccp, I find that Async.h is indeed included:

// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.                                                                                                              
                                                                                                                                                                          
#include "Async/Async.h"
/* stuff below */

I am not sure what the error is supposed to mean, I never encountered it before.
Did anybody have the same problem or knows what this means?

Thank you!

Offline

#2 2017-03-03 22:58:14

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Building Unreal Engine 4 from sources (git) - compilation error

Moving to AUR Issues...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2017-03-08 04:52:07

Jristz
Member
From: America/Santiago
Registered: 2011-06-11
Posts: 1,022

Re: Building Unreal Engine 4 from sources (git) - compilation error

maybe decapitalize to async ?

also chech if these headers exist on your system


Well, I suppose that this is somekind of signature, no?

Offline

#4 2017-03-08 20:31:19

qwattash
Member
Registered: 2014-06-18
Posts: 2

Re: Building Unreal Engine 4 from sources (git) - compilation error

Thanks, the header file name and paths seem to be correct.

After some more poking I think that this is some kind of problem with an UnrealEngine feature that they added in 4.15.
The thing is called Include Whant You Use (IWYU) and I think that there is something going wrong with the UnrealHeaderTool/UnrealBuildTool magic that checks that the first included header actually matches some expected value (because adding hidden dependencies between headers and source files seems a fun thing to do..).

The quick fix is disabling IWYU in the build configuration, although it shouldn't be needed. I'm trying to sort it out on the UnrealEngine answerhub, but for now I still didn't find the root cause.

Other suggestions are welcome!

Offline

Board footer

Powered by FluxBB