Setting ROOT for a dummie

Hi, I am totally new to linux and I have to start root. I am trying to do that with this build from source instruction and in the quick start point 4 I copy
“make --build . --target install [-- ]”
but I do not know what to do with the part <options…> and I get a response:
$ cmake --build . --target install [-- ]
bash: options: No such file or directory
When I erased this part completely sth was happening but it took very long and did not finish.
Sorry for writing so chaotically but this is completely new to me and I do not know how to name some of the parts.


Please read tips for efficient and successful posting and posting code

_ROOT Version: v6.22.00
Platform: Not Provided
Compiler: Not Provided


cmake --build . --target install [-- <options to the native tool>]

Hello and welcome to the ROOT forum!

If you are new to Linux, I’d suggest to get ROOT from a binary distribution: https://root.cern.ch/releases/release-62200/#binary-distributions

If you don’t find your OS in the list, you can follow this guide to build it from sources: https://root.cern/install/build_from_source/

Cheers,
Jakob

Thanks for the advice.
I am trying to build it from source because I was instructed to do so for project that I am going to attend. Could you explain what I am doing wrong? I am attaching what I tried to do and the view of the folder.

It looks like a typo in the cmake command for the location of your ROOT sources: There is a missing slash at the beginning of the directory. Try with /home/natalia/... (instead of home/natalia/...).

Cheers,
Jakob

1 Like

After repairing that typo I occured another error… I am attaching my terminal messeges, because I do not know how to deal with that, but I am sure I cannot go forward

natalia@natalia-VirtualBox:~/praktyki/root_build$ cmake --build . --target install
Scanning dependencies of target LZMA
[ 0%] Creating directories for ‘LZMA’
[ 0%] Performing download step (verify and extract) for ‘LZMA’
– LZMA download command succeeded. See also /home/natalia/praktyki/root_build/LZMA-prefix/src/LZMA-stamp/LZMA-download-.log
[ 0%] No patch step for ‘LZMA’
[ 0%] No update step for ‘LZMA’
[ 0%] Performing configure step for ‘LZMA’
– LZMA configure command succeeded. See also /home/natalia/praktyki/root_build/LZMA-prefix/src/LZMA-stamp/LZMA-configure-
.log
[ 0%] Performing build step for ‘LZMA’
– LZMA build command succeeded. See also /home/natalia/praktyki/root_build/LZMA-prefix/src/LZMA-stamp/LZMA-build-.log
[ 0%] Performing install step for ‘LZMA’
– LZMA install command succeeded. See also /home/natalia/praktyki/root_build/LZMA-prefix/src/LZMA-stamp/LZMA-install-
.log
[ 0%] Completed ‘LZMA’
[ 0%] Built target LZMA
Scanning dependencies of target XROOTD
[ 0%] Creating directories for ‘XROOTD’
[ 0%] Performing download step (download, verify and extract) for ‘XROOTD’
– XROOTD download command succeeded. See also /home/natalia/praktyki/root_build/XROOTD-prefix/src/XROOTD-stamp/XROOTD-download-.log
[ 0%] No patch step for ‘XROOTD’
[ 0%] No update step for ‘XROOTD’
[ 0%] Performing configure step for ‘XROOTD’
– XROOTD configure command succeeded. See also /home/natalia/praktyki/root_build/XROOTD-prefix/src/XROOTD-stamp/XROOTD-configure-
.log
[ 0%] Performing build step for ‘XROOTD’
CMake Error at /home/natalia/praktyki/root_build/XROOTD-prefix/src/XROOTD-stamp/XROOTD-build-Release.cmake:49 (message):
Command failed: 2

‘/usr/bin/make’

See also

/home/natalia/praktyki/root_build/XROOTD-prefix/src/XROOTD-stamp/XROOTD-build-*.log

make[2]: *** [CMakeFiles/XROOTD.dir/build.make:113: XROOTD-prefix/src/XROOTD-stamp/XROOTD-build] Error 1
make[1]: *** [CMakeFiles/Makefile2:6877: CMakeFiles/XROOTD.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

Did you check whether all the required dependencies (including the most common dependencies) are already installed properly?

What do

/home/natalia/praktyki/root_build/XROOTD-prefix/src/XROOTD-stamp/XROOTD-build-*.log

files contain? A look at these files may help you.

I do not have only this one - libqt4-dev… Checked all others and now I got an error after 46%.
Do you have an idea what can be wrong?

Update: I got to 66%,but then another error occured:

What is the gcc version that you are using to compile? From your last post, it is difficult to locate the module that is responsible for the error.

Can you please try compiling with -Druntime_cxxmodules=OFF?

This is the version of gcc I am using: (Ubuntu 9.3.0-10ubuntu2) 9.3.0
In which part of the command should I add -Druntime_cxxmodules=OFF?

I suggest to run the following sequence of commands from your build directory i.e. “root_build”:

  1. make clean
    (or even better "rm -fr" in your “root_build” directory, this is very dangerous command! It will delete everything in the directory where you are working currently without asking. Therefore, be careful before executing)

  2. cmake ../root_src -DCMAKE_INSTALL_PREFIX=../root_install -Druntime_cxxmodules=OFF

once this proceeds without any error then issue:

  1. cmake --build . -- -jN

here “N” is the number of available cores on your machine. You can use “nproc” command in the linux terminal to get this number. When this proceeds without any problem, run:

  1. make install

Hope this helps.

2 Likes

Thank you soooo much :smiley: It worked just fine.

Good to know that it worked! Now, enjoy ROOTing :+1: