Installing root cmake


Hi ROOT users,

I am installing root and when I tried cmake it, it gives me this error message. It’s not clear to me what went wrong. It would be much appreciated if someone could help me out.

[ 45%] Building CXX object core/dictgen/CMakeFiles/Dictgen.dir/src/LinkdefReader.cxx.o
[ 45%] Building CXX object core/dictgen/CMakeFiles/Dictgen.dir/src/rootcling_impl.cxx.o
/Users/kevinzheng/root/core/dictgen/src/rootcling_impl.cxx:4572:37: error: 
      indirection requires pointer operand ('std::ostream' (aka
      'basic_ostream<char>') invalid)
/Users/kevinzheng/root/core/dictgen/src/rootcling_impl.cxx:4826:37: error: 
      indirection requires pointer operand ('std::ostream' (aka
      'basic_ostream<char>') invalid)
2 errors generated.
make[2]: *** [core/dictgen/CMakeFiles/Dictgen.dir/src/rootcling_impl.cxx.o] Error 1
make[1]: *** [core/dictgen/CMakeFiles/Dictgen.dir/all] Error 2
make: *** [all] Error 2

Please read tips for efficient and successful posting and posting code

ROOT Version: 6.20.04
Platform: MacOS
Compiler: Not Provided

Hi, I’m not an expert, but when I installed the first time ROOT for Windows by sources I got errors because

  1. I didn’t have python x86
  2. I didn’t have git

Do you have them?

Thank you for your help!

I believe that I have them. Can it have something to do with the python version I’m using? eg. python 3 vs. python2?

Hi @kz200,
and welcome to the ROOT forum!
What git commit are you trying to build ROOT from? I.e. what does git log -1 print? You might want to checkout a more recent commit.


Hi @eguiraud
Thank you! I checked that and I think I used the latest one? Here is the returned message:
commit c7ca01fdfa28a006e1dff6921caed6f535544732 ( HEAD -> master , origin/master , origin/HEAD )

Author: shahoian

Date: Sat Apr 4 15:24:21 2020 +0200

That’s a pretty old commit (from April 4th) and you were so unlucky to actually find yourself in one of the very rare commits in master that happen to be broken.

If you want to compile ROOT master, pull a more recent version with git pull. Otherwise, I would suggest you check out one of the patch releases, which are not in active development and are more stable, e.g. git checkout v6-20-00-patches.

I am not a mac user, but I hear good things about brew install root, i.e. a ROOT installation via homebrew (see here).


1 Like

Thank you! The home-brew installation works well.

Hi @eguiraud,

May I ask another question about compilation of a package? I actually need to use a thermal model package called THERMUS for ROOT. I just tried to compile it with cmake, but I got an error which made me a little lost:

CMake Error at CMakeLists.txt:21 (include):
include could not find load file:


– Customised the linking flags depending on the platform: -single_module -undefined dynamic_lookup -lm
– Source folder: /Users/kevinzheng/thermus
– which should correspond to $THERMUS
– CMake platform: Darwin-19.5.0
– Build folder: /Users/kevinzheng/thermus/build
– Shared Object Library folder: /Users/kevinzheng/thermus/build/lib
CMake Error at /usr/local/share/root/cmake/RootMacros.cmake:571 (install):
install FILES given no DESTINATION!
Call Stack (most recent call first):

– Configuring incomplete, errors occurred!
See also “/Users/kevinzheng/thermus/build/CMakeFiles/CMakeOutput.log”.
make: *** No targets specified and no makefile found. Stop.

The shell command file I use is as follows:

#!/bin/bash -e

checked on 07/03/2018 with root-v6-12-06 (B.H.)


export BASEDIR=$(pwd)

if [[ (export | egrep "THERMUS\=" | wc -l == 0 ) || ( ! $THERMUS ) ]]

then echo 'first make sure the shell variable {THERMUS} is set to the THERMUS code directory and



rm -rf build

mkdir build

cd build

cmake -Wdev -debug-output -DCMAKE_VERBOSE_MAKEFILE=ON …

cmake --build . – -j10



Many thanks in advance!

Hi Kevin,
I’m afraid this is a question for the THERMUS developers :smiley:

I am having the same issue. Did this work ? Also would be really helpful of you could explain what the third line of code does. Thank you!

Hi Aleena, are you installing Thermus or just ROOT?

Hey Kevin! I was installing THERMUS and I think I might’ve built it(not sure). Where is ROOTSYS pointing to in your system ? I think that might be the reason we were experiencing problems.

Hi Aleena!

Glad that you did! The ROOTSYS points to the root installation directory in my system. May I know how you set it?

It seems that setting ROOTSYS to the directory that contains root code will do the trick.

Yes. The directory which hasn’t been built.(unzipped one)