Cmake error to install

I can’t complier by cmake to install root-6.10.02

the error is

CMakeFiles/Hbook.dir/G__Hbook.cxx.o: In function ROOT::newArray_THbookFile(long, void*)': /home/huangl/package/8.1-rc1/root-6.10.02/install/hist/hbook/G__Hbook.cxx:378: undefined reference to__cxa_throw_bad_array_new_length’
CMakeFiles/Hbook.dir/G__Hbook.cxx.o: In function ROOT::newArray_THbookTree(long, void*)': /home/huangl/package/8.1-rc1/root-6.10.02/install/hist/hbook/G__Hbook.cxx:444: undefined reference to__cxa_throw_bad_array_new_length’
CMakeFiles/Hbook.dir/G__Hbook.cxx.o: In function ROOT::newArray_THbookBranch(long, void*)': /home/huangl/package/8.1-rc1/root-6.10.02/install/hist/hbook/G__Hbook.cxx:341: undefined reference to__cxa_throw_bad_array_new_length’
CMakeFiles/Hbook.dir/G__Hbook.cxx.o: In function ROOT::newArray_THbookKey(long, void*)': /home/huangl/package/8.1-rc1/root-6.10.02/install/hist/hbook/G__Hbook.cxx:411: undefined reference to__cxa_throw_bad_array_new_length’
CMakeFiles/Hbook.dir/src/THbookFile.cxx.o: In function THbookFile::Convert1D(int)': /home/huangl/package/8.1-rc1/root-6.10.02/hist/hbook/src/THbookFile.cxx:934: undefined reference to__cxa_throw_bad_array_new_length’
CMakeFiles/Hbook.dir/src/THbookFile.cxx.o:/home/huangl/package/8.1-rc1/root-6.10.02/hist/hbook/src/THbookFile.cxx:665: more undefined references to `__cxa_throw_bad_array_new_length’ follow
collect2: error: ld returned 1 exit status
make[2]: *** [hist/hbook/CMakeFiles/Hbook.dir/build.make:234: lib/libHbook.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:17312: hist/hbook/CMakeFiles/Hbook.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

my GCC version is 7.2.0
– Found GCC. Major version 7, minor version 2
– Found a 64bit system
– Found GNU compiler collection
– 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 -fPIC -pthread -std=c++11 -O2 -g -DNDEBUG
– Looking for ZLib
– Looking for Freetype
– Looking for PCRE
– Looking for LZMA
– Found LZMA includes at /home/huangl/publib/include
– Found LZMA library at /home/huangl/publib/lib/liblzma.so
– Looking for X11
– Could NOT find GIF (missing: GIF_LIBRARY GIF_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 Kerberos 5
– Looking for OpenSSL
– Looking for SQLite
– Looking for BLAS for optional parts of TMVA
– A library with BLAS API not found. Please specify library location.
– Enabled support for: asimage astiff builtin_afterimage builtin_ftgl builtin_gl2ps builtin_glew builtin_llvm builtin_tbb builtin_unuran cling cxx11 exceptions explicitlink fortran genvector imt krb5 mathmore memstat opengl pch python shadowpw shared sqlite ssl thread tmva x11 xft
– 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 ‘/home/huangl/publib/lib/gcc/x86_64-pc-linux-gnu/7.2.0/…/…/…/…/include/c++/7.2.0:/home/huangl/publib/lib/gcc/x86_64-pc-linux-gnu/7.2.0/…/…/…/…/include/c++/7.2.0/x86_64-pc-linux-gnu:/home/huangl/publib/lib/gcc/x86_64-pc-linux-gnu/7.2.0/…/…/…/…/include/c++/7.2.0/backward’ at runtime.
– And if not found, will invoke: ‘c++’ for them.
– Configuring done
– Generating done
– Build files have been written to: /home/huangl/packge/8.1-rc1/root-6.10.04/builddir

Maybe @mato coud help you with this issue.

Hi, the information you provided is not enough to let us help you. Please provide the full output since CMake configure step. For example, ROOT does not support yet C++17 builds. I regularly use GCC 7.2.0 and have no problems building ROOT recently.

– Found GCC. Major version 7, minor version 2
– Found a 64bit system
– Found GNU compiler collection
– 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 -fPIC -pthread -std=c++11 -O2 -g -DNDEBUG
– Looking for ZLib
– Looking for Freetype
– Looking for PCRE
– Looking for LZMA
– Found LZMA includes at /home/huangl/publib/include
– Found LZMA library at /home/huangl/publib/lib/liblzma.so
– Looking for X11
– Could NOT find GIF (missing: GIF_LIBRARY GIF_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 Kerberos 5
– Looking for OpenSSL
– Looking for SQLite
– Looking for BLAS for optional parts of TMVA
– A library with BLAS API not found. Please specify library location.
– Enabled support for: asimage astiff builtin_afterimage builtin_ftgl builtin_gl2ps builtin_glew builtin_llvm builtin_tbb builtin_unuran cling cxx11 exceptions explicitlink fortran genvector imt krb5 mathmore memstat opengl pch python shadowpw shared sqlite ssl thread tmva x11 xft
– 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 ‘/home/huangl/publib/lib/gcc/x86_64-pc-linux-gnu/7.2.0/…/…/…/…/include/c++/7.2.0:/home/huangl/publib/lib/gcc/x86_64-pc-linux-gnu/7.2.0/…/…/…/…/include/c++/7.2.0/x86_64-pc-linux-gnu:/home/huangl/publib/lib/gcc/x86_64-pc-linux-gnu/7.2.0/…/…/…/…/include/c++/7.2.0/backward’ at runtime.
– And if not found, will invoke: ‘c++’ for them.
– Configuring done
– Generating done
– Build files have been written to: /home/huangl/packge/8.1-rc1/root-6.10.04/builddir

It seems like there is a problem with your custom built compiler. Maybe the question on the link below may be of help:

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