[Makefile:130: all] Error 2 during REST installation


I am trying to install Rest on a new computer, but I encountered two problems:

(1) While installing all the libraries,

make -j6 install

gives multiple type errors in the process such as

error: ‘string’ does not name a type; did you mean ‘TString’?

and breaks with this message

[ 69%] Linking CXX shared library libRestRaw.so
[ 69%] Built target RestRaw
make: *** [Makefile:130: all] Error 2

(2) So I went back to a clean state (python3 pull-submodules.py --clean) and followed rigorously the notes online

cmake .. -DCMAKE_INSTALL_PREFIX=../install/master
make -j4 install

lead to a proper installation

-- REST release : v2.3.11
-- REST date : 2022-04-22 15:16:02 +0200
-- REST commit : 7a1761d4
-- REST branch : master
-- Clean state: No
-- REST Official release: No

But then if I run rawToSignal.rml with restManager,

Error in <TClass::New with placement>: cannot create object of class TRestMetadata version 9 at address 0x55fba10628e0

*** Break *** segmentation violation

I also tried to install only the libraries RAW and TRACK, which seemed the ones necessary for the raw-to-track processes, the installation worked but then I got the same message as before.

Here are the bash outputs:
cmake_output.txt (5.7 KB)
make_output.txt (55.9 KB)

Thank you in advance.

Hi Ugo, thanks for posting,

please, give us more details on how you execute restManager,

  • full command line, and a link to the rawToSignal.rml file you are using,
  • which repository that rml is coming from?
  • which input file are your providing to the restManager

What is the result of executing restRoot? And restRootMacros? It produces a clean output?

I use

restManager --c iaxo-analysis-master/rawToSignal.rml --f R10418_Background_23hr_Vm_340_Vd_113_Pr_1.4_Gain_0x1_Shape_0xD_Clock_0x02-000.aqs 

rawToSignal.rml (2.4 KB)

For the test, everything is in a folder containing the iaxo-analysis-master folder and the .aqs file.

I am currently reinstalling ROOT, but the output was clean when I tried restRoot.

It is estrange, could you share the full directory somewhere in a cloud to download and test?

Yes I guess I can do that. But what I forgot to say is that I used the same files on a previous computer and it worked. I only copied the full directory on my new computer.

I really think it is related to the REST installation (maybe ROOT).
At first I had ROOT installed with a precompiled version, so yesterday I tried to reinstall it using rest-framework/scripts/installation/installROOT.sh but my computer was crashing at some point
installROOT_output.txt (3.8 MB)
so I installed ROOT from source.
Now I’m back to my first problem of REST installation.

The installROOT.sh script it compiles ROOT also from source, I understand you mean you are compiling ROOT manually from the command line.

Or not sure if I understood it right, it is installROOT_output.txt the output from ./installROOT.sh execution? If so, try to reduce to CMAKE_CXX_STANDARD=14.

For the ROOT compilation, did you add the following definitions to cmake?

cmake -DCMAKE_CXX_STANDARD=17 -Dgdml=ON 

I believe you could try with cmake -DCMAKE_CXX_STANDARD=14 -Dgdml=ON

Because I understand where you are blocked is at ROOT compilation from source?

Once ROOT is properly compiled is also important that just before invoking cmake inside REST build directory, you are sure that it is using that ROOT version.

cd rest-framework/build
rm -rf *
source /path/to/root/installation/bin/thisroot.sh
cmake ..
make -j4 install

cmake caches that version of ROOT for next calls of cmake, if you do not do rm -rf * at your build directory, it will keep using the first one you assigned. I am 99% sure.

Check that your compiler supports c++17

gcc -v --help 2> /dev/null | sed -n '/^ *-std=\([^<][^ ]\+\).*/ {s//\1/p}' | grep ++17

Gives me the following output


I have


but changing -DCMAKE_CXX_STANDARD=17 to 14 makes it work, which is strange. But I hope that now ROOT is installed properly.

I always execute python3 pull-modules.py -clean before cmake which deletes automatically the REST build directory, and the source line is in my .bashrc file.

1 Like

Perhaps you have some system libraries linked by ROOT compiled using c++14, then it might be a cause of troubles. Just a guess

I don’t really know how to check this. But I reinstalled the prerequisites for ROOT and REST, and I was able to install ROOT with C++17.
The same problem remains for REST and I don’t know what to do.

Hi Ugo,

just before building make sure you are loading the right ROOT version. Usually, if you compiled ROOT without problems, REST should compile without problems.

Please, do once more, and do only this:

cd rest-framework/build
source /path/to/your/compiled/root/bin/thisroot.sh
which root
root-config --has-cxx17
cmake ..
make -j4 install
source /path/to/rest/installed/thisREST.sh

Send the output of everything.

1 Like

Hi Javier,
Thank you for your help and your patience. While following your recommendations, I changed the path to thisroot.sh, from the installation directory to the build directory. And it worked.

Here is what I did (in the rest-framework directory).

python3 pull-submodules.py --clean
mkdir build
cd build
source ~/Documents/build_root/bin/thisroot.sh    # was Documents/install_root/bin/thisroot.sh before
which root
>>> ~/Documents/build_root/bin/root
root-config --has-cxx17
>>> yes
make -j4 install
source ~/Documents/rest-framework/install/master/thisREST.sh
    W E L C O M E   to  R E S T 

  = REST Version: v2.3.12
  = Loading libraries ...
   - libRestDetector.so
   - libRestTrack.so
   - libRestRaw.so
   - libRestFramework.so
   - libRestConnectors.so

So thank you a lot for the help.

1 Like

I compiled using the latest and it worked.