Older Root Package

I think I am done with this new trial version of ROOT. I tried to get rid of the path to the ROOT headers, but the make command still tracks the history and picks up the root headers from where it first found them, even though I have removed all reference to the path from my CMakeLists.txt.

Please recommend a workable ROOT version prior to this newer error-filled version, that I could use.

thanks, Neera

Hi,
I am not sure I understand your problem. Can you please explain it better ?
If you have an older version of ROOT installed, maybe it is easier to remove it if you are not using it anymore
Best,
Lorenzo

It would be good to know how you installed root. In general, I also do not understand the question, but can’t you simply delete the folder, where root was installed and afterwards install root again? There are a lot of different versions available (https://root.cern/install/). Maybe you can just install the last version that worked for you?

Thank you Moneta and Emil. I am just beginning to work with Geant4 and for my code, I need to access root libraries, hence I needed to install ROOT. I installed the latest version (unoffcial - the 26.10) of ROOT and used cmake and make to install it. I installed all the prerequisites prior to downloading this latest version, un-tar -ing it, and installing ROOT using cmake and make. It took a while but everything got installed.

when I ran my Geant4 code which called some of the root headers, I ran into multiple errors, originating from the headers that are called by the headers I was using. For example, the T(whatever). h called T(something else).h, which had syntax errors, undefined functions in that scope, etc. the executable state ran into pages and pages of errors, all related to root headers ( I posted some of them on the same day, in this forum).

I just want an error-free version of root that is tested and completely debugged. If you can advise which version I can install, I will Uninstall the current new version and install the older version. Thanks.

I am using root 6.24 which has no problems. Version 6.26 worked fine as well. I have not used them in combination with Geant4 but they should work fine.

Thank you. I will try that out and see how it works.

Good Afternoon Emil,

I used 6.26.8 as opposed to 6.26.10. I was hoping to get fewer errors but i got the same errors as before. I wonder if I am not doing something right in giving the command:

^~~~~~~~~~~~~~~~~

/home/neera/root/include/TBranch.h:291:4: note: in expansion of macro ‘ClassDef’
ClassDef(TBranch, 13); // Branch descriptor
^~~~~~~~
/home/neera/root/include/Rtypes.h:281:67: error: expected primary-expression before ‘)’ token
::ROOT::Internal::HasConsistentHashMember(QUOTE(name)) ||
^
/home/neera/root/include/Rtypes.h:300:4: note: in expansion of macro ‘ClassDefBase
ClassDefBase(name,id, virtual_keyword, overrd)
^~~~~~~~~~~~~~
/home/neera/root/include/Rtypes.h:330:4: note: in expansion of macro ‘ClassDefOutline
ClassDefOutline(name,id,override)
^~~~~~~~~~~~~~~~~
/home/neera/root/include/TDirectory.h:299:4: note: in expansion of macro ‘ClassDefOverride’
ClassDefOverride(TDirectory,5) //Describe directory structure in memory
^~~~~~~~~~~~~~~~
/home/neera/root/include/Rtypes.h:281:55: error: ‘QUOTE’ was not declared in this scope
/home/neera/root/include/TDatime.h: In member function ‘virtual Bool_t TDatime::CheckTObjectHashConsistency() const’:
/home/neera/root/include/Rtypes.h:275:11: error: ‘R__likely’ was not declared in this scope
if (R__likely(recurseBlocker >= 2)) {
^
/home/neera/root/include/Rtypes.h:300:4: note: in expansion of macro ‘ClassDefBase
ClassDefBase(name,id, virtual_keyword, overrd)
^~~~~~~~~~~~~~
/home/neera/root/include/Rtypes.h:326:4: note: in expansion of macro ‘ClassDefOutline
ClassDefOutline(name,id,virtual,)
^~~~~~~~~~~~~~~~~
/home/neera/root/include/TDatime.h:95:4: note: in expansion of macro ‘ClassDef’
ClassDef(TDatime,1) //Date and time 950130 124559
^~~~~~~~
/home/neera/root/include/Rtypes.h:281:67: error: expected primary-expression before ‘)’ token
::ROOT::Internal::HasConsistentHashMember(QUOTE(name)) || \

^~~~~~~~

/home/neera/root/include/TDirectoryFile.h: In member function ‘virtual Bool_t TDirectoryFile::CheckTObjectHashConsistency() const’:
/home/neera/root/include/Rtypes.h:275:11: error: ‘R__likely’ was not declared in this scope
if (R__likely(recurseBlocker >= 2)) {

            ^~~~~~~~~~~~~~~~~

/home/neera/root/include/TUrl.h:98:4: note: in expansion of macro ‘ClassDef’
ClassDef(TUrl,1) //Represents an URL
^~~~~~~~
In file included from include/RunAction.hh:42:0,
from src/RunAction.cc:40:
/home/neera/root/include/TTree.h: In destructor ‘virtual TTreeFriendLeafIter::~TTreeFriendLeafIter()’:
/home/neera/root/include/TTree.h:678:29: error: ‘SafeDelete’ was not declared in this scope
~TTreeFriendLeafIter() { SafeDelete(fLeafIter); SafeDelete(fTreeIter); }
^~~~~~~~~~
/home/neera/root/include/TTree.h:678:29: note: suggested alternative: ‘kCanDelete’
~TTreeFriendLeafIter() { SafeDelete(fLeafIter); SafeDelete(fTreeIter); }
^~~~~~~~~~

from src/EventAction.cc:37:
/home/neera/root/include/TFile.h: In member function ‘Bool_t TFile::IsBinary() const’:
/home/neera/root/include/TFile.h:253:50: error: ‘TestBit’ was not declared in this scope
Bool_t IsBinary() const { return TestBit(kBinaryFile); }
^~~~~~~
/home/neera/root/include/TFile.h:253:50: note: suggested alternative: ‘TestBits’
Bool_t IsBinary() const { return TestBit(kBinaryFile); }

finally the error summary:

make: *** [/opt/geant4/geant4.10.04.p02/config/common.gmk:79: /home/neera/geant4_workdir/tmp/Linux-g++/west/EventAction.o] Error 1
make: *** [/opt/geant4/geant4.10.04.p02/config/common.gmk:79: /home/neera/geant4_workdir/tmp/Linux-g++/west/RunAction.o] Error 1
[neera@vm-nii-fc27-a ~/xraywest]$

Help me decode the error, please!

Attach the “make.log.txt” file generated by:

Good Morning Wile,

I typed:
make VERBOSE=true 2>&1 | tee make.log.txt
and it did not work. I got the message: Ambiguous output redirect and the compilation did not start.

Try:
make VERBOSE=true |& tee make.log.txt

thanks, I will try that on Tuesday (I only go to work twice a week, so the process is slow until I can somehow convince my IT team to connect me from home.

I checked the root version which the make is using. it is 6.26.10 - so these errors of R__likely not working and QUOTE(name) not defined in the current scope (repeated errors, but the same one) are related to this version

Good Morning Wile,

That command worked. It did generate the make.log.txt file, which I can email to you in a bit (got to resolve some browser issues first). what is your email id, please?

Thanks,
Neera

Attach this file here.

Hi Wile,

Here you go - hope you are able to open the log and figure out the issue.

make.log.txt (14.4 KB)

Thanks,

Neera

What do you get from:
echo ROOTSYS=${ROOTSYS}
root-config --prefix
root-config --cflags

Hi Wile,

I am back home and will get back to you with those results on Thursday. I apologize for this stretched out plan, but this is the best I can do for now. What I am supposed to get?

Also, I would like to know if if can proceed step by step and tackle one error at a time:

/home/neera/root/include/Rtypes.h:281:67: error: expected primary-expression before ‘)’ token
::ROOT::Internal::HasConsistentHashMember(QUOTE(name)) ||
/home/neera/root/include/Rtypes.h:281:55: error: ‘QUOTE’ was not declared in this scope
::ROOT::Internal::HasConsistentHashMember(QUOTE(name)) ||
/home/neera/root/include/Rtypes.h:275:11: error: ‘R__likely’ was not declared in this scope
if (R__likely(recurseBlocker >= 2)) { \

It looks like your “west” (“xraywest”) application did not use your ROOT distribution at all.

I am not able to get to the creation of the executable at this point, due to syntax errors. I removed (or commented out) all the root headers that were not used, but the error messages did not diminish or change.

This is a Geant4 application, so try: Geant4 → User Forum

Also, try to contact the author of your “west” (“xraywest”) application.

The author of xraywest (which uses west.cc, as you correctly noticed) is my colleague. He worked on this project five years ago, when the root version was old and somehow it worked then. Now he doesn’t use cmake, so he tried everything possible on my account but the core dumped ; it did not proceed with creation of the object files either. My version of Geant4 uses cmake and the makefile can only be created via cmake.

I successfully executed cmake. I am having issues with make. I can share the CMakeFiles.text, which I had modified to include root headers. It basically includes globs all headers and sources (very similar to the attached file, except that the project name is changed, in and out files removed and root header path added, as exampleB1 does not use root at all
CMakelists.txt (2.5 KB)

This far I am able to provide the link to the root headers, alongwith Geant4 headers to my version of Geant4. Stuck with the errors, though