Building unreal with clang 3.9.0

I am on Ubuntu 14.04 LTS. I just pulled the UnrealEngine source code and I am on the release branch. Typing

./GenerateProjectFiles.sh

yields

UnrealBuildTool Exception: ERROR: This version of the Unreal Engine can only be compiled with clang 3.7, 3.6 and 3.5. clang 3.9.0 may not build it - please use a different version.

Is it possible to change somewhere in the code so I can try building Unreal with clang 3.9? I am using clang 3.9 for my other projects so downgrading it is not an option for me.

You can edit LinuxToolChain.cs and whitelist your version of clang (or remove the check altogether) in LinuxToolChain constructor.

Thanks a lot for the pointer, now it passes the check but unfortunately there is compilation errors when compiled with clang 3.9.0. Hopefully this will get updated sometimes soon!

Unfortunately, clang 3.9.0 is not supported for 4.12, so I don’t think the release will be updated.

Arch just upgrade to Clang 3.9. Is Clang 3.9 still unsupported?

Im running Arch and I’m getting this same problem from the AUR package… So yeah

According to UE4.15’s script (https://github.com/EpicGames/UnrealEngine/blob/4.15.0-release/Engine/Source/Programs/UnrealBuildTool/Linux/LinuxToolChain.cs#L23), Clang 3.9 should be fine. But you may have an issue with third parties, see https://github.com/EpicGames/UnrealEngine/pull/2788

I am using UnReal Engine 4 version 4.15.1

I have been using openSuSE Tumbleweed… My clang must have recently been upgraded to version 4.0.0

To rid myself of the message about the wrong version of the clang compiler I changed the line
string[] ClangNames = { “clang++”, “clang+±3.9”, “clang+±3.8”, “clang+±3.7”, “clang+±3.6”, “clang+±3.5” };

to
string[] ClangNames = { “clang++”, “clang+±4.0”, “clang+±3.9”, “clang+±3.8”, “clang+±3.7”, “clang+±3.6”, “clang+±3.5” };

and even more importantly the line of code reading
else if ((CompilerVersionMajor * 10 + CompilerVersionMinor) > 39 || (CompilerVersionMajor * 10 + CompilerVersionMinor) < 35)

to
else if ((CompilerVersionMajor * 10 + CompilerVersionMinor) > 40 || (CompilerVersionMajor * 10 + CompilerVersionMinor) < 35)

I know it is a hack… but the hack does not seem to be causing any issues ; everything is working properly … however when I fired off the editor a lot of stuff seem to be automatically be rebuilding with the prefix "Fixing "