I just updated ROOT from 6.04 to 6.14 and ubuntu from 15 (LTS) to 18.04.
TGraphErrors were fitted with a function from an other code and then saved in a file. The fitting function is saved together with the graph (by default if I well understand).
I try to read these graphs from the file and plot them. The code worked on the previous ROOT (and gcc) version. Now I can compile and run the code, but I get this error:
Input_line_71:2:10: error: redefinition of 'TFormula____id1627201304017190959'
Double_t TFormula____id1627201304017190959(Double_t *x,Double_t *p){ return (p[0]*1.+p[1]*x[0]+p[2]*0.5*(3.*TMath::Power(x[0],2)-1.)) ; }
^
input_line_69:2:10: note: previous definition is here
Double_t TFormula____id1627201304017190959(Double_t *x,Double_t *p){ return (p[0]*1.+p[1]*x[0]+p[2]*0.5*(3.*TMath::Power(x[0],2)-1.)) ; }
That TFormula is indeed the TF1 function that I used for the fit. Still the code gets to the end and plots correctly. But if I compile again I get Segmentation Fault. That was not the case with the previous ROOT version.
Iām attaching an example of the code.
What am I doing wrong?
I got the ROOT source from here: https://root.cern.ch/content/release-61404
last monday. Should I download and install ROOT again? Is there a difference with the latest version available in GitHub (which, I admit it, I have no clue on what it is )
Thank you very much for your help
Cheers, Paola
I think the build version of 6.14 that you can download has still this problem. You should build from source as explained here https://root.cern.ch/building-root or, if you can, use the version built every night at CERN cvmfs
Hi,
yes, I got the .tar root_v6.14.04.source.tar.gz
Ok, Iāll try from the git repository and let you know.
Thank you very much for your help
Cheers
Paola
but when I try to compile the second time I still get a segmentation fault.
I attach the stack trace in the uploaded file.
Do you have an idea of the problem?
Good that with the master (6.15) it works now.
For your second problem, I cannot reproduce it. But, first of all in ROOT 6 you really donāt need to compile the macros. Using AClic it is not in general either faster or better, since Cling is a real compiler.
Second we donāt have full support for reloading macros a second time, after being executed. This because the unloading of the symbols does not work 100%. It is better exiting ROOT and re-execute the macro
Second we donāt have full support for reloading macros a second time, after being executed. This because the unloading of the symbols does not work 100%. It is better exiting ROOT and re-execute the macro
Hello,
thank you to everybody!
Sure I can run twice without recompiling. The reason for recompiling is that I change the code meanwhile And I do need to compile because the macro that I sent you is just a small part of a much bigger code.
Lorenzo, which version of gcc do you use? Because you say you cannot reproduce the seg fault, so as we use the same version, a difference could be the compiler.
Thank you very much