Dear all,
I am trying to compile some code using ROOT 6.22.00 on LXPLUS. I have sourced the following:
source /cvmfs/sft.cern.ch/lcg/views/LCG_98python3/x86_64-centos7-gcc10-opt/setup.sh
I get the following error with TString.h:
In file included from /cvmfs/sft.cern.ch/lcg/releases/ROOT/v6.22.00-be0a0/x86_64-centos7-gcc10-opt/include/TMatrixTBase.h:73,
from /cvmfs/sft.cern.ch/lcg/releases/ROOT/v6.22.00-be0a0/x86_64-centos7-gcc10-opt/include/TMatrixT.h:23,
from /cvmfs/sft.cern.ch/lcg/releases/ROOT/v6.22.00-be0a0/x86_64-centos7-gcc10-opt/include/TMatrixD.h:20,
from /cvmfs/sft.cern.ch/lcg/releases/ROOT/v6.22.00-be0a0/x86_64-centos7-gcc10-opt/include/TDecompBase.h:26,
from /cvmfs/sft.cern.ch/lcg/releases/ROOT/v6.22.00-be0a0/x86_64-centos7-gcc10-opt/include/TDecompLU.h:21,
from /afs/cern.ch/work/c/cschloes/T2K/new_test_intallation/xsLLhFitter/src/utils/src/../include/CalcChisq.hh:7,
from /afs/cern.ch/work/c/cschloes/T2K/new_test_intallation/xsLLhFitter/src/utils/src/CalcChisq.cc:1:
/cvmfs/sft.cern.ch/lcg/releases/ROOT/v6.22.00-be0a0/x86_64-centos7-gcc10-opt/include/TString.h:834:53: error: ‘string_view’ in namespace ‘std’ does not name a type
834 | inline Bool_t operator==(const char *s1, const std::string_view &s2)
| ^~~~~~~~~~~
/cvmfs/sft.cern.ch/lcg/releases/ROOT/v6.22.00-be0a0/x86_64-centos7-gcc10-opt/include/TString.h:834:48: note: ‘std::string_view’ is only available from C++17 onwards
834 | inline Bool_t operator==(const char *s1, const std::string_view &s2)
| ^~~
/cvmfs/sft.cern.ch/lcg/releases/ROOT/v6.22.00-be0a0/x86_64-centos7-gcc10-opt/include/TString.h:834:15: error: ‘Bool_t operator==(const char*, const int&)’ must have an argument of class or enumerated type
834 | inline Bool_t operator==(const char *s1, const std::string_view &s2)
| ^~~~~~~~
/cvmfs/sft.cern.ch/lcg/releases/ROOT/v6.22.00-be0a0/x86_64-centos7-gcc10-opt/include/TString.h:839:37: error: ‘string_view’ in namespace ‘std’ does not name a type
839 | inline Bool_t operator==(const std::string_view &s1, const char *s2)
| ^~~~~~~~~~~
/cvmfs/sft.cern.ch/lcg/releases/ROOT/v6.22.00-be0a0/x86_64-centos7-gcc10-opt/include/TString.h:839:32: note: ‘std::string_view’ is only available from C++17 onwards
839 | inline Bool_t operator==(const std::string_view &s1, const char *s2)
| ^~~
/cvmfs/sft.cern.ch/lcg/releases/ROOT/v6.22.00-be0a0/x86_64-centos7-gcc10-opt/include/TString.h:839:15: error: ‘Bool_t operator==(const int&, const char*)’ must have an argument of class or enumerated type
839 | inline Bool_t operator==(const std::string_view &s1, const char *s2)
| ^~~~~~~~
/cvmfs/sft.cern.ch/lcg/releases/ROOT/v6.22.00-be0a0/x86_64-centos7-gcc10-opt/include/TString.h:852:37: error: ‘string_view’ in namespace ‘std’ does not name a type
852 | std::string printValue(const std::string_view* val);
| ^~~~~~~~~~~
/cvmfs/sft.cern.ch/lcg/releases/ROOT/v6.22.00-be0a0/x86_64-centos7-gcc10-opt/include/TString.h:852:32: note: ‘std::string_view’ is only available from C++17 onwards
852 | std::string printValue(const std::string_view* val);
| ^~~
make[2]: *** [src/utils/CMakeFiles/xslfutils.dir/src/CalcChisq.cc.o] Error 1
make[1]: *** [src/utils/CMakeFiles/xslfutils.dir/all] Error 2
make: *** [all] Error 2
I thought it was because ROOT had not been compiled with the same C++ version but when I use root-config --cflags
, I get the following:
-pthread -std=c++17 -m64 -I/cvmfs/sft.cern.ch/lcg/releases/ROOT/v6.22.00-be0a0/x86_64-centos7-gcc10-opt/include
I am also compiling using cmake -DCMAKE_CXX_VERSION=c++17
.
Do you know what I might be doing wrong?
Many thanks in advance!!
ROOT Version: 6.22.00
Platform: LCG_98python3/x86_64-centos7-gcc10-opt
Compiler: cmake version 3.17.3