I have just moved to the development branch (I was still in 2.2.18), and now when I try to execute restRoot I get a long list of warnings mostly related to files in REST_PATH/install/macros.
I attach the terminal output with all these warnings here: output_restRoot.txt (13.2 KB) .
In file included from input_line_333:1:
/media/storage/home/cristina/GitLab/REST_v2/install/macros/printers/REST_PrintDataBase.C:18:13: error: no viable conversion from 'Int_t' (aka 'int') to 'std::__cxx11::string' (aka 'basic_string<char>')
db->print(run);
However, the latest REST_PrintDataBase.C code at line 18, at which the error happens, has been updated by in the latest version of the code:
db->print(Form("select * from rest_runs where run_id=%i", run));
Did you execute make -j4 install after building REST? If this does not solve the problems, please provide the output of executing make -j4 install.
Hi Cristina, if the output is not extremely long, you may add it directly here so that the text is searchable by the discourse system.
A trick to avoid using a lot of screen space here in discourse is to encapsulate the output between [detail=output] your output [/detail]. As I am doing here. It is effective when [detail] and [\detail] is using a full line. Notice that this trick is good even if it is long.
make -j4 output
cristina@sultan:~/GitLab/REST_v2/build$ git pull
Already up-to-date.
cristina@sultan:~/GitLab/REST_v2/build$ make -j4 install
[ 8%] Built target RestTools
[ 18%] Built target RestCore
[ 33%] Built target RestMetadata
[ 48%] Built target RestEvents
[ 96%] Built target RestProcesses
[ 97%] Linking CXX executable restRoot
[ 97%] Linking CXX executable restManager
[ 98%] Linking CXX executable restG4
…/processes/libRestProcesses.so: referencia a typeinfo for TRestMessagerAndReciever' sin definir ./processes/libRestProcesses.so: collect2: error: ld returned 1 exit status referencia a typeinfo for TRestMessagerAndReciever’ sin definir
collect2: error: ld returned 1 exit status
source/bin/CMakeFiles/restManager.dir/build.make:99: fallo en las instrucciones para el objetivo ‘source/bin/restManager’
source/bin/CMakeFiles/restRoot.dir/build.make:99: fallo en las instrucciones para el objetivo ‘source/bin/restRoot’
make[2]: *** [source/bin/restManager] Error 1
make[2]: *** [source/bin/restRoot] Error 1
CMakeFiles/Makefile2:467: fallo en las instrucciones para el objetivo ‘source/bin/CMakeFiles/restManager.dir/all’
make[1]: *** [source/bin/CMakeFiles/restManager.dir/all] Error 2
make[1]: *** Se espera a que terminen otras tareas…
CMakeFiles/Makefile2:426: fallo en las instrucciones para el objetivo ‘source/bin/CMakeFiles/restRoot.dir/all’
make[1]: *** [source/bin/CMakeFiles/restRoot.dir/all] Error 2
…/…/source/processes/libRestProcesses.so: referencia a `typeinfo for TRestMessagerAndReciever’ sin definir
collect2: error: ld returned 1 exit status
packages/restG4/CMakeFiles/restG4.dir/build.make:338: fallo en las instrucciones para el objetivo ‘packages/restG4/restG4’
make[2]: *** [packages/restG4/restG4] Error 1
CMakeFiles/Makefile2:526: fallo en las instrucciones para el objetivo ‘packages/restG4/CMakeFiles/restG4.dir/all’
make[1]: *** [packages/restG4/CMakeFiles/restG4.dir/all] Error 2
Makefile:129: fallo en las instrucciones para el objetivo ‘all’
make: *** [all] Error 2
TRestMessagerAndReciever is a new class added very recently, I guess, in order for the compilation system to recognise it you need to use again cmake ../. This is a small weakness of the compilation system that does not identify new added classes, and need to be re-identified by using cmake. But at least this way we do not even need to modify the cmake compilation code.
I hope cmake solves the problem.
BTW, @nkx TRestMessagerAndReciever is misspelled, should be TRestMessagerAndReceiver, and I doubt if it would be more appropriate TRestMessengerAndReceiver. If I write Messager in google it replaces by Messenger.
So now I attach the output of make -j4 install (using Javi’s trick, thanks!) as I still have the list of warnings when I try to execute restRoot.
(EDIT: I don’t know why the font of the hidden text is huge!)
make -j4 output after cmake
cristina@sultan:~/GitLab/quickAnaREST_CAST$ restRoot
Loading library : libRestMetadata.so
Loading library : libRestCore.so
Loading library : libRestEvents.so
Loading library : libRestProcesses.so
Loading library : libRestTools.so
In file included from input_line_334:1:
/media/storage/home/cristina/GitLab/REST_v2/install/macros/printers/REST_PrintDataBase.C:18:13: error: no viable conversion from ‘Int_t’ (aka ‘int’) to ‘std::__cxx11::string’ (aka ‘basic_string’)
db->print(run);
^~~
/usr/include/c++/6/bits/basic_string.h:397:7: note: candidate constructor not viable: no known conversion from ‘Int_t’ (aka ‘int’) to ‘const std::__cxx11::basic_string &’ for 1st
argument
basic_string(const basic_string& __str)
^
/usr/include/c++/6/bits/basic_string.h:454:7: note: candidate constructor not viable: no known conversion from ‘Int_t’ (aka ‘int’) to 'const char ’ for 1st argument
basic_string(const _CharT __s, const _Alloc& __a = _Alloc())
^
/usr/include/c++/6/bits/basic_string.h:476:7: note: candidate constructor not viable: no known conversion from ‘Int_t’ (aka ‘int’) to ‘std::__cxx11::basic_string &&’ for 1st argument
basic_string(basic_string&& __str) noexcept
^
/usr/include/c++/6/bits/basic_string.h:503:7: note: candidate constructor not viable: no known conversion from ‘Int_t’ (aka ‘int’) to ‘initializer_list’ for 1st argument
basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
^
/home/cristina/GitLab/REST_v2/install/include/TRestDataBase.h:104:31: note: passing argument to parameter ‘cmd’ here
virtual void print(string cmd) {}
^
In file included from input_line_339:1:
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_QuickLookAnalysis.C:15:5: error: use of undeclared identifier ‘cout’
cout << "Filename : " << fName << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_QuickLookAnalysis.C:21:9: error: use of undeclared identifier ‘cout’
cout << “WARNING. Input file does not exist” << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_QuickLookAnalysis.C:43:9: error: use of undeclared identifier ‘cout’
cout << “WARNING no TRestG4Metadata class was found” << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_QuickLookAnalysis.C:47:9: error: use of undeclared identifier ‘cout’
cout << “WARNING no TRestRun class was found” << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_QuickLookAnalysis.C:63:5: error: use of undeclared identifier ‘cout’
cout << "Total number of entries : " << tr->GetEntries() << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_QuickLookAnalysis.C:67:5: error: use of undeclared identifier ‘cout’
cout << “Obtainning max/min values” << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_QuickLookAnalysis.C:69:33: error: use of undeclared identifier ‘cout’
if (evId % 100000 == 0) cout << "Event : " << evId << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_QuickLookAnalysis.C:104:5: error: use of undeclared identifier ‘cout’
cout << “Filling histograms” << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_QuickLookAnalysis.C:107:33: error: use of undeclared identifier ‘cout’
if (evID % 100000 == 0) cout << "Event : " << evID << endl;
^
In file included from input_line_340:1:
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_FindGammasEmitted.C:5:5: error: use of undeclared identifier ‘cout’
cout << "Filename : " << fName << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_FindGammasEmitted.C:11:9: error: use of undeclared identifier ‘cout’
cout << “WARNING. Input file does not exist” << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_FindGammasEmitted.C:33:9: error: use of undeclared identifier ‘cout’
cout << “WARNING no TRestG4Metadata class was found” << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_FindGammasEmitted.C:37:9: error: use of undeclared identifier ‘cout’
cout << “WARNING no TRestRun class was found” << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_FindGammasEmitted.C:60:32: error: use of undeclared identifier ‘cout’
if (evID % 50000 == 0) cout << "Event : " << evID << endl;
^
In file included from input_line_341:1:
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_GetROIEvents.C:14:5: error: use of undeclared identifier ‘cout’
cout << "Filename : " << fName << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_GetROIEvents.C:19:9: error: use of undeclared identifier ‘cout’
cout << “WARNING. Input file does not exist” << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_GetROIEvents.C:40:5: error: use of undeclared identifier ‘cout’
cout << "Total contribution in the ROI : " << totalContribution << endl;
^
In file included from input_line_342:1:
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_GetBiasingError.C:6:5: error: use of undeclared identifier ‘cout’
cout << "Filename : " << fName << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_GetBiasingError.C:13:9: error: use of undeclared identifier ‘cout’
cout << “WARNING. Input file does not exist” << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_GetBiasingError.C:35:9: error: use of undeclared identifier ‘cout’
cout << “WARNING no TRestG4Metadata class was found” << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_GetBiasingError.C:39:9: error: use of undeclared identifier ‘cout’
cout << “WARNING no TRestRun class was found” << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_GetBiasingError.C:55:5: error: use of undeclared identifier ‘cout’
cout << "Number of biasing volumes : " << metadata->GetNumberOfBiasingVolumes() << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_GetBiasingError.C:65:9: error: use of undeclared identifier ‘cout’
cout << "Number of counts in bias " << i << " " << h->Integral() << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_GetBiasingError.C:80:5: error: use of undeclared identifier ‘cout’
cout << "Number of events in ROI : " << roiEvents << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_GetBiasingError.C:84:5: error: use of undeclared identifier ‘cout’
cout << "The error is : " << error << endl;
^
In file included from input_line_343:1:
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_GetROIEvents_Fiducial.C:8:5: error: use of undeclared identifier ‘cout’
cout << "Filename : " << fName << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_GetROIEvents_Fiducial.C:11:5: error: use of undeclared identifier ‘cout’
cout << “x” << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_GetROIEvents_Fiducial.C:14:9: error: use of undeclared identifier ‘cout’
cout << “WARNING. Input file does not exist” << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_GetROIEvents_Fiducial.C:29:5: error: use of undeclared identifier ‘cout’
cout << "Total number of entries : " << run->GetEntries() << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_GetROIEvents_Fiducial.C:36:29: error: use of undeclared identifier ‘cout’
if (i % 10000 == 0) cout << "Event " << i << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_GetROIEvents_Fiducial.C:73:5: error: use of undeclared identifier ‘cout’
cout << "Total contribution in the ROI : " << totalContribution << endl;
^
In file included from input_line_344:1:
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_ListIsotopes.C:5:5: error: use of undeclared identifier ‘cout’
cout << "Filename : " << fName << ", storing info in " << fOutName << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_ListIsotopes.C:7:5: error: unknown type name ‘ofstream’
ofstream fOut;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_ListIsotopes.C:14:9: error: use of undeclared identifier ‘cout’
cout << “WARNING. Input file does not exist” << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_ListIsotopes.C:20:9: error: use of undeclared identifier ‘cout’
cout << “WARNING no TRestG4Run class was found” << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_ListIsotopes.C:38:5: error: use of undeclared identifier ‘cout’
cout << "Total number of entries : " << run->GetEntries() << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_ListIsotopes.C:86:5: error: use of undeclared identifier ‘cout’
cout << “closing file” << endl;
^
In file included from input_line_345:1:
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_MeanTrackLeng.C:15:5: error: use of undeclared identifier ‘cout’
cout << "Filename : " << fName << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_MeanTrackLeng.C:21:9: error: use of undeclared identifier ‘cout’
cout << “WARNING. Input file does not exist” << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_MeanTrackLeng.C:43:9: error: use of undeclared identifier ‘cout’
cout << “WARNING no TRestG4Metadata class was found” << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_MeanTrackLeng.C:47:9: error: use of undeclared identifier ‘cout’
cout << “WARNING no TRestRun class was found” << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_MeanTrackLeng.C:67:33: error: use of undeclared identifier ‘cout’
if (evID % 100000 == 0) cout << "Event : " << evID << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_MeanTrackLeng.C:75:5: error: use of undeclared identifier ‘cout’
cout << "Mean track length : " << meanLength / tracks << endl;
^
In file included from input_line_346:1:
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_FindIsotopes.C:5:5: error: use of undeclared identifier ‘cout’
cout << "Filename : " << fName << " looking for " << fIsotope << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_FindIsotopes.C:13:9: error: use of undeclared identifier ‘cout’
cout << “WARNING. Input file does not exist” << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_FindIsotopes.C:19:9: error: use of undeclared identifier ‘cout’
cout << “WARNING no TRestG4Run class was found” << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_FindIsotopes.C:39:5: error: use of undeclared identifier ‘cout’
cout << "Total number of entries : " << run->GetEntries() << endl;
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_FindIsotopes.C:53:25: error: use of undeclared identifier ‘cout’
cout << "Track : " << i << " → " << ev->GetTrack(i)->GetParticleName() << " "
^
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_FindIsotopes.C:64:9: error: use of undeclared identifier ‘cout’
cout << "Number of " << fIsotope << " nuclei activated = " << j << endl;
^
In file included from input_line_347:1:
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_ReadNEvents_inROI.C:35:13: error: use of undeclared identifier ‘cout’
cout << n << " event with " << en << " energy in sensitive volume " << endl;
^
In file included from input_line_348:1:
/media/storage/home/cristina/GitLab/REST_v2/install/macros/geant4/REST_ReadNEvents.C:10:9: error: use of undeclared identifier ‘cout’
cout << “WARNING. Input file does not exist” << endl;
^
| Welcome to ROOT 6.14/04 http://root.cern.ch |
| (c) 1995-2018, The ROOT Team |
| Built for linuxx8664gcc |
| From tags/v6-14-04@v6-14-04, Aug 23 2018, 17:00:44 |
A quick solution is to remove /media/storage/home/cristina/GitLab/REST_v2/install/macros/ directory or just rename it.
It seems that /media/storage/home/cristina/GitLab/REST_v2/install/macros/printers/REST_PrintDataBase.C is still out-dated. Can you show the install messages from make install? Something like: