Linux unable to build UE4Editor

I am unable to build UE4Editor. I get the following build error when building on both Ubuntu 14.04 and 16.04 even though I followed the instructions on the README:

[1392/1436] Link (ld) libUE4Editor-UE4Game.so
[1393/1436] Link (ld) libUE4Editor-XGEController.so
[1394/1436] Link (ld) libUE4Editor-Advertising.so
[1395/1436] Link (ld) libUE4Editor-IPC.so
ERROR: UBT ERROR: Failed to produce item: /home/vinitha/workspaces/UnrealEngine/Engine/Binaries/Linux/libUE4Editor-Renderer.so
Total build time: 2073.57 seconds (Local executor: 0.00 seconds)
Makefile:188: recipe for target 'UE4Editor' failed
make: *** [UE4Editor] Error 5

On Ubuntu 14.04 I used clang 3.5 and on ubuntu 16.04 I used clang 3.8.