Hi!
When I try to build Root 6.06 from the source, this is the output of cmake:
-- Found GCC. Major version 5, minor version 4
-- Performing Test CXX_SUPPORTS_OLD_ABI
-- Performing Test CXX_SUPPORTS_OLD_ABI - Failed
CMake Error at cmake/modules/CheckCompiler.cmake:61 (message):
Found GCC compiler with new ABI. Cling does not support the GCC 5 ABI yet
Call Stack (most recent call first):
CMakeLists.txt:35 (include)
I have gcc 5.4 installed, do I need an older version of g++?
Thanks!
an important change has been already applied to the ROOT codebase in order to seamlessly support the new ABI adopted by the most recent gcc versions. As a matter of fact, the ROOT head (which is presently obtainable github.com/root-mirror/root) builds and runs seamlessly on platforms featuring gcc >5.
Thanks for your reply, Iâve tried, but there is this error during compiling.
[ 13%] Building CXX object interpreter/cling/lib/Interpreter/CMakeFiles/obj.clingInterpreter.dir/InvocationOptions.cpp.o
In file included from /home/nitto/root-master/interpreter/cling/lib/Interpreter/InvocationOptions.cpp:13:0:
/home/nitto/root-master/interpreter/cling/../llvm/src/tools/clang/include/clang/Driver/Options.h:41:36: fatal error: clang/Driver/Options.inc: No such file or directory
compilation terminated.
interpreter/cling/lib/Interpreter/CMakeFiles/obj.clingInterpreter.dir/build.make:643: recipe for target 'interpreter/cling/lib/Interpreter/CMakeFiles/obj.clingInterpreter.dir/InvocationOptions.cpp.o' failed
make[2]: *** [interpreter/cling/lib/Interpreter/CMakeFiles/obj.clingInterpreter.dir/InvocationOptions.cpp.o] Error 1
CMakeFiles/Makefile2:8445: recipe for target 'interpreter/cling/lib/Interpreter/CMakeFiles/obj.clingInterpreter.dir/all' failed
make[1]: *** [interpreter/cling/lib/Interpreter/CMakeFiles/obj.clingInterpreter.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
[quote=âdpiparoâ]Hi Giovanni,
an important change has been already applied to the ROOT codebase in order to seamlessly support the new ABI adopted by the most recent gcc versions. As a matter of fact, the ROOT head (which is presently obtainable github.com/root-mirror/root) builds and runs seamlessly on platforms featuring gcc >5.
Iâve installed all the packages required. This is the output of cmake configuration.
Thanks for your help.
nitto@nitto-Inspiron-7548:/tmp/root-build$ cmake -DCMAKE_INSTALL_PREFIX="${ROOT_INSTALL_DIR}" -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" -Dcxx14="ON" -Dall="ON" -Ddavix="OFF" -Dr="OFF" -Dpythia8="OFF" -Dgeocad="ON" -Dbuiltin_ftgl="OFF" -Dbuiltin_glew="OFF" -Dsoversion="ON" ../root-master
-- Found GCC. Major version 5, minor version 4
-- Found a 64bit system
-- Found GNU compiler collection
-- ROOT Platform: linux
-- ROOT Architecture: linuxx8664gcc
-- Build Type: RelWithDebInfo
-- Compiler Flags: -D_GLIBCXX_USE_CXX11_ABI=0 -pipe -m64 -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -fPIC -pthread -std=c++14 -Wno-deprecated-declarations -O2 -g -DNDEBUG
-- Looking for ZLib
-- Looking for Freetype
-- Looking for PCRE
-- Building LZMA version 5.2.1 included in ROOT itself
-- Looking for X11
-- Could NOT find GIF (missing: GIF_LIBRARY GIF_INCLUDE_DIR)
-- Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR)
-- Building AfterImage library included in ROOT itself
-- Looking for GSL
-- Looking for Python
-- Found Python interpreter version 2.7
-- Looking for OpenGL
-- Looking for Graphviz
-- Looking for Qt4
-- Looking for Bonjour
-- Checking whether Bonjour/Avahi is supported
-- Looking for Kerberos 5
-- Looking for LibXml2
-- Looking for OpenSSL
-- Looking for MySQL
-- Looking for FFTW3
-- Could NOT find OCC (missing: OCC_INCLUDE_DIR OCC_TKPrim_LIBRARY OCC_TKBRep_LIBRARY OCC_TKOffset_LIBRARY OCC_TKGeomBase_LIBRARY OCC_TKShHealing_LIBRARY OCC_TKTopAlgo_LIBRARY OCC_TKSTEP_LIBRARY OCC_TKG2d_LIBRARY OCC_TKBool_LIBRARY OCC_TKBO_LIBRARY OCC_TKXCAF_LIBRARY OCC_TKXDESTEP_LIBRARY OCC_TKLCAF_LIBRARY OCC_TKernel_LIBRARY OCC_TKXSBase_LIBRARY OCC_TKG3d_LIBRARY OCC_TKMath_LIBRARY)
-- OpenCascade libraries not found. Set variable CASROOT to point to your OpenCascade installation
-- For the time being switching OFF 'geocad' option
-- Enabled support for: asimage astiff bonjour builtin_afterimage builtin_gl2ps builtin_unuran builtin_lzma builtin_llvm cxx14 cling exceptions explicitlink fftw3 fortran gviz gdml genvector http krb5 ldap mathmore memstat minuit2 mysql opengl pch python qt qtgsi roofit root7 shadowpw shared soversion ssl table thread tmva unuran vdt xft xml x11
-- Target triple: x86_64-unknown-linux-gnu
-- Native target architecture is X86
-- Threads disabled.
-- Doxygen disabled.
-- Sphinx 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.
-- Building with -fPIC
-- Constructing LLVMBuild project information
-- Targeting X86
-- Clang version: 3.9.0
-- Cling version (from VERSION file): ROOT_0.4~dev
-- Cling will look for C++ headers in '/usr/include/c++/5:/usr/include/x86_64-linux-gnu/c++/5:/usr/include/c++/5/backward' at runtime.
-- And if not found, will invoke: 'c++' for them.
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/root-build
Try to execute: No graphical output
and then try to build your ROOT from scratch (i.e. first delete everything) again.
BTW. Note that with the âroot-masterâ, you should not need to use -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" any more (which is needed with ROOT 6.06), so try: cmake -DCMAKE_INSTALL_PREFIX="${ROOT_INSTALL_DIR}" -Dcxx14="ON" -Dall="ON" -Dgeocad="ON" -Dbuiltin_ftgl="OFF" -Dbuiltin_glew="OFF" -Dsoversion="ON" ../root-master
Iâve tried to follow your hints, but there is always the same error during the compilation. I have also tried to install the âlibclang-devâ package, but nothing changes. Thanks for your patience.
[ 11%] Building CXX object interpreter/cling/lib/Interpreter/CMakeFiles/obj.clingInterpreter.dir/InvocationOptions.cpp.o
In file included from /tmp/root-master/interpreter/cling/lib/Interpreter/InvocationOptions.cpp:13:0:
/tmp/root-master/interpreter/cling/../llvm/src/tools/clang/include/clang/Driver/Options.h:41:36: fatal error: clang/Driver/Options.inc: No such file or directory
compilation terminated.
interpreter/cling/lib/Interpreter/CMakeFiles/obj.clingInterpreter.dir/build.make:643: recipe for target 'interpreter/cling/lib/Interpreter/CMakeFiles/obj.clingInterpreter.dir/InvocationOptions.cpp.o' failed
make[2]: *** [interpreter/cling/lib/Interpreter/CMakeFiles/obj.clingInterpreter.dir/InvocationOptions.cpp.o] Error 1
CMakeFiles/Makefile2:8464: recipe for target 'interpreter/cling/lib/Interpreter/CMakeFiles/obj.clingInterpreter.dir/all' failed
make[1]: *** [interpreter/cling/lib/Interpreter/CMakeFiles/obj.clingInterpreter.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
[quote=âPepe Le Pewâ]Try to execute: No graphical output
and then try to build your ROOT from scratch (i.e. first delete everything) again.
BTW. Note that with the âroot-masterâ, you should not need to use -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" any more (which is needed with ROOT 6.06), so try: cmake -DCMAKE_INSTALL_PREFIX="${ROOT_INSTALL_DIR}" -Dcxx14="ON" -Dall="ON" -Dgeocad="ON" -Dbuiltin_ftgl="OFF" -Dbuiltin_glew="OFF" -Dsoversion="ON" ../root-master[/quote]
Iâve tried again with the link in your first post and now it works! Thanks!
I think that there was a file important for compiling in the package âlibclang-devâ.
[quote=âPepe Le Pewâ]Maybe the âroot-masterâ is broken.
Try to build ROOT 6.06/06 (as in the link in my first post here).[/quote]
If the Ubuntu system provided âlibclang-devâ package interferes with ROOT 6 then this is a serious problem (this may mean that ROOT 6 took âclangâ instead of âgccâ, at least for part of its installation, and maybe it also tried to use any Ubuntuâs âclingâ, if you have it installed).
Try to execute:
root-config --cxx
and see if you get âg++â.
There is a similar mysterious problem reported here: ROOT build suddenly failing (Ubuntu 16.04 LTS)
Maybe you could try to run (report here what is found):
sudo dpkg --list â*â|grep -i âcl[ai]ngâ
Sorry for bumping this thread, I am having a similar issue in an specific configuration of the cmake file. My question is, are all the cmake flags necessary or just the -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" is needed?
This is my cmake file (Ihave tried root 6-06-04 and 6-06-06):
But I get an error when linking one of the libraries (libNetxNG):
collect2: error: ld returned 1 exit status
net/netxng/CMakeFiles/NetxNG.dir/build.make:194: recipe for target 'lib/libNetxNG.so.6.06.02' failed
make[2]: *** [lib/libNetxNG.so.6.06.02] Error 1
CMakeFiles/Makefile2:16184: recipe for target 'net/netxng/CMakeFiles/NetxNG.dir/all' failed
make[1]: *** [net/netxng/CMakeFiles/NetxNG.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
**** Checking libraries in /home/attpc/fair_install/FairSoftInst_may2016_ABI0/lib ****
*** ERROR: root could not be created.
create a symbolic linking for Vc library ....
libVc.a not found in lib dirctory
*** End installation of external packages with Errors***
attpc@control:~/fair_install/FairSoft_may2016$
The â-D_GLIBCXX_USE_CXX11_ABI=0â is needed if you use gcc 5.x to build ROOT 6.06. Moreover, any additional C++ library, that you want to use, will need to be compiled with the same setting (this usually means that one needs to enforce, for example, -Ddavix=âOFFâ -Dr=âOFFâ -Dpythia8=âOFFâ, as they are usually not compiled with this setting).
For the time being, on Ubuntu 16.04, if you want to use R, you either need ROOT 5.34 (for best results, take the âhead of the v5-34-00-patches branchâ) or the current ROOT 6 head (i.e. the source code that becomes ROOT 6.08/00 in future).
I can confirm that I am able to build the ROOT master (6.07/07) in Ubuntu 16.04, cmake, gcc 5.4 without the need to use the -D_GLIBCXX_USE_CXX11_ABI=0 flag. libclang-dev is not needed. BUT âmake -j4â instead of âmakeâ is needed.
[quote=âgiovannistagnittoâ]Iâve tried to follow your hints, but there is always the same error during the compilation. I have also tried to install the âlibclang-devâ package, but nothing changes. Thanks for your patience.
[ 11%] Building CXX object interpreter/cling/lib/Interpreter/CMakeFiles/obj.clingInterpreter.dir/InvocationOptions.cpp.o
In file included from /tmp/root-master/interpreter/cling/lib/Interpreter/InvocationOptions.cpp:13:0:
/tmp/root-master/interpreter/cling/../llvm/src/tools/clang/include/clang/Driver/Options.h:41:36: fatal error: clang/Driver/Options.inc: No such file or directory
compilation terminated.
interpreter/cling/lib/Interpreter/CMakeFiles/obj.clingInterpreter.dir/build.make:643: recipe for target 'interpreter/cling/lib/Interpreter/CMakeFiles/obj.clingInterpreter.dir/InvocationOptions.cpp.o' failed
make[2]: *** [interpreter/cling/lib/Interpreter/CMakeFiles/obj.clingInterpreter.dir/InvocationOptions.cpp.o] Error 1
CMakeFiles/Makefile2:8464: recipe for target 'interpreter/cling/lib/Interpreter/CMakeFiles/obj.clingInterpreter.dir/all' failed
make[1]: *** [interpreter/cling/lib/Interpreter/CMakeFiles/obj.clingInterpreter.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
[/quote]
The final explanation for this mysterious problem has been found here: