Compilation Error: template argument 1 is invalid


ROOT Version (e.g. 6.08/06):
Platform, compiler (Ubuntu 16.04, gcc5.4):


I am receiving a compilation error when compiling with the following cmake flag changes

cxx11 OFF
cxx14 ON
gsl_shared ON
gdml ON
minuit2 ON
unuran ON

This problem seems to have been encountered previously, but without a resolution: https://sft.its.cern.ch/jira/browse/ROOT-7925

Here is the error (truncated in order to remain within the character limit):

[ 78%] Building CXX object graf2d/gpad/CMakeFiles/Gpad.dir/v7/src/TCanvas.cxx.o
In file included from /home/patrick/root-6.08.06/build/include/RWrap_libcpp_string_view.h:520:0,
from /home/patrick/root-6.08.06/build/include/RStringView.h:26,
from /home/patrick/root-6.08.06/build/include/TString.h:41,
from /home/patrick/root-6.08.06/build/include/TNamed.h:29,
from /home/patrick/root-6.08.06/build/include/TVirtualX.h:31,
from /home/patrick/root-6.08.06/build/include/TVirtualPad.h:30,
from /home/patrick/root-6.08.06/build/include/TPad.h:17,
from /home/patrick/root-6.08.06/build/include/TCanvas.h:18,
from /home/patrick/root-6.08.06/graf2d/gpad/v7/src/TCanvas.cxx:19:
/home/patrick/root-6.08.06/build/include/libcpp_string_view.h:786:89: error: template argument 1 is invalid
BCPP_TYPE_VIS_ONLY hash<std::experimental::basic_string_view<_CharT, _Traits> >
^
/home/patrick/root-6.08.06/build/include/libcpp_string_view.h:787:90: error: wrong number of template arguments (1, should be 2)
c unary_function<std::experimental::basic_string_view<_CharT, _Traits>, size_t>
^
In file included from /usr/include/c++/5/string:48:0,
from /usr/include/c++/5/experimental/string_view:42,
from /home/patrick/root-6.08.06/build/include/ROOT/TCanvas.hxx:18,
from /home/patrick/root-6.08.06/graf2d/gpad/v7/src/TCanvas.cxx:16:
/usr/include/c++/5/bits/stl_function.h:105:12: note: provided for ‘template<class _Arg, class _Result> struct std::unary_function’
struct unary_function
^
In file included from /home/patrick/root-6.08.06/build/include/RWrap_libcpp_string_view.h:520:0,
from /home/patrick/root-6.08.06/build/include/RStringView.h:26,
from /home/patrick/root-6.08.06/build/include/TString.h:41,
from /home/patrick/root-6.08.06/build/include/TNamed.h:29,
from /home/patrick/root-6.08.06/build/include/TVirtualX.h:31,
from /home/patrick/root-6.08.06/build/include/TVirtualPad.h:30,
from /home/patrick/root-6.08.06/build/include/TPad.h:17,
from /home/patrick/root-6.08.06/build/include/TCanvas.h:18,
from /home/patrick/root-6.08.06/graf2d/gpad/v7/src/TCanvas.cxx:19:
/home/patrick/root-6.08.06/build/include/libcpp_string_view.h:794:60: error: template argument 1 is invalid
hash<std::experimental::basic_string_view<_CharT, _Traits> >::operator()(
^
/home/patrick/root-6.08.06/build/include/libcpp_string_view.h:795:15: error: reference to ‘basic_string_view’ is ambiguous
const std::experimental::basic_string_view<_CharT, _Traits>& __val) con
^
In file included from /home/patrick/root-6.08.06/build/include/ROOT/TCanvas.hxx:18:0,
from /home/patrick/root-6.08.06/graf2d/gpad/v7/src/TCanvas.cxx:16:
/usr/include/c++/5/experimental/string_view:75:11: note: candidates are: template<class _CharT, class _Traits> class std::experimental::fundamentals_v1::basic_string_view
class basic_string_view
^
In file included from /home/patrick/root-6.08.06/build/include/RWrap_libcpp_string_view.h:520:0,
from /home/patrick/root-6.08.06/build/include/RStringView.h:26,
from /home/patrick/root-6.08.06/build/include/TString.h:41,
from /home/patrick/root-6.08.06/build/include/TNamed.h:29,
from /home/patrick/root-6.08.06/build/include/TVirtualX.h:31,
from /home/patrick/root-6.08.06/build/include/TVirtualPad.h:30,
from /home/patrick/root-6.08.06/build/include/TPad.h:17,
from /home/patrick/root-6.08.06/build/include/TCanvas.h:18,
from /home/patrick/root-6.08.06/graf2d/gpad/v7/src/TCanvas.cxx:19:
/home/patrick/root-6.08.06/build/include/libcpp_string_view.h:195:33: note: template<class _CharT, class _Traits> class std::experimental::__ROOT::basic_string_view
class _LIBCPP_TYPE_VIS_ONLY basic_string_view {
^
/home/patrick/root-6.08.06/build/include/libcpp_string_view.h:795:51: error: expected ‘,’ or ‘…’ before ‘<’ token
const std::experimental::basic_string_view<_CharT, _Traits>& __val) con
^
/home/patrick/root-6.08.06/build/include/libcpp_string_view.h:795:77: error: non-member function ‘std::size_t std::operator()(int)’ cannot have cv-qualifier
const std::experimental::basic_string_view<_CharT, _Traits>& __val) const _NOEX
^
/home/patrick/root-6.08.06/build/include/libcpp_string_view.h:795:77: error: ‘std::size_t std::operator()(int)’ must be a nonstatic member function
In file included from /home/patrick/root-6.08.06/build/include/TString.h:41:0,
from /home/patrick/root-6.08.06/build/include/TNamed.h:29,
from /home/patrick/root-6.08.06/build/include/TVirtualX.h:31,
from /home/patrick/root-6.08.06/build/include/TVirtualPad.h:30,
from /home/patrick/root-6.08.06/build/include/TPad.h:17,
from /home/patrick/root-6.08.06/build/include/TCanvas.h:18,
from /home/patrick/root-6.08.06/graf2d/gpad/v7/src/TCanvas.cxx:19:
/home/patrick/root-6.08.06/build/include/RStringView.h:32:30: error: reference to ‘basic_string_view’ is ambiguous
using basic_string_view = ::std::experimental::basic_string_view<_CharT,_Tra
^
In file included from /home/patrick/root-6.08.06/build/include/ROOT/TCanvas.hxx:18:0,
from /home/patrick/root-6.08.06/graf2d/gpad/v7/src/TCanvas.cxx:16:
/usr/include/c++/5/experimental/string_view:75:11: note: candidates are: template<class _CharT, class _Traits> class std::experimental::fundamentals_v1::basic_string_view
class basic_string_view
^
In file included from /home/patrick/root-6.08.06/build/include/RWrap_libcpp_string_view.h:520:0,
from /home/patrick/root-6.08.06/build/include/RStringView.h:26,
from /home/patrick/root-6.08.06/build/include/TString.h:41,
from /home/patrick/root-6.08.06/build/include/TNamed.h:29,
from /home/patrick/root-6.08.06/build/include/TVirtualX.h:31,
from /home/patrick/root-6.08.06/build/include/TVirtualPad.h:30,
from /home/patrick/root-6.08.06/build/include/TPad.h:17,
from /home/patrick/root-6.08.06/build/include/TCanvas.h:18,
from /home/patrick/root-6.08.06/graf2d/gpad/v7/src/TCanvas.cxx:19:
/home/patrick/root-6.08.06/build/include/libcpp_string_view.h:195:33: note: template<class _CharT, class _Traits> class std::experimental::__ROOT::basic_string_view
class _LIBCPP_TYPE_VIS_ONLY basic_string_view {
^

Did you start the build in a fresh directory?

Can you upgrade to a newer compiler and/or a newer version of ROOT?

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