Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-7515

C++14 needs GCC 5.1

    XMLWordPrintable

Details

    Description

      From David A:

      I had a quick look into compiling ROOT 6.04.03 with C++14 enabled on GCC 4.9.1:

      AILED: /data/davidlt/update_root_6_04_03/a/slc6_amd64_gcc491/external/gcc/4.9.1-cms/bin/g++    -D__ROOFIT_NOBANNER  -pipe -m64 -Wall -W -Woverloaded-virtual -fsigned-char -fPIC -pthread -std=c++14 -Wno-deprecated-declarations -O2 -DNDEBUG -Iinclude -MMD -MT core/cont/CMa
      keFiles/Cont.dir/src/TOrdCollection.cxx.o -MF core/cont/CMakeFiles/Cont.dir/src/TOrdCollection.cxx.o.d -o core/cont/CMakeFiles/Cont.dir/src/TOrdCollection.cxx.o -c /data/davidlt/update_root_6_04_03/a/BUILD/slc6_amd64_gcc491/lcg/root/6.04.03/root-6.04.03/core/cont/src/TOrd
      Collection.cxx
      In file included from include/TCollection.h:34:0,
                       from include/TSeqCollection.h:26,
                       from include/TOrdCollection.h:25,
                       from /data/davidlt/update_root_6_04_03/a/BUILD/slc6_amd64_gcc491/lcg/root/6.04.03/root-6.04.03/core/cont/src/TOrdCollection.cxx:31:
      include/TString.h: In member function 'TSubString::operator std::string() const':
      include/TString.h:117:75: error: 'std::string_view' has no member named 'to_string'
          operator std::string() const { return std::string_view(Data(),fExtent).to_string(); }
                                                                                 ^
      FAILED: /data/davidlt/update_root_6_04_03/a/slc6_amd64_gcc491/external/gcc/4.9.1-cms/bin/g++    -D__ROOFIT_NOBANNER  -pipe -m64 -Wall -W -Woverloaded-virtual -fsigned-char -fPIC -pthread -std=c++14 -Wno-deprecated-declarations -O2 -DNDEBUG -Iinclude -MMD -MT core/cont/CMakeFiles/Cont.dir/src/TSortedList.cxx.o -MF core/cont/CMakeFiles/Cont.dir/src/TSortedList.cxx.o.d -o core/cont/CMakeFiles/Cont.dir/src/TSortedList.cxx.o -c /data/davidlt/update_root_6_04_03/a/BUILD/slc6_amd64_gcc491/lcg/root/6.04.03/root-6.04.03/core/cont/src/TSortedList.cxx
      In file included from include/TCollection.h:34:0,
                       from include/TSeqCollection.h:26,
                       from include/TList.h:26,
                       from include/TSortedList.h:26,
                       from /data/davidlt/update_root_6_04_03/a/BUILD/slc6_amd64_gcc491/lcg/root/6.04.03/root-6.04.03/core/cont/src/TSortedList.cxx:19:
      include/TString.h: In member function 'TSubString::operator std::string() const':
      include/TString.h:117:75: error: 'std::string_view' has no member named 'to_string'
          operator std::string() const { return std::string_view(Data(),fExtent).to_string(); }

      All the errors are the same in the build log:

      error: 'std::string_view' has no member named 'to_string'

      > <https://gcc.gnu.org/ml/libstdc++/2014-06/msg00001.html> Looks like
      > C++14 needs GCC 5.1 because of our use of string_view...

      Then this is wrong:

      ROOT_BUILD_OPTION(cxx14 OFF "Build using C++14 compatible mode, requires gcc > 4.9.x or clang")
      GCC > 5.1.0

      Also I would mention this in release notes.

      Attachments

        Activity

          People

            mato Pere Mato Vila
            davidlt David Abdurachmanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: