Cannot compile

Hello,

I have a problem compiling root 5.25, svn revision 31409.
I use gcc 4.4.2 20091027 on Fedora 12 32bits. The configuration I use is
–enable-soversion --enable-rpath --prefix=/usr/local/ --enable-opengl --enable-minuit2 --enable-roofit

All goes fine till the file hist/hist/src/HFitImpl.cxx is processed. Here I get lots of errors.
Can anyone help me? Thanks in advance.

johan

Here is the log:
hist/hist/src/HFitImpl.cxx: In function ‘TFitResultPtr HFit::Fit(FitObject*, TF1*, Foption_t&, const ROOT::Math::MinimizerOptions&, const char*, ROOT::Fit::DataRange&)’:
hist/hist/src/HFitImpl.cxx:150: error: ‘struct Foption_t’ has no member named ‘NoErrX’
hist/hist/src/HFitImpl.cxx:194: error: ‘Init2DGaus’ is not a member of ‘ROOT::Fit’
hist/hist/src/HFitImpl.cxx:196: error: ‘Init2DGaus’ is not a member of ‘ROOT::Fit’
hist/hist/src/HFitImpl.cxx:198: error: ‘InitExpo’ is not a member of ‘ROOT::Fit’
hist/hist/src/HFitImpl.cxx:368: error: ‘struct Foption_t’ has no member named ‘StoreResult’
hist/hist/src/HFitImpl.cxx: At global scope:
hist/hist/src/HFitImpl.cxx:537: error: ‘void ROOT::Fit::FitOptionsMake(const char*, Foption_t&)’ should have been declared inside ‘ROOT::Fit’
hist/hist/src/HFitImpl.cxx: In function ‘void ROOT::Fit::FitOptionsMake(const char*, Foption_t&)’:
hist/hist/src/HFitImpl.cxx:563: error: ‘struct Foption_t’ has no member named ‘Chi2’
hist/hist/src/HFitImpl.cxx:577: error: ‘struct Foption_t’ has no member named ‘NoErrX’
hist/hist/src/HFitImpl.cxx:578: error: ‘struct Foption_t’ has no member named ‘StoreResult’
hist/hist/src/HFitImpl.cxx: At global scope:
hist/hist/src/HFitImpl.cxx:719: error: ‘TFitResultPtr ROOT::Fit::FitObject(TH1*, TF1*, Foption_t&, const ROOT::Math::MinimizerOptions&, const char*, ROOT::Fit::DataRange&)’ should have been declared inside ‘ROOT::Fit’
hist/hist/src/HFitImpl.cxx: In function ‘TFitResultPtr ROOT::Fit::FitObject(TH1*, TF1*, Foption_t&, const ROOT::Math::MinimizerOptions&, const char*, ROOT::Fit::DataRange&)’:
hist/hist/src/HFitImpl.cxx:719: error: new declaration ‘TFitResultPtr ROOT::Fit::FitObject(TH1*, TF1*, Foption_t&, const ROOT::Math::MinimizerOptions&, const char*, ROOT::Fit::DataRange&)’
include/HFitInterface.h:50: error: ambiguates old declaration ‘int ROOT::Fit::FitObject(TH1*, TF1*, Foption_t&, const ROOT::Math::MinimizerOptions&, const char*, ROOT::Fit::DataRange&)’
hist/hist/src/HFitImpl.cxx: At global scope:
hist/hist/src/HFitImpl.cxx:724: error: ‘TFitResultPtr ROOT::Fit::FitObject(TGraph*, TF1*, Foption_t&, const ROOT::Math::MinimizerOptions&, const char*, ROOT::Fit::DataRange&)’ should have been declared inside ‘ROOT::Fit’
hist/hist/src/HFitImpl.cxx: In function ‘TFitResultPtr ROOT::Fit::FitObject(TGraph*, TF1*, Foption_t&, const ROOT::Math::MinimizerOptions&, const char*, ROOT::Fit::DataRange&)’:
hist/hist/src/HFitImpl.cxx:724: error: new declaration ‘TFitResultPtr ROOT::Fit::FitObject(TGraph*, TF1*, Foption_t&, const ROOT::Math::MinimizerOptions&, const char*, ROOT::Fit::DataRange&)’
include/HFitInterface.h:55: error: ambiguates old declaration ‘int ROOT::Fit::FitObject(TGraph*, TF1*, Foption_t&, const ROOT::Math::MinimizerOptions&, const char*, ROOT::Fit::DataRange&)’
hist/hist/src/HFitImpl.cxx: At global scope:
hist/hist/src/HFitImpl.cxx:731: error: ‘TFitResultPtr ROOT::Fit::FitObject(TMultiGraph*, TF1*, Foption_t&, const ROOT::Math::MinimizerOptions&, const char*, ROOT::Fit::DataRange&)’ should have been declared inside ‘ROOT::Fit’
hist/hist/src/HFitImpl.cxx: In function ‘TFitResultPtr ROOT::Fit::FitObject(TMultiGraph*, TF1*, Foption_t&, const ROOT::Math::MinimizerOptions&, const char*, ROOT::Fit::DataRange&)’:
hist/hist/src/HFitImpl.cxx:731: error: new declaration ‘TFitResultPtr ROOT::Fit::FitObject(TMultiGraph*, TF1*, Foption_t&, const ROOT::Math::MinimizerOptions&, const char*, ROOT::Fit::DataRange&)’
include/HFitInterface.h:60: error: ambiguates old declaration ‘int ROOT::Fit::FitObject(TMultiGraph*, TF1*, Foption_t&, const ROOT::Math::MinimizerOptions&, const char*, ROOT::Fit::DataRange&)’
hist/hist/src/HFitImpl.cxx: At global scope:
hist/hist/src/HFitImpl.cxx:738: error: ‘TFitResultPtr ROOT::Fit::FitObject(TGraph2D*, TF1*, Foption_t&, const ROOT::Math::MinimizerOptions&, const char*, ROOT::Fit::DataRange&)’ should have been declared inside ‘ROOT::Fit’
hist/hist/src/HFitImpl.cxx: In function ‘TFitResultPtr ROOT::Fit::FitObject(TGraph2D*, TF1*, Foption_t&, const ROOT::Math::MinimizerOptions&, const char*, ROOT::Fit::DataRange&)’:
hist/hist/src/HFitImpl.cxx:738: error: new declaration ‘TFitResultPtr ROOT::Fit::FitObject(TGraph2D*, TF1*, Foption_t&, const ROOT::Math::MinimizerOptions&, const char*, ROOT::Fit::DataRange&)’
include/HFitInterface.h:65: error: ambiguates old declaration ‘int ROOT::Fit::FitObject(TGraph2D*, TF1*, Foption_t&, const ROOT::Math::MinimizerOptions&, const char*, ROOT::Fit::DataRange&)’
hist/hist/src/HFitImpl.cxx: At global scope:
hist/hist/src/HFitImpl.cxx:745: error: ‘TFitResultPtr ROOT::Fit::FitObject(THnSparse*, TF1*, Foption_t&, const ROOT::Math::MinimizerOptions&, const char*, ROOT::Fit::DataRange&)’ should have been declared inside ‘ROOT::Fit’
hist/hist/src/HFitImpl.cxx: In function ‘TFitResultPtr HFit::Fit(FitObject*, TF1*, Foption_t&, const ROOT::Math::MinimizerOptions&, const char*, ROOT::Fit::DataRange&) [with FitObject = THnSparse]’:
hist/hist/src/HFitImpl.cxx:747: instantiated from here
hist/hist/src/HFitImpl.cxx:178: error: no matching function for call to ‘FillData(ROOT::Fit::BinData&, THnSparse*&, TF1*&)’
include/HFitInterface.h:81: note: candidates are: void ROOT::Fit::FillData(ROOT::Fit::BinData&, const TH1*, TF1*)
include/HFitInterface.h:87: note: void ROOT::Fit::FillData(ROOT::Fit::BinData&, const TGraph2D*, TF1*)
include/HFitInterface.h:94: note: void ROOT::Fit::FillData(ROOT::Fit::BinData&, const TGraph*, TF1*)
include/HFitInterface.h:99: note: void ROOT::Fit::FillData(ROOT::Fit::BinData&, const TMultiGraph*, TF1*)
hist/hist/src/HFitImpl.cxx: In function ‘void HFit::StoreAndDrawFitFunction(FitObject*, const TF1*, const ROOT::Fit::DataRange&, bool, bool, const char*) [with FitObject = THnSparse]’:
hist/hist/src/HFitImpl.cxx:339: instantiated from ‘TFitResultPtr HFit::Fit(FitObject*, TF1*, Foption_t&, const ROOT::Math::MinimizerOptions&, const char*, ROOT::Fit::DataRange&) [with FitObject = THnSparse]’
hist/hist/src/HFitImpl.cxx:747: instantiated from here
hist/hist/src/HFitImpl.cxx:481: error: ‘class THnSparse’ has no member named ‘GetListOfFunctions’
make: *** [hist/hist/src/HFitImpl.o] Error 1

Hi,
it looks to me you have an obsolete versions of the header of hist/hist/inc
I will try again building, but after doing first:

make distclean-hist

Lorenzo

Hi,

thanks! This allowed me to do some progress, but now I’m stuck here:

g++ -O2 -pipe -m32 -Wall -W -Woverloaded-virtual -fPIC -Iinclude -DR__HAVE_CONFIG -pthread -o roofit/roostats/src/BayesianCalculator.o -c roofit/roostats/src/BayesianCalculator.cxx
gcc -m32 -O3 -DNO_DEBUG_OUTPUT -fPIC -Wall -mmmx --param inline-unit-growth=10000 --param large-function-growth=10000 -I…/…/…/…/graf2d/freetype/src/freetype-2.3.5/include -c asvisual.c -o asvisual.o
roofit/roostats/src/BayesianCalculator.cxx: In member function ‘virtual RooStats::SimpleInterval* RooStats::BayesianCalculator::GetInterval() const’:
roofit/roostats/src/BayesianCalculator.cxx:212: error: no matching function for call to ‘RooStats::SimpleInterval::SimpleInterval(TString&, RooRealVar&, double&, double&, Double_t)’
include/RooStats/SimpleInterval.h:36: note: candidates are: RooStats::SimpleInterval::SimpleInterval(const char*, const char*, RooAbsArg*, Double_t, Double_t)
include/RooStats/SimpleInterval.h:35: note: RooStats::SimpleInterval::SimpleInterval(const char*, RooAbsArg*, Double_t, Double_t)
include/RooStats/SimpleInterval.h:34: note: RooStats::SimpleInterval::SimpleInterval(const char*, const char*)
include/RooStats/SimpleInterval.h:33: note: RooStats::SimpleInterval::SimpleInterval(const char*)
include/RooStats/SimpleInterval.h:32: note: RooStats::SimpleInterval::SimpleInterval()
include/RooStats/SimpleInterval.h:23: note: RooStats::SimpleInterval::SimpleInterval(const RooStats::SimpleInterval&)
make: *** [roofit/roostats/src/BayesianCalculator.o] Error 1

You have again the same problem, you have to remove the old headers.
Do make distclean, that will clean all ROOT, or do make distclean-roostats and you will clean only roostats

Lorenzo[/code]

I tried both make distclean and make diestclean-roostats but it still fails… I tried to do make clean and restart from scratch and I got the same again :
g++ -O2 -pipe -m32 -Wall -W -Woverloaded-virtual -fPIC -Iinclude -DR__HAVE_CONFIG -pthread -o roofit/roostats/src/BernsteinCorrection.o -c roofit/roostats/src/BernsteinCorrection.cxx
roofit/roostats/src/BayesianCalculator.cxx: In member function ‘virtual RooStats::SimpleInterval* RooStats::BayesianCalculator::GetInterval() const’:
roofit/roostats/src/BayesianCalculator.cxx:212: error: no matching function for call to ‘RooStats::SimpleInterval::SimpleInterval(TString&, RooRealVar&, double&, double&, Double_t)’
[…]

This is strange, because we have just built a release (5.25.04) with the revision 31399. I think you have still an old header in your source code.
I would recommend to take 5.25.04 either the binaries or the source tar ball from root.cern.ch/drupal/content/deve … sion-52504

Regards

Lorenzo