Compilation error in 6.22.06 using gcc 8.3.1


_ROOT Version: 6.22.06
_Platform: Linux x86_64
_Compiler: gcc 8.3.1


Hello all,
I get the following error when attempting to compile 6.22.06 using gcc 8.3.1 and the -std=c++17 flag. Does anyone have any insights?

Thanks

[ 84%] Generating G__Hist.cxx, ../../lib/Hist.pcm
In file included from input_line_16:3:
/usr/gapps/nds/production/gronberg/roottest/root-6.22.06/build/include/ROOT/RAxis.hxx:57:4: error: exception specification of explicitly defaulted default constructor does not match the calculated one
   RAxisBase() noexcept = default;
   ^
Error: /usr/gapps/nds/production/gronberg/roottest/root-6.22.06/build/bin/rootcling: compilation failure (/usr/gapps/nds/production/gronberg/roottest/root-6.22.06/build/lib/libROOTHist122589a7a4_dictUmbrella.h)
make[2]: *** [hist/histv7/G__ROOTHist.cxx] Error 1
make[1]: *** [hist/histv7/CMakeFiles/G__ROOTHist.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

So I found a thread from last year that suggested removing the noexcept from that line. So I tried that. It no longer throws that error but now I get different errors. The latest-stable of 6.24.06 also produces the same errors as shown below.

[ 92%] Building CXX object roofit/roofitcore/CMakeFiles/RooFitCore.dir/src/RooBi
nning.cxx.o
/usr/gapps/nds/production/gronberg/roottest/root-6.22.06/tree/dataframe/src/RDFI
nterfaceUtils.cxx: In lambda function:
/usr/gapps/nds/production/gronberg/roottest/root-6.22.06/tree/dataframe/src/RDFI
nterfaceUtils.cxx:156:39: error: call of overloaded 'basic_string(std::remove_re
ference<TString&>::type)' is ambiguous
       return std::string(std::move(ss));
                                       ^
In file included from /usr/tce/packages/gcc/gcc-8.3.1/rh/usr/include/c++/8/strin
g:52,
                 from /usr/gapps/nds/production/gronberg/roottest/root-6.22.06/t
ree/dataframe/inc/ROOT/RDF/GraphNode.hxx:14,
                 from /usr/gapps/nds/production/gronberg/roottest/root-6.22.06/t
ree/dataframe/inc/ROOT/RDF/RAction.hxx:14,
                 from /usr/gapps/nds/production/gronberg/roottest/root-6.22.06/t
ree/dataframe/inc/ROOT/RDF/InterfaceUtils.hxx:14,
                 from /usr/gapps/nds/production/gronberg/roottest/root-6.22.06/t
ree/dataframe/src/RDFInterfaceUtils.cxx:11:
/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/include/c++/8/bits/basic_string.h:3571:7:
 note: candidate: 'std::basic_string<_CharT, _Traits, _Alloc>::basic_string(std:
:basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::ch
ar_traits<char>; _Alloc = std::allocator<char>]'
       basic_string(basic_string&& __str)
       ^~~~~~~~~~~~
/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/include/c++/8/bits/basic_string.h:3554:7:
 note: candidate: 'std::basic_string<_CharT, _Traits, _Alloc>::basic_string(cons
t _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>;
 _Alloc = std::allocator<char>]'
       basic_string(const _CharT* __s, const _Alloc& __a = _Alloc());
       ^~~~~~~~~~~~
/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/include/c++/8/bits/basic_string.h:3507:7:
 note: candidate: 'std::basic_string<_CharT, _Traits, _Alloc>::basic_string(cons
t std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = st
d::char_traits<char>; _Alloc = std::allocator<char>]'
       basic_string(const basic_string& __str);
       ^~~~~~~~~~~~
/usr/gapps/nds/production/gronberg/roottest/root-6.22.06/tree/dataframe/src/RDFI
nterfaceUtils.cxx: In function '{anonymous}::ParsedExpression {anonymous}::Parse
RDFExpression(const string&, const ColumnNames_t&, const ColumnNames_t&, const C
olumnNames_t&, const std::map<std::basic_string<char>, std::basic_string<char> >
&)':
/usr/gapps/nds/production/gronberg/roottest/root-6.22.06/tree/dataframe/src/RDFI
nterfaceUtils.cxx:174:31: error: invalid operands of types 'const char [3]' and 
'void' to binary 'operator+'
       TPRegexp replacer("\\b" + escapeDots(colOrAlias) + "\\b"); // watch out: 
need to replace colOrAlias, not col
                         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/usr/gapps/nds/production/gronberg/roottest/root-6.22.06/tree/dataframe/src/RDFI
nterfaceUtils.cxx:178:63: error: call of overloaded 'basic_string(std::remove_re
ference<TString&>::type)' is ambiguous
    return ParsedExpression{std::string(std::move(exprWithVars)), std::move(used
Cols), std::move(varNames)};
                                                               ^
In file included from /usr/tce/packages/gcc/gcc-8.3.1/rh/usr/include/c++/8/strin
g:52,
                 from /usr/gapps/nds/production/gronberg/roottest/root-6.22.06/t
ree/dataframe/inc/ROOT/RDF/GraphNode.hxx:14,
                 from /usr/gapps/nds/production/gronberg/roottest/root-6.22.06/t
ree/dataframe/inc/ROOT/RDF/RAction.hxx:14,
                 from /usr/gapps/nds/production/gronberg/roottest/root-6.22.06/t
ree/dataframe/inc/ROOT/RDF/InterfaceUtils.hxx:14,
                 from /usr/gapps/nds/production/gronberg/roottest/root-6.22.06/t
ree/dataframe/src/RDFInterfaceUtils.cxx:11:
/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/include/c++/8/bits/basic_string.h:3571:7:
 note: candidate: 'std::basic_string<_CharT, _Traits, _Alloc>::basic_string(std:
:basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::ch
ar_traits<char>; _Alloc = std::allocator<char>]'
       basic_string(basic_string&& __str)
       ^~~~~~~~~~~~
/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/include/c++/8/bits/basic_string.h:3554:7:
 note: candidate: 'std::basic_string<_CharT, _Traits, _Alloc>::basic_string(cons
t _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>;
 _Alloc = std::allocator<char>]'
       basic_string(const _CharT* __s, const _Alloc& __a = _Alloc());
       ^~~~~~~~~~~~
/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/include/c++/8/bits/basic_string.h:3507:7:
 note: candidate: 'std::basic_string<_CharT, _Traits, _Alloc>::basic_string(cons
t std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = st
d::char_traits<char>; _Alloc = std::allocator<char>]'
       basic_string(const basic_string& __str);
       ^~~~~~~~~~~~
[ 92%] Building CXX object roofit/roofitcore/CMakeFiles/RooFitCore.dir/src/RooBr
entRootFinder.cxx.o

Hi @gronberg1 ,
about the first error, that’s a problem that has been fixed in more recent versions as you found out.

This last error is…suprising. Are you using devtoolset? ROOT cannot be built with that toolchain. If not, what is the exact cmake configuration command you are passing? Can you reproduce it on LXPLUS or in a Docker container with Debian, Ubuntu or Fedora?

Cheers,
Enrico

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.