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

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:

/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:

-- 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

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.

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 tostd::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 tostd::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 tostd::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 tostd::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 tostd::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

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.

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

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

I believe this is the real problem:

– 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, 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

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.

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