Redeclaration when compiling UE with Linux

[Gnomebuntu 14.04]

When compiling 4.5 preview from source, I can run GenerateProjectFiles.sh perfectly after I cloned it from GitHub.

But when I try:
make ShaderCompileWorker UnrealLightmass UE4Editor

I get the following Error:


[…]

[5/17] Compile Module.Core.3_of_5.cpp

[3/17] Compile Module.Core.4_of_5.cpp

[1/17] Compile Module.Core.2_of_5.cpp

[4/17] Compile Module.Core.5_of_5.cpp

[2/17] Compile Module.Core.1_of_5.cpp

In file included from Runtime/Core/Public/HAL/PlatformIncludes.h:20:0,
from /home//Development/Cpp/UnrealEngine/Engine/Source/Runtime/Core/Public/Core.h:19,
from /home//Development/Cpp/UnrealEngine/Engine/Intermediate/Build/Linux/x86_64-unknown-linux-gnu/UnrealHeaderTool/Development/Core/Module.Core.3_of_5.cpp:2:
Runtime/Core/Public/GenericPlatform/GenericPlatformMath.h:537:60: error:

redeclaration ‘static constexpr T FGenericPlatformMath::Abs(T) [with T = float]’ differs in ‘constexpr’
FORCEINLINE float FGenericPlatformMath::Abs( const float A )

[…]


Sorry for posting logs in this but the attatchment sizle limit is too small for the actual .log files created by UE

Please install clang 3.3 or clang 3.5. You apparently only have gcc installed, and while UBT tries to use that compiler when nothing else is available, we don’t reguarly check and maintain gcc compilation, hence the errors.

Thank you, fixed it right away! A simple sudo apt-get install clang-3.5 did the job.

I thought the GenerateProjectFiles.sh took care of the dependencies, which is why I didnt check my clang version. Great advice, thanks

We need to extend GPF.sh to handle that case better. It doesn’t prompt you to install clang precisely because you can compile with both 3.3 and 3.5.