Occuring errors while trying to build ROOT from source

Hello!

I was trying to build ROOT from source. While making the cmake command, some errors occured:

– The C compiler identification is GNU 7.4.0
– The CXX compiler identification is GNU 7.4.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
– Detecting C compile features
– Detecting C compile features - 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
– Detecting CXX compile features
– Detecting CXX compile features - done
– Found Git: /usr/bin/git (found version “2.17.1”)
– ROOT default compression algorithm: zlib
– Found GCC. Major version 7, minor version 7
– Performing Test HAS_CXX11
– Performing Test HAS_CXX11 - Success
– Looking for pthread.h
– Looking for pthread.h - found
– Looking for pthread_create
– Looking for pthread_create - not found
– Looking for pthread_create in pthreads
– Looking for pthread_create in pthreads - not found
– Looking for pthread_create in pthread
– Looking for pthread_create in pthread - found
– Found Threads: TRUE
– Found a 64bit system
– Found GNU compiler collection
– Performing Test GLIBCXX_USE_CXX11_ABI
– Performing Test GLIBCXX_USE_CXX11_ABI - Success
– ROOT Platform: linux
– ROOT Architecture: linuxx8664gcc
– Build Type: RelWithDebInfo
– Compiler Flags: -Wno-implicit-fallthrough -Wno-noexcept-type -pipe -m64 -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -pthread -std=c++11
– Looking for ZLib
– Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
– Zlib not found. Switching on builtin_zlib option
– Looking for Freetype
– Could NOT find Freetype (missing: FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS)
– FreeType not found. Switching on builtin_freetype option
– Building freetype version 2.6.1 included in ROOT itself
– Looking for PCRE
– Could NOT find PCRE (missing: PCRE_INCLUDE_DIR PCRE_PCRE_LIBRARY)
– PCRE not found. Switching on builtin_pcre option
– Building pcre version 8.37 included in ROOT itself
– Looking for LZMA
– LZMA not found. Switching on builtin_lzma option
– Building LZMA version 5.2.1 included in ROOT itself
– Looking for xxHash
– Could NOT find xxHash (missing: xxHash_LIBRARY xxHash_INCLUDE_DIR)
– xxHash not found. Switching on builtin_xxhash option
– Looking for LZ4
– Could NOT find LZ4 (missing: LZ4_LIBRARY LZ4_INCLUDE_DIR)
– LZ4 not found. Switching on builtin_lz4 option
– Looking for X11
CMake Error at /usr/share/cmake-3.10/Modules/FindX11.cmake:429 (message):
Could not find X11
Call Stack (most recent call first):
cmake/modules/SearchInstalledSoftware.cmake:9 (_find_package)
cmake/modules/SearchInstalledSoftware.cmake:271 (find_package)
CMakeLists.txt:150 (include)

– Configuring incomplete, errors occurred!
See also “/home/lmk/Downloads/root-6.16.00/obj/CMakeFiles/CMakeOutput.log”.
See also “/home/lmk/Downloads/root-6.16.00/obj/CMakeFiles/CMakeError.log”.

I am very new to ROOT and I dont really know how to fix this, so help is very much appreciated!
Thank you!

This probably means that you are missing some dependencies for X11.

To find which dependencies, look at here.