Building root v6-25-02 from source

_ROOT Version: On branch v6-25-02
_Platform: Linux 5.13.0-28-generic #31-Ubuntu SMP Thu Jan 13 17:41:06 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
_Compiler: g++ (Ubuntu 11.2.0-7ubuntu2) 11.2.0

git clone
git checkout -b $(git tag -l | tail -n 1) $(git tag -l | tail -n 1)
cmake -DMAKE_INSTALL_PREFIX=../root_install ../root

-- ROOT Configuration 

System          Linux-5.13.0-28-generic
Processor       6 core Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (x86_64)
Build type      Release
Install path    /usr/local
Compiler        GNU 11.2.0
Compiler flags:
C                -Wno-implicit-fallthrough -pipe -Wall -W -pthread -O3 -DNDEBUG
C++              -std=c++17 -Wno-implicit-fallthrough -Wno-noexcept-type -pipe  -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -pthread -O3 -DNDEBUG
Linker flags:
Executable       -rdynamic
Shared           -Wl,--no-undefined -Wl,--hash-style="both"

-- Enabled support for:  asimage builtin_afterimage builtin_clang builtin_cling builtin_gl2ps builtin_llvm builtin_lz4 builtin_lzma builtin_nlohmannjson builtin_openui5 builtin_tbb builtin_vdt builtin_xrootd builtin_xxhash clad dataframe exceptions fftw3 fitsio gdml http imt mathmore mlp minuit2 mysql opengl pyroot roofit webgui root7 rpath runtime_cxxmodules shared ssl tmva tmva-cpu spectrum vdt x11 xml xrootd
-- Configuring done
-- Generating done

cmake --build . -j11
~/root_build$ root
  | Welcome to ROOT 6.25/02               |
  | (c) 1995-2021, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for linuxx8664gcc on Feb 20 2022, 03:07:51                 |
  | From tags/v6-25-02@v6-25-02                                      |
  | With c++ (Ubuntu 11.2.0-7ubuntu2) 11.2.0                         |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q'       |

root [0] .q
$ root
root: version `CXXABI_1.3.8' not found (required by root)
root: version `CXXABI_1.3.9' not found (required by root)
root: version `GLIBCXX_3.4.21' not found (required by root)

I have no clue why I’m getting these errors when I’m outside the build directory. I get segfaults and crashes when it runs inside the build directory, so there seems to be something fundamentally wrong with my entire build. Any insights/ideas on debugging would be greatly appreciated. I tried to follow the docs as closely as possible.

Found this video really helpful:- CERN ROOT Tutorial 2: Installing ROOT - YouTube
And this part of the Documentation:- Installing ROOT - ROOT
btw did u installed the dependencies:- Dependencies - ROOT (use the one-liners)
Hope this helps

The compiler you use is not the default system one, and there is a mismatch in C++ runtime libraries between what the compiler built with versus what’s available at runtime.

If you build any C++ binary (no ROOT involved) with your compiler then you should see the same.

Hi Axel, I’m not entirely sure how I got a mismatch between the compiler used for ROOT (I used whatever came with Ubuntu):

g++ --version
g++ (Ubuntu 11.2.0-7ubuntu2) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO

It turned out that as long as I had a cmake install target and did a ‘make install’ I got a clean version of ROOT that worked.

In the past you could build root in the same directory that the source code was in and run and it would set the paths properly for that version.

Maybe this is an issue with Ubuntu 21.10.

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