Compiling UE4.5: Silent Fail

This morning I forked and checked out (again) Unreal Engine source code branch 4.5
Trying to compile running ./GenerateProjectFiles.sh I hit a silent fail.

I tried to freshly check out the source code many times. Nothing changed.

After fixing some missing dependencies I found out by looking at Engine/Build/BatchFiles/Linux/BuildThirdParty.log that rm couldn’t delete some build files. I solved giving the script sudo privileges.

Right now I am at this point

keru@keru-G73 ~/Documenti/gitDocuments/UnrealEngine/UnrealEngine $ sudo OAUTH_TOKEN=$TokenHere ./GenerateProjectFiles.sh 
[sudo] password for keru: 


Github build
Checking / downloading the latest archives

Asset Optional.zip up to date
Asset Required_1of2.zip up to date
Asset Required_2of2.zip up to date

All assets are up to date, not unpacking zip files again.

Building ThirdParty libraries
==> BuildLND
keru@keru-G73 ~/Documenti/gitDocuments/UnrealEngine/UnrealEngine $ 

Still no makefile is generated.
Looking at Engine/Build/BatchFiles/Linux/BuildThirdParty.log I can’t understand where the problem is.

building LinuxNativeDialogs
+ cd Source/ThirdParty/LinuxNativeDialogs/UELinuxNativeDialogs
+ rm -rf build
+ mkdir build
+ cd build
+ cmake ..
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is Clang 3.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.26") 
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found
-- checking for module 'freetype2'
--   found freetype2, version 17.1.11
-- Found Freetype: /usr/lib/x86_64-linux-gnu/libfreetype.so (found version "17.1.11") 
-- Found GTK2_GTK: /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so  
-- checking for module 'gtk+-3.0'
--   found gtk+-3.0, version 3.10.8
-- checking for module 'sdl2'
--   found sdl2, version 2.0.2
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so  
-- SDL2 found
-- Qt4 found
SDL2 found SDL2
-- GTK2 found
SDL2 found SDL2
-- GTK3 found
SDL2 found SDL2
-- Configuring done
-- Generating done
-- Build files have been written to: /home/keru/Documenti/gitDocuments/UnrealEngine/UnrealEngine/Engine/Source/ThirdParty/LinuxNativeDialogs/UELinuxNativeDialogs/build
+ make -j4
Scanning dependencies of target qt4dialog
[ 11%] Building CXX object CMakeFiles/qt4dialog.dir/src/qtdialog.cpp.o
Scanning dependencies of target gtk2dialog
[ 22%] Scanning dependencies of target gtk3dialog
Building C object CMakeFiles/gtk2dialog.dir/src/gtkdialog.c.o
[ 33%] Building C object CMakeFiles/gtk3dialog.dir/src/gtkdialog.c.o
Linking C shared library libgtk3dialog.so
Linking C shared library libgtk2dialog.so
Linking CXX shared library libqt4dialog.so
[ 33%] [ 33%] Built target gtk3dialog
Built target gtk2dialog
Scanning dependencies of target gtk3test
Scanning dependencies of target gtk3sdltest
make[2]: ***  Nessuna regola per generare l'obiettivo "/usr/lib/x86_64-linux-gnu/libGL.so", necessario per "gtk3sdltest".  Arresto.
make[2]: *** Attesa per i processi non terminati....
[ 55%] [ 55%] Building CXX object CMakeFiles/gtk3test.dir/src/dialogtest.cpp.o
Building CXX object CMakeFiles/gtk3sdltest.dir/src/sdl2test.cpp.o
[ 55%] Built target qt4dialog
Scanning dependencies of target gtk2test
Scanning dependencies of target gtk2sdltest
make[2]: ***  Nessuna regola per generare l'obiettivo "/usr/lib/x86_64-linux-gnu/libGL.so", necessario per "gtk2sdltest".  Arresto.
make[2]: *** Attesa per i processi non terminati....
[ 66%] [ 77%] Building CXX object CMakeFiles/gtk2test.dir/src/dialogtest.cpp.o
Building CXX object CMakeFiles/gtk2sdltest.dir/src/sdl2test.cpp.o
Linking CXX executable gtk3test
Linking CXX executable gtk2test
[ 77%] Built target gtk3test
Scanning dependencies of target qt4sdltest
make[2]: ***  Nessuna regola per generare l'obiettivo "/usr/lib/x86_64-linux-gnu/libGL.so", necessario per "qt4sdltest".  Arresto.
make[2]: *** Attesa per i processi non terminati....
[ 88%] Building CXX object CMakeFiles/qt4sdltest.dir/src/sdl2test.cpp.o
[ 88%] Built target gtk2test
Scanning dependencies of target qt4test
[100%] Building CXX object CMakeFiles/qt4test.dir/src/dialogtest.cpp.o
Linking CXX executable qt4test
make[1]: *** [CMakeFiles/gtk3sdltest.dir/all] Errore 2
make[1]: *** Attesa per i processi non terminati....
make[1]: *** [CMakeFiles/gtk2sdltest.dir/all] Errore 2
[100%] Built target qt4test
make[1]: *** [CMakeFiles/qt4sdltest.dir/all] Errore 2
make: *** [all] Errore 2

Can someone help me to understand where my problem is?

What does it mean *** No rule to generate the object "/usr/lib/x86_64-linux-gnu/libGL.so", needed for "gtk2sdltest". Stopped.?

File /usr/lib/x86_64-linux-gnu/libGL.so already exists!

Also Engine/Source/ThirdParty/LinuxNativeDialogs/UELinuxNativeDialogs/build/CMakeFiles/CMakeError.log contains nothing interesting

Which other log files may contain something useful?

Oh… I almost forgot. I’m compiling on Linux Mint 17 Qiana, Cinnamon DE (Ubuntu trusty based system)

File /usr/lib/x86_64-linux-gnu/libGL.so already exists!

Yes, it exists but it was a broken simlink.

I fixed it and now this step builds successfully.