cms-analysis / CombineHarvester

CMSSW package for the creation, editing and analysis of combine datacards and workspaces
cms-analysis.github.io/CombineHarvester/
15 stars 182 forks source link

el8/el9 Compatibility #322

Open rkansal47 opened 7 months ago

rkansal47 commented 7 months ago

Hi, is CombineHarvester compatible with any CMSSW release for el8/el9 machines? I received these errors when compiling it with CMSSW_14_0_5:

src/CombineHarvester/CombineTools/src/Systematic.cc: In member function 'void ch::Systematic::set_name(const std::string&)':
src/CombineHarvester/CombineTools/src/Systematic.cc:58:23: error: invalid use of incomplete type 'class RooAbsReal'
   58 |     if (pdf_u_) pdf_u_->SetName(std::regex_replace(pdf_u_->GetName(),std::regex(name_),name).c_str());
      |                       ^~
In file included from /cvmfs/cms.cern.ch/el9_amd64_gcc12/lcg/root/6.30.03-ca7ca986842b225f6fc22ae84d705ed8/include/RooAbsCategory.h:19,
                 from /cvmfs/cms.cern.ch/el9_amd64_gcc12/lcg/root/6.30.03-ca7ca986842b225f6fc22ae84d705ed8/include/RooAbsData.h:20,
                 from /cvmfs/cms.cern.ch/el9_amd64_gcc12/lcg/root/6.30.03-ca7ca986842b225f6fc22ae84d705ed8/include/RooDataHist.h:19,
                 from /uscms_data/d3/rkansal/combine/CMSSW_14_0_5/src/CombineHarvester/CombineTools/interface/Systematic.h:6,
                 from src/CombineHarvester/CombineTools/src/Systematic.cc:1:
/cvmfs/cms.cern.ch/el9_amd64_gcc12/lcg/root/6.30.03-ca7ca986842b225f6fc22ae84d705ed8/include/RooAbsArg.h:628:16: note: forward declaration of 'class RooAbsReal'
  628 |   friend class RooAbsReal;
      |                ^~~~~~~~~~
src/CombineHarvester/CombineTools/src/Systematic.cc:58:58: error: invalid use of incomplete type 'class RooAbsReal'
   58 |     if (pdf_u_) pdf_u_->SetName(std::regex_replace(pdf_u_->GetName(),std::regex(name_),name).c_str());
      |                                                          ^~
/cvmfs/cms.cern.ch/el9_amd64_gcc12/lcg/root/6.30.03-ca7ca986842b225f6fc22ae84d705ed8/include/RooAbsArg.h:628:16: note: forward declaration of 'class RooAbsReal'
  628 |   friend class RooAbsReal;
      |                ^~~~~~~~~~
src/CombineHarvester/CombineTools/src/Systematic.cc:59:23: error: invalid use of incomplete type 'class RooAbsReal'
   59 |     if (pdf_d_) pdf_d_->SetName(std::regex_replace(pdf_d_->GetName(),std::regex(name_),name).c_str());
      |                       ^~
/cvmfs/cms.cern.ch/el9_amd64_gcc12/lcg/root/6.30.03-ca7ca986842b225f6fc22ae84d705ed8/include/RooAbsArg.h:628:16: note: forward declaration of 'class RooAbsReal'
  628 |   friend class RooAbsReal;
      |                ^~~~~~~~~~
src/CombineHarvester/CombineTools/src/Systematic.cc:59:58: error: invalid use of incomplete type 'class RooAbsReal'
   59 |     if (pdf_d_) pdf_d_->SetName(std::regex_replace(pdf_d_->GetName(),std::regex(name_),name).c_str());
      |                                                          ^~
/cvmfs/cms.cern.ch/el9_amd64_gcc12/lcg/root/6.30.03-ca7ca986842b225f6fc22ae84d705ed8/include/RooAbsArg.h:628:16: note: forward declaration of 'class RooAbsReal'
  628 |   friend class RooAbsReal;
      |                ^~~~~~~~~~
gmake: *** [config/SCRAM/GMake/Makefile.rules:1838: tmp/el9_amd64_gcc12/src/CombineHarvester/CombineTools/src/CombineHarvesterCombineTools/Systematic.cc.o] Error 1
adewit commented 7 months ago

Hi Raghav, the latest recommended Combine version, with which CombineHarvester is compatible, runs in CMSSW 11, (set up using apptainer to get the cc7 environment), see here: https://cms-analysis.github.io/HiggsAnalysis-CombinedLimit/latest/#combine-v9-recommended-version

When we make a recommended version available in a newer CMSSW release, we'll of course also make sure that CombineHarvester is compatible, but there's nothing "officially" supported yet in CMSSW_14 (I don't know if someone has a private branch compatible with CMSSW_14)