Unreal Engine 4.5 Linux Editor Build Failing

I’m doing a clean build of Unreal Engine 4.5 on Ubuntu 14.10 and it’s failing for some reason. I think the problem might be that it’s trying to compile with gcc instead of clang.

$ echo "$CC"
/usr/bin/clang-3.5
$ echo "$CXX"
/usr/bin/clang++-3.5
$ make ShaderCompileWorker
Engine/Build/BatchFiles/Linux/Build.sh ShaderCompileWorker Linux Development 
Building ShaderCompileWorker...
Using gcc version '4.9.1' (string), 4 (major), 9 (minor), 1 (patch)
Building UnrealHeaderTool...
Using gcc version '4.9.1' (string), 4 (major), 9 (minor), 1 (patch)
Performing 14 actions (4 in parallel)
[2/14] Compile Module.Core.1_of_5.cpp
[1/14] Compile Module.Core.2_of_5.cpp
[4/14] Compile Module.Core.5_of_5.cpp
[3/14] Compile Module.Core.4_of_5.cpp

......


At global scope:
cc1plus: error: unrecognized command line option "-Wno-ignored-attributes" [-Werror]
cc1plus: error: unrecognized command line option "-Wno-logical-op-parentheses" [-Werror]
cc1plus: all warnings being treated as errors
At global scope:
cc1plus: error: unrecognized command line option "-Wno-ignored-attributes" [-Werror]
cc1plus: error: unrecognized command line option "-Wno-logical-op-parentheses" [-Werror]
cc1plus: all warnings being treated as errors
-------- End Detailed Actions Stats -----------------------------------------------------------
ERROR: UBT ERROR: Failed to produce item: /home/joshua-anderson/programming/UnrealEngine/Engine/Binaries/Linux/libUnrealHeaderTool-Core.so
Cumulative action seconds (4 processors): 0,00 building projects, 65,66 compiling, 0,00 creating app bundles, 0,00 generating debug info, 0,00 linking, 0,00 other
UBT execution time: 22,09 seconds
UnrealHeaderTool failed for target 'ShaderCompileWorker' (platform: Linux, module info: /home/joshua-anderson/programming/UnrealEngine/Engine/Intermediate/Build/Linux/x86_64-unknown-linux-gnu/ShaderCompileWorker/Development/UnrealHeaderTool.manifest).
Makefile:278: recipe for target 'ShaderCompileWorker' failed
make: *** [ShaderCompileWorker] Error 2

Anything I can do other than set $CC and $CXX to force cmake to use clang?

If you are still unable to compile, try removing GCC altogether for the time being or reinstalling Clang 3.3. I am not sure why the tool chain is not picking Clang up as this error did not happen for others.

Toolchain will only pick up clang, not clang-3.5

Yeah, the engine cannot be compiled with gcc at the moment - this is disabled in newer UBT. However, it won’t pick up clang+±3.5, but clang++. For now I suggest making a symlink or (better) adding clang to update-alternatives