Clang 3.7 and Clang 4.0

Hello,
i have UE4.11 and every time i opening it its asking for:

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

i know how to fix it but i’ll need to remove clang 4.0 and it’ll work but i have other applications that working on clang 4.0 .
now my question is can i do that unreal engine by default will run on clang 3.7 and other programs will run on clang 4.0 ?

These days multiple clang versions can be installed side by side. If you install clang-3.7 on the machine, UBT will be able to pick it up, while you can still be able to use other versions.

then why ue4 keeping give this error:

how can i fix that ? because UBT not able to pick it up.

UBT tries to use clang++ first, and only then clang+±3.7 if the former is not available. Either update alternatives to have clang++ point to 3.7, or remove clang++ altogether (leaving clang+±3.7 and clang+±4.0 intact) or update UBT code to change the order of compilers tried here: https://github.com/EpicGames/UnrealEngine/blob/4.11/Engine/Source/Programs/UnrealBuildTool/Linux/LinuxToolChain.cs#L23

thank you! i’ve managed to fix it by these commands (For Those who have the same issue):

sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.7 100
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.7 100