Fork me on GitHub

Opened 4 years ago

Closed 3 years ago

#1472 closed Bug (fixed)

Can't compile Delphes in SL7 CMSSW

Reported by: rschoef Owned by:
Priority: minor Milestone:
Component: Delphes code Version: Delphes 3
Keywords: Cc:

Description

Dear Michele, all,

it seems I can't compile Delphes on an SL7 machine, no matter what CMSSW release.

I do for example:
cmsrel CMSSW_10_6_0
cd CMSSW_10_6_0
cmsenv

cd ../..
git clone git clone https://github.com/delphes/delphes.git
cd delphes
./configure
make

The error is below [1]. The machine has the cms framework installed, e.g. cvmfs.
I found various issues with compilation but none related to CMSSW.

Could you let me know if/how this is supposed to work?
Actually, I don't care much about the release but I need to stay on SL7.

In the past, the recipe above worked fine with an SLC6 release.

Any help would be appreciated. Thanks a lot in advance!

Best,
Robert

[1]

Generating tmp/classes/ClassesDict.cc
Compiling tmp/classes/ClassesDict.cc

In file included from /cvmfs/cms.cern.ch/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_6_0/external/slc7_amd64_gcc700/bin/../../../../../../../slc7_amd64_gcc700/lcg/root/6.14.09-pafccj/include/TString.h:28:0,

from /cvmfs/cms.cern.ch/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_6_0/external/slc7_amd64_gcc700/bin/../../../../../../../slc7_amd64_gcc700/lcg/root/6.14.09-pafccj/include/TNamed.h:26,
from /cvmfs/cms.cern.ch/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_6_0/external/slc7_amd64_gcc700/bin/../../../../../../../slc7_amd64_gcc700/lcg/root/6.14.09-pafccj/include/TTask.h:24,
from external/ExRootAnalysis/ExRootTask.h:12,
from ./classes/DelphesModule.h:30,
from tmp/classes/ClassesDict.cc:28:

/cvmfs/cms.cern.ch/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_6_0/external/slc7_amd64_gcc700/bin/../../../../../../../slc7_amd64_gcc700/lcg/root/6.14.09-pafccj/include/ROOT/RStringView.hxx:67:17: error: expected type-specifier

operator std::string_view() const { return std::string_view(fData,fLength); }


In file included from /cvmfs/cms.cern.ch/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_6_0/external/slc7_amd64_gcc700/bin/../../../../../../../slc7_amd64_gcc700/lcg/root/6.14.09-pafccj/include/TNamed.h:26:0,

from /cvmfs/cms.cern.ch/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_6_0/external/slc7_amd64_gcc700/bin/../../../../../../../slc7_amd64_gcc700/lcg/root/6.14.09-pafccj/include/TTask.h:24,
from external/ExRootAnalysis/ExRootTask.h:12,
from ./classes/DelphesModule.h:30,
from tmp/classes/ClassesDict.cc:28:

/cvmfs/cms.cern.ch/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_6_0/external/slc7_amd64_gcc700/bin/../../../../../../../slc7_amd64_gcc700/lcg/root/6.14.09-pafccj/include/TString.h:110:13: error: expected type-specifier

operator std::string_view() const { return std::string_view(Data(),fExtent); }


/cvmfs/cms.cern.ch/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_6_0/external/slc7_amd64_gcc700/bin/../../../../../../../slc7_amd64_gcc700/lcg/root/6.14.09-pafccj/include/TString.h:275:23: error: 'string_view' in namespace 'std' does not name a type

TString(const std::string_view &sub);


/cvmfs/cms.cern.ch/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_6_0/external/slc7_amd64_gcc700/bin/../../../../../../../slc7_amd64_gcc700/lcg/root/6.14.09-pafccj/include/TString.h:312:37: error: 'string_view' in namespace 'std' does not name a type

TString &operator=(const std::string_view &s);


/cvmfs/cms.cern.ch/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_6_0/external/slc7_amd64_gcc700/bin/../../../../../../../slc7_amd64_gcc700/lcg/root/6.14.09-pafccj/include/TString.h:439:9: error: 'string_view' in namespace 'std' does not name a type

std::string_view View() const { return std::string_view(GetPointer(),Length()); }


In file included from /cvmfs/cms.cern.ch/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_6_0/external/slc7_amd64_gcc700/bin/../../../../../../../slc7_amd64_gcc700/lcg/root/6.14.09-pafccj/include/TNamed.h:26:0,

from /cvmfs/cms.cern.ch/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_6_0/external/slc7_amd64_gcc700/bin/../../../../../../../slc7_amd64_gcc700/lcg/root/6.14.09-pafccj/include/TTask.h:24,
from external/ExRootAnalysis/ExRootTask.h:12,
from ./classes/DelphesModule.h:30,
from tmp/classes/ClassesDict.cc:28:

/cvmfs/cms.cern.ch/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_6_0/external/slc7_amd64_gcc700/bin/../../../../../../../slc7_amd64_gcc700/lcg/root/6.14.09-pafccj/include/TString.h:834:53: error: 'string_view' in namespace 'std' does not name a type

inline Bool_t operator==(const char *s1, const std::string_view &s2)


/cvmfs/cms.cern.ch/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_6_0/external/slc7_amd64_gcc700/bin/../../../../../../../slc7_amd64_gcc700/lcg/root/6.14.09-pafccj/include/TString.h:834:68: error: 'Bool_t operator==(const char*, const int&)' must have an argument of class or enumerated type

inline Bool_t operator==(const char *s1, const std::string_view &s2)


/cvmfs/cms.cern.ch/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_6_0/external/slc7_amd64_gcc700/bin/../../../../../../../slc7_amd64_gcc700/lcg/root/6.14.09-pafccj/include/TString.h:839:37: error: 'string_view' in namespace 'std' does not name a type

inline Bool_t operator==(const std::string_view &s1, const char *s2)


/cvmfs/cms.cern.ch/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_6_0/external/slc7_amd64_gcc700/bin/../../../../../../../slc7_amd64_gcc700/lcg/root/6.14.09-pafccj/include/TString.h:839:68: error: 'Bool_t operator==(const int&, const char*)' must have an argument of class or enumerated type

inline Bool_t operator==(const std::string_view &s1, const char *s2)


/cvmfs/cms.cern.ch/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_6_0/external/slc7_amd64_gcc700/bin/../../../../../../../slc7_amd64_gcc700/lcg/root/6.14.09-pafccj/include/TString.h:852:37: error: 'string_view' in namespace 'std' does not name a type

std::string printValue(const std::string_view* val);


make: * [Makefile:2473: tmp/classes/ClassesDict.o] Error 1

Change History (2)

comment:1 by rschoef, 4 years ago

Nevermind, I found it.
In the Makefile, change the std version in CXXFLAGS to -std=c++17

string_view is available with C++17:
https://en.cppreference.com/w/cpp/header/string_view

Ticket can be closed.

comment:2 by Pavel Demin, 3 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.