Home | News | Documentation | Download

Trouble with cmake (installing ROOT from source)

Hello! I’m trying to install ROOT from source to my system (Linux Mint 19.3 Cinnamon), since I encountered some problems trying to install it differently (see post here).

Now, I’m following the steps found here. I downloaded root_v6.22.02.source.tar.gz and I completed the first 3 steps. However, I don’t understand what I have to do in the fourth step. I don’t believe just running

cmake --build . --target install [-- ]

does anything, so I run

cmake --build . --target install [–

and

cmake --build . --target install

to no avail, as the output was

make: *** No rule to make target ‘install’. Stop.

and

Unknown argument [–rootInstall
Usage: cmake --build [options] [-- [native-options]]
Options:

= Project binary directory to be built. --target = Build instead of default targets. May only be specified once. --config = For multi-configuration tools, choose . --clean-first = Build target 'clean' first, then build. (To clean only, use --target 'clean'.) --use-stderr = Ignored. Behavior is default in CMake >= 3.0. -- = Pass remaining options to the native tool.

I don’t understand how to continue and the instructions aren’t clear. Can anybody help me, please? Thank you in advance!

Hi,
you need to run cmake --build . (which starts the build) in the same directory where you ran cmake <sourcedir> (which configured the build). This directory must be a new directory that you created for this purpose (in particular, the build directory must be different from ROOT’s source directory).

Note that you can also install ROOT e.g. via conda without having to compile it (and with the conda package you will not have the issues described in the other post, that are most likely due to an incompatibility between your system (Linux Mint 19.3) and the system the package was built for (Ubuntu 20 or 18).

Hope this helps!
Enrico

I actually went ahead and installed ROOT via conda. It took some time, but now it is finally working! Thank you!

Link to instructions for installation via conda:


and