Having trouble installing ROOT and FRAMELIB

Hello everyone,

I am trying to install coherent waveburst (cWB), which requires the ROOT and FRAMELIB libraries. The cWB site offers these instructions to install ROOT version 6.24.6 from source:

git clone <git link>
cd root
git checkout -b v6-24-06 v6-24-06
mkdir -p root/build_root; cd  root/build_root
cmake .. -DCMAKE_INSTALL_PREFIX:PATH=${HOME}/SOFT/ROOT/root_v6-24-06;
cmake --build . --verbose --parallel ${CPU_COUNT}
cmake --build . --verbose --parallel ${CPU_COUNT} --target install

At around 70% it starts producing many fatal errors saying

"x86_64-conda-linux-gnu-c++: fatal error: Killed signal terminated program cc1plus"

and proceeds too slowly, so I terminate it.

I then proceed with a pre-compiled version and it seems to be installed just fine. I try to install FRAMELIB version 8.33 according to these instructions from cWB.

wget <git link>
tar zxvf libframe-8.33.tar.gz
mv libframe-8.33 libframe-8.33_root-6.14.06

# edit libframe-8.33_root-6.14.06/root/build
# set ROOTSYS = "/home/waveburst/SOFT/ROOT/root_v6.24.06/"

cd mgr
./makegcc
cd ../root
./build
cd ..
ln -s Linux-x86_64 Linux

Everything seem OK until the ./build command, where it produces some errors and terminates. Some of the errors are:

error: "ROOT requires support for C++11 or higher."
error: "Pass `-std=c++11` as compiler argument."

I am using the conda environment igwn-py39 . Ubuntu-20.04 .

Does anyone know how to solve this?
I suppose it could have something to do with the version of the C++ standard used by the compiler?

I should note that I do not understand completely what all these commands I am entering do (only vaguely). So it could be entirely possible that I am doing something wrong with the inputs.

I have pasted the outputs of the commands on pastebin, but since this is my first post, I am not allowed to post links.

Thank you all in advance.

ROOT Version: 6.24/6
Platform: Ubuntu 20.04.3
Compiler: Not Provided


Welcome to the ROOT Forum!
As the error message tells, you have to pass -std=c++11 somehow when building FRAMELIB (try to edit the build script maybe). And in general, one should use `root-config --cflags` when building projects using ROOT libraries

1 Like

The “Killed signal terminated program cc1plus” possibly means the system ran out of free RAM (try to set “CPU_COUNT=1”).
As a rule of thumb, the “CPU_COUNT” should be equal to, at most, “installed_RAM / 2GB - 1” (“-1” leaves 2GB for the operating system itself).

I assume the “pre-compiled version” was built with the default system-provided compiler. Then you cannot mix it with C++ code compiled by “conda” (which usually uses its own incompatible compiler).

1 Like

Regarding the installation from source. Switched to base conda environment and set ${CPU_COUNT=10} (I’m in a computer cluster) and it seems to have solved it. Thank you very much!

1 Like

I think I managed to install ROOT from source. Also, I switched to base conda environment. Now, when trying to install FRAMELIB, the ./build command says

-----------------------------------------------Run CINT
rootcint: Command not found.
------------------------------------compile CINT output
g++: error: G_frameL.C: No such file or directory
g++: fatal error: no input files
compilation terminated.
----------------------------- build ROOT Shared Library
------------------------------------------------cleanup

and stops compilation.

Also, I am not familiar with the use of root-config --cflags . Where am I supposed to use it and what does it do?

Make sure you have $ROOTSYS set and $ROOTSYS/bin in your PATH. If not, source /where/is/root/bin/thisroot.sh before continuing

1 Like

For this specific point, that’s a terminal command that outputs some compilation flags useful to compile ROOT-based C++ programs. You can check what those flags are by running the command in your terminal, it’s just so that you don’t have to manually specify the different -I... (for --cflags) and -L... -l... (for --libs) flags.

Cheers,
Enrico

1 Like