# Compiling root v6.12.04 on CentOS 6.6 using gcc v4.9.2 and cmake v3.10.2

**URL:** <https://root-forum.cern.ch/t/compiling-root-v6-12-04-on-centos-6-6-using-gcc-v4-9-2-and-cmake-v3-10-2/27708>\
**Category:** ROOT\
**Created:** [January 26, 2018, 12:59am UTC](https://root-forum.cern.ch/t/compiling-root-v6-12-04-on-centos-6-6-using-gcc-v4-9-2-and-cmake-v3-10-2/27708 "2018-01-26T00:59:28Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexdongli](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/df705f/32.png) [@alexdongli](https://root-forum.cern.ch/u/alexdongli)\
**Post date:** [January 26, 2018, 12:59am UTC](https://root-forum.cern.ch/t/compiling-root-v6-12-04-on-centos-6-6-using-gcc-v4-9-2-and-cmake-v3-10-2/27708/1 "2018-01-26T00:59:28Z")

</div>

Dear root support,

I have been trying to install root v6.12.04 on CentOS v6.6, but failed. We used gcc v4.9.2, and cmake v3.10.2.  
The commands and errors (the first and end parts as the full error msg is tooo long) are as below.  
I would greatly appreciate it if you could help. Thanks!

Alex.

Commands:

```auto
/opt/share/cmake/3.10.2/usr/local/bin/cmake -D CMAKE_INSTALL_PREFIX=/opt/share/root/6.12.04 -D CMAKE_CXX_COMPILER=/mnt/share/rh/6/prod/bin/gcc ../root-6.12.04

```

output:

```bash
-- The C compiler identification is GNU 4.4.7
-- The CXX compiler identification is GNU 4.9.2
-- 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: /mnt/share/rh/6/prod/bin/gcc
-- Check for working CXX compiler: /mnt/share/rh/6/prod/bin/gcc -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found GCC. Major version 4, minor version 4
-- 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 - Failed
-- ROOT Platform: linux
-- ROOT Architecture: linuxx8664gcc
-- Build Type: RelWithDebInfo
-- Compiler Flags: -pipe -m64 -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -fPIC -pthread -std=c++11 -O2 -g -DNDEBUG
-- Looking for ZLib
-- Found ZLIB: /usr/local/lib/libz.so (found version "1.2.8") 
-- Looking for Unuran
-- Could NOT find UNURAN (missing: UNURAN_LIBRARY UNURAN_INCLUDE_DIR) 
-- Unuran not found. Switching on builtin_unuran option
-- Looking for Freetype
-- Found Freetype: /usr/lib64/libfreetype.so (found version "2.3.11") 
-- 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 LZ4
-- LZ4 not found. Switching on builtin_lz4 option
-- Building LZ4 version v1.7.5 included in ROOT itself
-- Looking for X11
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- 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/lib64/libX11.so
-- X11_INCLUDE_DIR: /usr/include
-- X11_LIBRARIES: /usr/lib64/libSM.so;/usr/lib64/libICE.so;/usr/lib64/libX11.so;/usr/lib64/libXext.so
-- X11_Xpm_INCLUDE_PATH: /usr/include
-- X11_Xpm_LIB: /usr/lib64/libXpm.so
-- X11_Xft_INCLUDE_PATH: /usr/include
-- X11_Xft_LIB: /usr/lib64/libXft.so
-- X11_Xext_INCLUDE_PATH: 
-- X11_Xext_LIB: /usr/lib64/libXext.so
-- Could NOT find GIF (missing: GIF_LIBRARY GIF_INCLUDE_DIR) 
-- Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR) 
-- Found PNG: /usr/lib64/libpng.so (found version "1.2.49") 
-- Found JPEG: /usr/lib64/libjpeg.so  
-- Building AfterImage library included in ROOT itself
-- Looking for GSL
-- Found GSL: /usr/include (found suitable version "1.13", minimum required is "1.10") 
-- Looking for Python
-- Found PythonInterp: /mnt/share/rh/6/prod/bin/python (found version "2.7.11") 
-- Found Python interpreter version 2.7
-- Found PythonLibs: /mnt/share/rh/6/prod/lib/libpython2.7.so (found version "2.7.11") 
-- Found NUMPY: /mnt/share/rh/6/prod/lib/python2.7/site-packages/numpy/core/include (found version "1.11.2") 
-- Looking for OpenGL
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR) 
-- OpenGL (with GLU) not found. Switching off opengl option
-- Looking for gl2ps
-- Could NOT find GL2PS (missing: GL2PS_LIBRARY GL2PS_INCLUDE_DIR) 
-- gl2ps not found. Switching on builtin_gl2ps option
-- Looking for LibXml2
-- Found LibXml2: /usr/lib64/libxml2.so (found version "2.7.6") 
-- Looking for OpenSSL
-- Found OpenSSL: /usr/lib64/libcrypto.so (found version "1.0.1e") 
-- Looking for Castor
-- Could NOT find CASTOR (missing: CASTOR_shift_LIBRARY CASTOR_INCLUDE_DIR) 
-- Castor not found. Switching off castor option
-- Looking for MySQL
-- Found MYSQL: /usr/local/mysql/include  
-- Looking for Oracle
-- Oracle not found.
-- Oracle: You can specify includes: -DORACLE_PATH_INCLUDES=/usr/include/oracle/10.2.0.3/client
-- currently found includes: 
-- Oracle: You can specify libs: -DORACLE_PATH_LIB=/usr/lib/oracle/10.2.0.3/client/lib
-- currently found libs: ORACLE_LIBRARY_OCCI-NOTFOUND;ORACLE_LIBRARY_CLNTSH-NOTFOUND;ORACLE_LIBRARY_LNNZ-NOTFOUND
-- Oracle not found. Switching off oracle option
-- Looking for PostgreSQL
-- Could NOT find PostgreSQL (missing: POSTGRESQL_INCLUDE_DIR POSTGRESQL_LIBRARY) 
-- PostgreSQL not found. Switching off pgsql option
-- Looking for SQLite
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.23") 
-- Found Sqlite: /usr/include  
-- Looking for Pythia6
-- Pythia6 not found. Switching off pythia6 option
-- Looking for Pythia8
-- Could NOT find Pythia8 (missing: PYTHIA8_INCLUDE_DIR PYTHIA8_LIBRARY) 
-- Pythia8 not found. Switching off pythia8 option
-- Looking for FFTW3
-- FFTW3 not found. Set [environment] variable FFTW_DIR to point to your FFTW3 installation
-- Alternatively, you can also enable the option 'builtin_fftw3' to build FFTW3 internally'
-- For the time being switching OFF 'fftw3' option
-- Looking for CFITSIO
-- Could NOT find CFITSIO (missing: CFITSIO_INCLUDE_DIR CFITSIO_LIBRARY) 
-- CFITSIO not found. You can enable the option 'builtin_cfitsio' to build the library internally'
-- For the time being switching off 'fitsio' option
-- Looking for XROOTD
-- XROOTD not found. Set environment variable XRDSYS to point to your XROOTD installation
-- Alternatively, you can also enable the option 'builtin_xrootd' to build XROOTD internally
-- For the time being switching OFF 'xrootd' option
-- Could NOT find GFAL (missing: GFAL_INCLUDE_DIR SRM_IFCE_INCLUDE_DIR GFAL_LIBRARY) 
-- GFAL library not found. Set variable GFAL_DIR to point to your gfal installation
                      and the variable SRM_IFCE_DIR to the srm_ifce installation
-- For the time being switching OFF 'gfal' option
-- Looking for DAVIX
-- Could NOT find DAVIX (missing: DAVIX_INCLUDE_DIR DAVIX_LIBRARY) 
-- Davix not found. You can enable the option 'builtin_davix' to build the library internally'
-- For the time being switching off 'davix' option
-- Looking for TBB
-- Could NOT find TBB (missing: TBB_ROOT_DIR TBB_INCLUDE_DIR TBB_LIBRARY) 
-- TBB not found. Switching on builtin_tbb option
-- Performing Test CXX_HAS_mno_rtm
-- Performing Test CXX_HAS_mno_rtm - Success
-- Looking for BLAS for optional parts of TMVA
-- Looking for sgemm_
-- Looking for sgemm_ - found
-- A library with BLAS API found.
-- Enabled support for: asimage astiff builtin_afterimage builtin_ftgl builtin_gl2ps builtin_glew builtin_llvm builtin_lzma builtin_lz4 builtin_pcre builtin_tbb builtin_unuran cling cxx11 exceptions explicitlink gdml genvector http imt mathmore mysql pch python roofit shared sqlite ssl thread tmva x11 xft xml
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Looking for backtrace
-- Looking for backtrace - found
-- backtrace facility detected in default set of libraries
-- Found Backtrace: /usr/include  
-- Native target architecture is X86
-- Threads disabled.
-- Doxygen disabled.
-- Go bindings disabled.
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) 
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) 
-- OCaml bindings disabled.
-- LLVM host triple: x86_64-unknown-linux-gnu
-- LLVM default target triple: x86_64-unknown-linux-gnu
-- Building with -fPIC
-- Constructing LLVMBuild project information
-- Linker detection: GNU ld
-- SysLibs: rt;dl;tinfo;-lpthread;/usr/local/lib/libz.so
-- Targeting X86
-- Could NOT find Z3 (missing: Z3_LIBRARIES Z3_INCLUDE_DIR) (Required is at least version "4.5")
-- Clang version: 5.0.0
-- Cling version (from VERSION file): ROOT_0.6~dev
-- Cling will look for C++ headers in '/mnt/share/rh/6/prod/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../include/c++/4.9.2:/mnt/share/rh/6/prod/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../include/c++/4.9.2/x86_64-unknown-linux-gnu:/mnt/share/rh/6/prod/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../include/c++/4.9.2/backward' at runtime.
-- And if not found, will invoke: 'gcc' for them.
-- Performing Test CXX_HAS_Wno_maybe_uninitialized
-- Performing Test CXX_HAS_Wno_maybe_uninitialized - Success
-- Performing Test CXX_HAS_fno_rtti
-- Performing Test CXX_HAS_fno_rtti - Success
-- Performing Test C_HAS_Wno_strict_overflow
-- Performing Test C_HAS_Wno_strict_overflow - Success
-- Performing Test C_HAS_Wno_maybe_uninitialized
-- Performing Test C_HAS_Wno_maybe_uninitialized - Success
-- Performing Test C_HAS_Wno_parentheses_equality
-- Performing Test C_HAS_Wno_parentheses_equality - Success
-- Performing Test CXX_HAS_fno_strict_aliasing
-- Performing Test CXX_HAS_fno_strict_aliasing - Success
-- Performing Test CXX_HAS_Wno_parentheses_equality
-- Performing Test CXX_HAS_Wno_parentheses_equality - Success
-- Performing Test found_setresuid
-- Performing Test found_setresuid - Success
-- Performing Test found_stdstringview
-- Performing Test found_stdstringview - Failed
-- Performing Test found_stdexpstringview
-- Performing Test found_stdexpstringview - Failed
-- Performing Test found_stdapply
-- Performing Test found_stdapply - Failed
-- Performing Test found_stdinvoke
-- Performing Test found_stdinvoke - Failed
-- Performing Test found_attribute_always_inline
-- Performing Test found_attribute_always_inline - Success
Running /mnt/share/rh/source/small_packages/temp/root-6.12.04/build/unix/compiledata.sh
Making /mnt/share/rh/source/small_packages/temp/build/include/compiledata.h
-- Configuring done
-- Generating done
-- Build files have been written to: /mnt/share/rh/source/small_packages/temp/build

Command:
/opt/share/cmake/3.10.2/usr/local/bin/cmake --build .

Output (partial error part only as the complete error is too long):
[31%] Built target LLVMTableGen
Scanning dependencies of target clang-tblgen
[31%] Linking CXX executable ../../../../bin/clang-tblgen
CMakeFiles/obj.clang-tblgen.dir/ClangASTNodesEmitter.cpp.o: In function `(anonymous namespace)::ClangASTNodesEmitter::EmitNode(std::multimap<llvm::Record*, llvm::Record*, std::less<llvm::Record*>, std::allocator<std::pair<llvm::Record* const, llvm::Record*> > > const&, llvm::raw_ostream&, llvm::Record*)':
ClangASTNodesEmitter.cpp:(.text._ZN12_GLOBAL__N_120ClangASTNodesEmitter8EmitNodeERKSt8multimapIPN4llvm6RecordES4_St4lessIS4_ESaISt4pairIKS4_S4_EEERNS2_11raw_ostreamES4_+0x48): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, unsigned long, std::allocator<char> const&)'
ClangASTNodesEmitter.cpp:(.text._ZN12_GLOBAL__N_120ClangASTNodesEmitter8EmitNodeERKSt8multimapIPN4llvm6RecordES4_St4lessIS4_ESaISt4pairIKS4_S4_EEERNS2_11raw_ostreamES4_+0x5c): undefined reference to `std::string::_Rep::_S_empty_rep_storage'
ClangASTNodesEmitter.cpp:(.text._ZN12_GLOBAL__N_120ClangASTNodesEmitter8EmitNodeERKSt8multimapIPN4llvm6RecordES4_St4lessIS4_ESaISt4pairIKS4_S4_EEERNS2_11raw_ostreamES4_+0x8b): undefined reference to `std::string::_M_leak_hard()'
ClangASTNodesEmitter.cpp:(.text._ZN12_GLOBAL__N_120ClangASTNodesEmitter8EmitNodeERKSt8multimapIPN4llvm6RecordES4_St4lessIS4_ESaISt4pairIKS4_S4_EEERNS2_11raw_ostreamES4_+0xab): undefined reference to `std::string::_M_leak_hard()'
ClangASTNodesEmitter.cpp:(.text._ZN12_GLOBAL__N_120ClangASTNodesEmitter8EmitNodeERKSt8multimapIPN4llvm6RecordES4_St4lessIS4_ESaISt4pairIKS4_S4_EEERNS2_11raw_ostreamES4_+0x24e): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, unsigned long, std::allocator<char> const&)'
ClangASTNodesEmitter.cpp:(.text._ZN12_GLOBAL__N_120ClangASTNodesEmitter8EmitNodeERKSt8multimapIPN4llvm6RecordES4_St4lessIS4_ESaISt4pairIKS4_S4_EEERNS2_11raw_ostreamES4_+0x27d): undefined
....
....
....
ToolOutputFile.cpp:(.text._ZN4llvm16tool_output_file16CleanupInstallerC2ENS_9StringRefE+0x63): undefined reference to `std::string::_Rep::_S_empty_rep_storage'
../../../../lib/libLLVMSupport.a(ToolOutputFile.cpp.o): In function `llvm::tool_output_file::CleanupInstaller::~CleanupInstaller()':
ToolOutputFile.cpp:(.text._ZN4llvm16tool_output_file16CleanupInstallerD2Ev+0x19): undefined reference to `std::string::compare(char const*) const'
ToolOutputFile.cpp:(.text._ZN4llvm16tool_output_file16CleanupInstallerD2Ev+0x2b): undefined reference to `std::string::_Rep::_S_empty_rep_storage'
ToolOutputFile.cpp:(.text._ZN4llvm16tool_output_file16CleanupInstallerD2Ev+0x48): undefined reference to `std::string::compare(char const*) const'
ToolOutputFile.cpp:(.text._ZN4llvm16tool_output_file16CleanupInstallerD2Ev+0x9e): undefined reference to `std::string::_Rep::_M_destroy(std::allocator<char> const&)'
collect2: error: ld returned 1 exit status
gmake[2]: *** [interpreter/llvm/src/bin/clang-tblgen] Error 1
gmake[1]: *** [interpreter/llvm/src/tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/all] Error 2
gmake: *** [all] Error 2

```

---

<div class="post-metadata">

**Author:** ![amadio](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/amadio/32/12562_2.png) [@amadio](https://root-forum.cern.ch/u/amadio)\
**Post date:** [January 26, 2018, 7:17am UTC](https://root-forum.cern.ch/t/compiling-root-v6-12-04-on-centos-6-6-using-gcc-v4-9-2-and-cmake-v3-10-2/27708/2 "2018-01-26T07:17:14Z")

</div>

This is a problem with the configuration of your compiler. Please try to set both C and C++ compilers to the same version (you have GCC 4.4 for C and GCC 4.9 for C++), and make sure that the standard library that the compiler picks up is the correct one. It seems that the compiler is picking an incompatible standard library, hence the errors about missing symbols for `std::basic_string`.

---

<div class="post-metadata">

**Author:** ![alexdongli](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/df705f/32.png) [@alexdongli](https://root-forum.cern.ch/u/alexdongli)\
**Post date:** [January 26, 2018, 7:57am UTC](https://root-forum.cern.ch/t/compiling-root-v6-12-04-on-centos-6-6-using-gcc-v4-9-2-and-cmake-v3-10-2/27708/3 "2018-01-26T07:57:37Z")

</div>

Dear Amadio,

Thanks for your help! I tried with this command (added this: -D CMAKE\_C\_COMPILER=/mnt/share/rh/6/prod/bin/gcc) but still does not work:  
/opt/share/cmake/3.10.2/usr/local/bin/cmake -D CMAKE\_INSTALL\_PREFIX=/opt/share/root/6.12.04 -D CMAKE\_CXX\_COMPILER=/mnt/share/rh/6/prod/bin/gcc **-D CMAKE\_C\_COMPILER=/mnt/share/rh/6/prod/bin/gcc** …/root-6.12.04

The new output:  
– The C compiler identification is GNU 4.9.2  
– The CXX compiler identification is GNU 4.9.2  
– Check for working C compiler: /mnt/share/rh/6/prod/bin/gcc  
– Check for working C compiler: /mnt/share/rh/6/prod/bin/gcc – 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: /mnt/share/rh/6/prod/bin/gcc  
– Check for working CXX compiler: /mnt/share/rh/6/prod/bin/gcc – works  
– Detecting CXX compiler ABI info  
– Detecting CXX compiler ABI info - done  
– Detecting CXX compile features  
– Detecting CXX compile features - done  
– Found GCC. Major version 4, minor version 9  
– 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 - Failed  
– ROOT Platform: linux  
– ROOT Architecture: linuxx8664gcc  
– Build Type: RelWithDebInfo  
– Compiler Flags: -pipe -m64 -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -fPIC -pthread -std=c++11 -O2 -g -DNDEBUG  
– Looking for ZLib  
– Found ZLIB: /usr/local/lib/libz.so (found version “1.2.8”)  
– Looking for Unuran  
– Could NOT find UNURAN (missing: UNURAN\_LIBRARY UNURAN\_INCLUDE\_DIR)  
– Unuran not found. Switching on builtin\_unuran option  
– Looking for Freetype  
– Found Freetype: /usr/lib64/libfreetype.so (found version “2.3.11”)  
– 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 LZ4  
– LZ4 not found. Switching on builtin\_lz4 option  
– Building LZ4 version v1.7.5 included in ROOT itself  
– Looking for X11  
– Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so  
– Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/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/lib64/libX11.so  
– X11\_INCLUDE\_DIR: /usr/include  
– X11\_LIBRARIES: /usr/lib64/libSM.so;/usr/lib64/libICE.so;/usr/lib64/libX11.so;/usr/lib64/libXext.so  
– X11\_Xpm\_INCLUDE\_PATH: /usr/include  
– X11\_Xpm\_LIB: /usr/lib64/libXpm.so  
– X11\_Xft\_INCLUDE\_PATH: /usr/include  
– X11\_Xft\_LIB: /usr/lib64/libXft.so  
– X11\_Xext\_INCLUDE\_PATH:  
– X11\_Xext\_LIB: /usr/lib64/libXext.so  
– Could NOT find GIF (missing: GIF\_LIBRARY GIF\_INCLUDE\_DIR)  
– Could NOT find TIFF (missing: TIFF\_LIBRARY TIFF\_INCLUDE\_DIR)  
– Found PNG: /usr/lib64/libpng.so (found version “1.2.49”)  
– Found JPEG: /usr/lib64/libjpeg.so  
– Building AfterImage library included in ROOT itself  
– Looking for GSL  
– Found GSL: /usr/include (found suitable version “1.13”, minimum required is “1.10”)  
– Looking for Python  
– Found PythonInterp: /mnt/share/rh/6/prod/bin/python (found version “2.7.11”)  
– Found Python interpreter version 2.7  
– Found PythonLibs: /mnt/share/rh/6/prod/lib/libpython2.7.so (found version “2.7.11”)  
– Found NUMPY: /mnt/share/rh/6/prod/lib/python2.7/site-packages/numpy/core/include (found version “1.11.2”)  
– Looking for OpenGL  
– Could NOT find OpenGL (missing: OPENGL\_opengl\_LIBRARY OPENGL\_glx\_LIBRARY OPENGL\_INCLUDE\_DIR)  
– OpenGL (with GLU) not found. Switching off opengl option  
– Looking for gl2ps  
– Could NOT find GL2PS (missing: GL2PS\_LIBRARY GL2PS\_INCLUDE\_DIR)  
– gl2ps not found. Switching on builtin\_gl2ps option  
– Looking for LibXml2  
– Found LibXml2: /usr/lib64/libxml2.so (found version “2.7.6”)  
– Looking for OpenSSL  
– Found OpenSSL: /usr/lib64/libcrypto.so (found version “1.0.1e”)  
– Looking for Castor  
– Could NOT find CASTOR (missing: CASTOR\_shift\_LIBRARY CASTOR\_INCLUDE\_DIR)  
– Castor not found. Switching off castor option  
– Looking for MySQL  
– Found MYSQL: /usr/local/mysql/include  
– Looking for Oracle  
– Oracle not found.  
– Oracle: You can specify includes: -DORACLE\_PATH\_INCLUDES=/usr/include/oracle/10.2.0.3/client  
– currently found includes:  
– Oracle: You can specify libs: -DORACLE\_PATH\_LIB=/usr/lib/oracle/10.2.0.3/client/lib  
– currently found libs: ORACLE\_LIBRARY\_OCCI-NOTFOUND;ORACLE\_LIBRARY\_CLNTSH-NOTFOUND;ORACLE\_LIBRARY\_LNNZ-NOTFOUND  
– Oracle not found. Switching off oracle option  
– Looking for PostgreSQL  
– Could NOT find PostgreSQL (missing: POSTGRESQL\_INCLUDE\_DIR POSTGRESQL\_LIBRARY)  
– PostgreSQL not found. Switching off pgsql option  
– Looking for SQLite  
– Found PkgConfig: /usr/bin/pkg-config (found version “0.23”)  
– Found Sqlite: /usr/include  
– Looking for Pythia6  
– Pythia6 not found. Switching off pythia6 option  
– Looking for Pythia8  
– Could NOT find Pythia8 (missing: PYTHIA8\_INCLUDE\_DIR PYTHIA8\_LIBRARY)  
– Pythia8 not found. Switching off pythia8 option  
– Looking for FFTW3  
– FFTW3 not found. Set [environment] variable FFTW\_DIR to point to your FFTW3 installation  
– Alternatively, you can also enable the option ‘builtin\_fftw3’ to build FFTW3 internally’  
– For the time being switching OFF ‘fftw3’ option  
– Looking for CFITSIO  
– Could NOT find CFITSIO (missing: CFITSIO\_INCLUDE\_DIR CFITSIO\_LIBRARY)  
– CFITSIO not found. You can enable the option ‘builtin\_cfitsio’ to build the library internally’  
– For the time being switching off ‘fitsio’ option  
– Looking for XROOTD  
– XROOTD not found. Set environment variable XRDSYS to point to your XROOTD installation  
– Alternatively, you can also enable the option ‘builtin\_xrootd’ to build XROOTD internally  
– For the time being switching OFF ‘xrootd’ option  
– Could NOT find GFAL (missing: GFAL\_INCLUDE\_DIR SRM\_IFCE\_INCLUDE\_DIR GFAL\_LIBRARY)  
– GFAL library not found. Set variable GFAL\_DIR to point to your gfal installation  
and the variable SRM\_IFCE\_DIR to the srm\_ifce installation  
– For the time being switching OFF ‘gfal’ option  
– Looking for DAVIX  
– Could NOT find DAVIX (missing: DAVIX\_INCLUDE\_DIR DAVIX\_LIBRARY)  
– Davix not found. You can enable the option ‘builtin\_davix’ to build the library internally’  
– For the time being switching off ‘davix’ option  
– Looking for TBB  
– Could NOT find TBB (missing: TBB\_ROOT\_DIR TBB\_INCLUDE\_DIR TBB\_LIBRARY)  
– TBB not found. Switching on builtin\_tbb option  
– Performing Test CXX\_HAS\_mno\_rtm  
– Performing Test CXX\_HAS\_mno\_rtm - Success  
– Looking for BLAS for optional parts of TMVA  
– Looking for sgemm\_  
– Looking for sgemm\_ - found  
– A library with BLAS API found.  
– Enabled support for: asimage astiff builtin\_afterimage builtin\_ftgl builtin\_gl2ps builtin\_glew builtin\_llvm builtin\_lzma builtin\_lz4 builtin\_pcre builtin\_tbb builtin\_unuran cling cxx11 exceptions explicitlink gdml genvector http imt mathmore mysql pch python roofit shared sqlite ssl thread tmva x11 xft xml  
– The ASM compiler identification is GNU  
– Found assembler: /mnt/share/rh/6/prod/bin/gcc  
– Looking for backtrace  
– Looking for backtrace - found  
– backtrace facility detected in default set of libraries  
– Found Backtrace: /usr/include  
– Native target architecture is X86  
– Threads disabled.  
– Doxygen disabled.  
– Go bindings disabled.  
– Could NOT find OCaml (missing: OCAMLFIND OCAML\_VERSION OCAML\_STDLIB\_PATH)  
– Could NOT find OCaml (missing: OCAMLFIND OCAML\_VERSION OCAML\_STDLIB\_PATH)  
– OCaml bindings disabled.  
– LLVM host triple: x86\_64-unknown-linux-gnu  
– LLVM default target triple: x86\_64-unknown-linux-gnu  
– Building with -fPIC  
– Constructing LLVMBuild project information  
– Linker detection: GNU ld  
– SysLibs: rt;dl;tinfo;-lpthread;/usr/local/lib/libz.so  
– Targeting X86  
– Could NOT find Z3 (missing: Z3\_LIBRARIES Z3\_INCLUDE\_DIR) (Required is at least version “4.5”)  
– Clang version: 5.0.0  
– Cling version (from VERSION file): ROOT\_0.6~dev  
– Cling will look for C++ headers in ‘/mnt/share/rh/6/prod/lib/gcc/x86\_64-unknown-linux-gnu/4.9.2/…/…/…/…/include/c++/4.9.2:/mnt/share/rh/6/prod/lib/gcc/x86\_64-unknown-linux-gnu/4.9.2/…/…/…/…/include/c++/4.9.2/x86\_64-unknown-linux-gnu:/mnt/share/rh/6/prod/lib/gcc/x86\_64-unknown-linux-gnu/4.9.2/…/…/…/…/include/c++/4.9.2/backward’ at runtime.  
– And if not found, will invoke: ‘gcc’ for them.  
– Performing Test CXX\_HAS\_Wno\_maybe\_uninitialized  
– Performing Test CXX\_HAS\_Wno\_maybe\_uninitialized - Success  
– Performing Test CXX\_HAS\_fno\_rtti  
– Performing Test CXX\_HAS\_fno\_rtti - Success  
– Performing Test C\_HAS\_Wno\_strict\_overflow  
– Performing Test C\_HAS\_Wno\_strict\_overflow - Success  
– Performing Test C\_HAS\_Wno\_maybe\_uninitialized  
– Performing Test C\_HAS\_Wno\_maybe\_uninitialized - Success  
– Performing Test C\_HAS\_Wno\_parentheses\_equality  
– Performing Test C\_HAS\_Wno\_parentheses\_equality - Success  
– Performing Test CXX\_HAS\_fno\_strict\_aliasing  
– Performing Test CXX\_HAS\_fno\_strict\_aliasing - Success  
– Performing Test CXX\_HAS\_Wno\_parentheses\_equality  
– Performing Test CXX\_HAS\_Wno\_parentheses\_equality - Success  
– Performing Test found\_setresuid  
– Performing Test found\_setresuid - Success  
– Performing Test found\_stdstringview  
– Performing Test found\_stdstringview - Failed  
– Performing Test found\_stdexpstringview  
– Performing Test found\_stdexpstringview - Failed  
– Performing Test found\_stdapply  
– Performing Test found\_stdapply - Failed  
– Performing Test found\_stdinvoke  
– Performing Test found\_stdinvoke - Failed  
– Performing Test found\_attribute\_always\_inline  
– Performing Test found\_attribute\_always\_inline - Success  
Running /mnt/share/rh/source/small\_packages/temp/root-6.12.04/build/unix/compiledata.sh  
Making /mnt/share/rh/source/small\_packages/temp/build/include/compiledata.h  
– Configuring done  
– Generating done  
– Build files have been written to: /mnt/share/rh/source/small\_packages/temp/build

The beginning and end of the new error msg is as below:  
[31%] Built target LLVMTableGen  
Scanning dependencies of target clang-tblgen  
[31%] Linking CXX executable …/…/…/…/bin/clang-tblgen  
CMakeFiles/obj.clang-tblgen.dir/ClangASTNodesEmitter.cpp.o: In function `(anonymous namespace)::ClangASTNodesEmitter::EmitNode(std::multimap<llvm::Record*, llvm::Record*, std::less<llvm::Record*>, std::allocator<std::pair<llvm::Record* const, llvm::Record*> > > const&, llvm::raw_ostream&, llvm::Record*)': ClangASTNodesEmitter.cpp:(.text._ZN12_GLOBAL__N_120ClangASTNodesEmitter8EmitNodeERKSt8multimapIPN4llvm6RecordES4_St4lessIS4_ESaISt4pairIKS4_S4_EEERNS2_11raw_ostreamES4_+0x48): undefined reference to`std::basic\_string\<char, std::char\_traits, std::allocator \>::basic\_string(char const\*, unsigned long, std::allocator const&)'  
ClangASTNodesEmitter.cpp:(.text._ZN12\_GLOBAL\_\_N\_120ClangASTNodesEmitter8EmitNodeERKSt8multimapIPN4llvm6RecordES4\_St4lessIS4\_ESaISt4pairIKS4\_S4\_EEERNS2\_11raw\_ostreamES4_+0x5c): undefined reference to `std::string::_Rep::_S_empty_rep_storage' ClangASTNodesEmitter.cpp:(.text._ZN12_GLOBAL__N_120ClangASTNodesEmitter8EmitNodeERKSt8multimapIPN4llvm6RecordES4_St4lessIS4_ESaISt4pairIKS4_S4_EEERNS2_11raw_ostreamES4_+0x8b): undefined reference to`std::string::\_M\_leak\_hard()‘  
ClangASTNodesEmitter.cpp:(.text._ZN12\_GLOBAL\_\_N\_120ClangASTNodesEmitter8EmitNodeERKSt8multimapIPN4llvm6RecordES4\_St4lessIS4\_ESaISt4pairIKS4\_S4\_EEERNS2\_11raw\_ostreamES4_+0xab): undefined reference to `std::string::_M_leak_hard()' ClangASTNodesEmitter.cpp:(.text._ZN12_GLOBAL__N_120ClangASTNodesEmitter8EmitNodeERKSt8multimapIPN4llvm6RecordES4_St4lessIS4_ESaISt4pairIKS4_S4_EEERNS2_11raw_ostreamES4_+0x24e): undefined reference to`std::basic\_string\<char, std::char\_traits, std::allocator \>::basic\_string(char const\*, unsigned long, std::allocator const&)’  
…  
…  
…  
ToolOutputFile.cpp:(.text.\_ZN4llvm16tool\_output\_file16CleanupInstallerD2Ev+0x19): undefined reference to `std::string::compare(char const*) const' ToolOutputFile.cpp:(.text._ZN4llvm16tool_output_file16CleanupInstallerD2Ev+0x2b): undefined reference to`std::string::\_Rep::\_S\_empty\_rep\_storage’  
ToolOutputFile.cpp:(.text.\_ZN4llvm16tool\_output\_file16CleanupInstallerD2Ev+0x48): undefined reference to `std::string::compare(char const*) const' ToolOutputFile.cpp:(.text._ZN4llvm16tool_output_file16CleanupInstallerD2Ev+0x9e): undefined reference to`std::string::\_Rep::\_M\_destroy(std::allocator const&)'  
collect2: error: ld returned 1 exit status  
gmake[2]: \*\*\* [interpreter/llvm/src/bin/clang-tblgen] Error 1  
gmake[1]: \*\*\* [interpreter/llvm/src/tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/all] Error 2  
gmake: \*\*\* [all] Error 2

---

<div class="post-metadata">

**Author:** ![amadio](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/amadio/32/12562_2.png) [@amadio](https://root-forum.cern.ch/u/amadio)\
**Post date:** [January 26, 2018, 8:14am UTC](https://root-forum.cern.ch/t/compiling-root-v6-12-04-on-centos-6-6-using-gcc-v4-9-2-and-cmake-v3-10-2/27708/4 "2018-01-26T08:14:33Z")

</div>

As mentioned above, the compiler you are using (custom GCC 4.9.2 from `/mnt/share/rh/6/prod`) is picking an incompatible standard library (i.e., one compiled with a different compiler), hence the errors about missing symbols for `std::basic_string`. This is not a problem with ROOT. Please ask your system adminitstrators to help you properly setup the compiler, or try to use the system compiler if it is GCC \>= 4.8.5. If you have CVMFS in the system, you could try to use a GCC (or even ROOT itself) from the LCG releases.

---

<div class="post-metadata">

**Author:** ![alexdongli](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/df705f/32.png) [@alexdongli](https://root-forum.cern.ch/u/alexdongli)\
**Post date:** [January 26, 2018, 8:46am UTC](https://root-forum.cern.ch/t/compiling-root-v6-12-04-on-centos-6-6-using-gcc-v4-9-2-and-cmake-v3-10-2/27708/5 "2018-01-26T08:46:52Z")

</div>

Dear Amadio,

Thanks for your help again! Sadly I am the admin ;-(. To avoid messing up the CentOS 6.6, we did not upgrade /usr/bin/gcc, instead, we installed gcc v4.9.2 to a different location. We have compiled hundreds of the different tools without problem. I still think there is a way to get root compiled by setting the correct env, or/and passing the correct flags and values to Cmake. Do you have any suggestion?  
Thanks in advance!

Alex

---

<div class="post-metadata">

**Author:** ![alexdongli](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/df705f/32.png) [@alexdongli](https://root-forum.cern.ch/u/alexdongli)\
**Post date:** [January 26, 2018, 8:55am UTC](https://root-forum.cern.ch/t/compiling-root-v6-12-04-on-centos-6-6-using-gcc-v4-9-2-and-cmake-v3-10-2/27708/6 "2018-01-26T08:55:00Z")

</div>

BTW, do you think that the following errors during the configuration matter?  
– Performing Test found\_stdstringview  
– Performing Test **found\_stdstringview - Failed**  
– Performing Test found\_stdexpstringview  
– Performing Test **found\_stdexpstringview - Failed**  
– Performing Test found\_stdapply  
– Performing Test **found\_stdapply - Failed**  
– Performing Test found\_stdinvoke  
– Performing Test **found\_stdinvoke - Failed**

---

<div class="post-metadata">

**Author:** ![amadio](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/amadio/32/12562_2.png) [@amadio](https://root-forum.cern.ch/u/amadio)\
**Post date:** [January 26, 2018, 9:04am UTC](https://root-forum.cern.ch/t/compiling-root-v6-12-04-on-centos-6-6-using-gcc-v4-9-2-and-cmake-v3-10-2/27708/7 "2018-01-26T09:04:13Z")

</div>

I believe this is the real problem:

```auto
– Performing Test GLIBCXX_USE_CXX11_ABI
– Performing Test GLIBCXX_USE_CXX11_ABI - Failed

```

The failure about `string_view` is because [it is from C++17](http://en.cppreference.com/w/cpp/string/basic_string_view), but you are compiling with C++11.

The real issue is the ABI incompatibility between the C++ standard library from your system and GCC 4.9.2.  
You may find this page useful: [https://gcc.gnu.org/onlinedocs/libstdc++/manual/using\_dual\_abi.html](https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html)

If you choose an old ABI explicitly, you may be able to make things work (i.e. by adding `-fabi-version=6` or other number to your compilation flags), or you could use, for instance, a compiler installed from the devtoolset-6: [https://www.softwarecollections.org/en/scls/rhscl/devtoolset-6](https://www.softwarecollections.org/en/scls/rhscl/devtoolset-6).

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [February 9, 2018, 9:04am UTC](https://root-forum.cern.ch/t/compiling-root-v6-12-04-on-centos-6-6-using-gcc-v4-9-2-and-cmake-v3-10-2/27708/8 "2018-02-09T09:04:14Z")

</div>

Closed on February 9, 2018, 9:04am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
