Compiling root with c++20

Hi,

I have encountered some problems when trying to compile lastest version of ROOT (v6.28/04) with c++20.

My options are the following:

cmake -DCMAKE_INSTALL_PREFIX=/Users/[...]/Library/PhyTools/RootCern/v6_28_04/root_install/ -DPython3_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.11/bin/python3 -DPython2_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/2.7/bin/python2 -DCMAKE_CXX_STANDARD=20 -D qt5web=ON ../root_src

Here is the output of cmake (in root_build)

System          Darwin-22.4.0
Processor       10 core Apple M1 Max (arm64)
Build type      Release
Install path    /Users/[...]/Library/PhyTools/RootCern/v6_28_04/root_install
Compiler        AppleClang 14.0.3.14030022
Compiler flags:
C                -m64 -pipe -W -Wall -fsigned-char -fno-common -Qunused-arguments -pthread -O3 -DNDEBUG
C++              -std=c++20 -Wc++11-narrowing -Wsign-compare -Wsometimes-uninitialized -Wconditional-uninitialized -Wheader-guard -Warray-bounds -Wcomment -Wtautological-compare -Wstrncat-size -Wloop-analysis -Wbool-conversion -m64 -pipe -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Qunused-arguments -pthread -stdlib=libc++ -O3 -DNDEBUG
Linker flags:
Executable      -L/opt/homebrew/opt/openssl@3/lib -mmacosx-version-min=13.3
Module          -L/opt/homebrew/opt/openssl@3/lib
Shared          -L/opt/homebrew/opt/openssl@3/lib

And here is where the compilation fails (cmake --build . --target install -- -j10 ran in the root_build folder).

Consolidate compiler generated dependencies of target ROOTGraphicsPrimitives
[ 80%] Linking CXX shared library ../../lib/libROOTGraphicsPrimitives.so
[ 80%] Built target ROOTGraphicsPrimitives
In file included from /Users/[...]/Library/PhyTools/RootCern/v6_28_04/root_src/core/imt/src/TThreadExecutor.cxx:10:
In file included from /Users/[...]/Library/PhyTools/RootCern/v6_28_04/root_build/ginclude/tbb/tbb.h:65:
/Users/[...]/Library/PhyTools/RootCern/v6_28_04/root_build/ginclude/tbb/iterators.h:246:27: error: no type named 'result_of' in namespace 'std'
    typedef typename std::result_of<UnaryFunc(typename std::iterator_traits<Iter>::reference)>::type reference;
            ~~~~~~~~~~~~~~^~~~~~~~~
/Users/[...]/Library/PhyTools/RootCern/v6_28_04/root_build/ginclude/tbb/iterators.h:246:36: error: expected member name or ';' after declaration specifiers
    typedef typename std::result_of<UnaryFunc(typename std::iterator_traits<Iter>::reference)>::type reference;
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/Users/[...]/Library/PhyTools/RootCern/v6_28_04/root_build/ginclude/tbb/iterators.h:260:5: error: unknown type name 'reference'
    reference operator*() const {
    ^
/Users/[...]/Library/PhyTools/RootCern/v6_28_04/root_build/ginclude/tbb/iterators.h:263:5: error: unknown type name 'reference'
    reference operator[](difference_type i) const {
    ^
4 errors generated.
make[2]: *** [core/imt/CMakeFiles/Imt.dir/src/TThreadExecutor.cxx.o] Error 1
make[1]: *** [core/imt/CMakeFiles/Imt.dir/all] Error 2
make: *** [all] Error 2

Can you help me to figure out what is happening?

However, I can successfully compile and run root with c++17:

cmake -DCMAKE_INSTALL_PREFIX=/Users/[...]/Library/PhyTools/RootCern/v6_28_04/root_install/ -DPython3_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.11/bin/python3 -DPython2_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/2.7/bin/python2 -DCMAKE_CXX_STANDARD=17 -D qt5web=ON ../root_src
cmake --build . --target install -- -j10

source thisroot.sh

   ------------------------------------------------------------------
  | Welcome to ROOT 6.28/04                        https://root.cern |
  | (c) 1995-2022, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for macosxarm64 on May 09 2023, 23:58:00                   |
  | From tags/v6-28-04@v6-28-04                                      |
  | With Apple clang version 14.0.3 (clang-1403.0.22.14.1)           |
  | Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q'  |
   ------------------------------------------------------------------

Thank you in advance for your help.


ROOT Version: 6.28/04
Platform: ARM MacBook Pro (M1 Max)
Compiler: AppleClang 14.0.3.14030022


Hi @Massimo_Girola,

thank you for your question. Maybe @Axel could help?

Cheers,
Marta

ROOT’s builtin tbb is too old to be built with C++20. Your two options:

  • use master, where I have just updated builtin tbb
  • grab / build your own tbb and configure ROOT to use that.

In both ways I was still not able to compile root with c++ 20, however this time the problem is not related to tbb apparently. I guess I will just wait for future patches.
Thank you for your help.

Would be great if you could share the error message you see… We are building with C++20, both on macOS and with GCC / Linux…

Yes, I’m glad to give you any help I can.
So, I have installed tbb on my mac with brew (brew install tbb).
Then I have disabled tbb with -D builtin_tbb=OFF.
So I have, in root_build folder

cmake -DCMAKE_INSTALL_PREFIX=/Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_install/ -DPython3_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.11/bin/python3 -DPython2_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/2.7/bin/python2 -DCMAKE_CXX_STANDARD=20 -D qt5web=ON -D builtin_tbb=OFF ../root_src

And the relevant output is:

System          Darwin-22.4.0
Processor       10 core Apple M1 Max (arm64)
Build type      Release
Install path    /Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_install
Compiler        AppleClang 14.0.3.14030022
Compiler flags:
C                -m64 -pipe -W -Wall -fsigned-char -fno-common -Qunused-arguments -pthread -O3 -DNDEBUG
C++              -std=c++20 -Wc++11-narrowing -Wsign-compare -Wsometimes-uninitialized -Wconditional-uninitialized -Wheader-guard -Warray-bounds -Wcomment -Wtautological-compare -Wstrncat-size -Wloop-analysis -Wbool-conversion -m64 -pipe -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Qunused-arguments -pthread -stdlib=libc++ -O3 -DNDEBUG
Linker flags:
Executable      -L/opt/homebrew/opt/openssl@3/lib -mmacosx-version-min=13.3
Module          -L/opt/homebrew/opt/openssl@3/lib
Shared          -L/opt/homebrew/opt/openssl@3/lib

-- Enabled support for:  asimage builtin_afterimage builtin_clang builtin_cling builtin_freetype builtin_ftgl builtin_gl2ps builtin_glew builtin_gtest builtin_llvm builtin_nlohmannjson builtin_openssl builtin_openui5 builtin_vdt builtin_xrootd builtin_xxhash clad cocoa dataframe exceptions fftw3 gdml http imt libcxx mathmore mlp minuit2 opengl pyroot qt5web roofit webgui root7 rpath runtime_cxxmodules shared sqlite ssl tmva tmva-cpu tmva

Then I compile with:

cmake --build . --target install -- -j10

And I get the following output:

In file included from /Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_build/gui/qt5webdisplay/ROOTQt5WebDisplay_autogen/mocs_compilation.cpp:2:
/Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_build/gui/qt5webdisplay/ROOTQt5WebDisplay_autogen/EWIEGA46WW/moc_rooturlschemehandler.cpp:16:2: error: "This file was generated using the moc from 5.15.8. It"
#error "This file was generated using the moc from 5.15.8. It"
 ^
/Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_build/gui/qt5webdisplay/ROOTQt5WebDisplay_autogen/EWIEGA46WW/moc_rooturlschemehandler.cpp:17:2: error: "cannot be used with the include files from this version of Qt."
#error "cannot be used with the include files from this version of Qt."
 ^
/Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_build/gui/qt5webdisplay/ROOTQt5WebDisplay_autogen/EWIEGA46WW/moc_rooturlschemehandler.cpp:18:2: error: "(The moc has changed too much.)"
#error "(The moc has changed too much.)"
 ^
/Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_build/gui/qt5webdisplay/ROOTQt5WebDisplay_autogen/EWIEGA46WW/moc_rooturlschemehandler.cpp:35:1: error: use of undeclared identifier 'Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET'
QT_MOC_LITERAL(0, 0, 19), // "UrlRequestJobHolder"
^
/Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_build/gui/qt5webdisplay/ROOTQt5WebDisplay_autogen/EWIEGA46WW/moc_rooturlschemehandler.cpp:29:5: note: expanded from macro 'QT_MOC_LITERAL'
    Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
    ^
/Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_build/gui/qt5webdisplay/ROOTQt5WebDisplay_autogen/EWIEGA46WW/moc_rooturlschemehandler.cpp:36:1: error: use of undeclared identifier 'Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET'
QT_MOC_LITERAL(1, 20, 16), // "onRequestDeleted"
^
/Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_build/gui/qt5webdisplay/ROOTQt5WebDisplay_autogen/EWIEGA46WW/moc_rooturlschemehandler.cpp:29:5: note: expanded from macro 'QT_MOC_LITERAL'
    Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
    ^
/Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_build/gui/qt5webdisplay/ROOTQt5WebDisplay_autogen/EWIEGA46WW/moc_rooturlschemehandler.cpp:37:1: error: use of undeclared identifier 'Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET'
QT_MOC_LITERAL(2, 37, 0), // ""
^
/Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_build/gui/qt5webdisplay/ROOTQt5WebDisplay_autogen/EWIEGA46WW/moc_rooturlschemehandler.cpp:29:5: note: expanded from macro 'QT_MOC_LITERAL'
    Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
    ^
[ 87%] Building CXX object geom/geompainter/CMakeFiles/GeomPainter.dir/src/TGeoPainter.cxx.o
/Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_build/gui/qt5webdisplay/ROOTQt5WebDisplay_autogen/EWIEGA46WW/moc_rooturlschemehandler.cpp:38:1: error: use of undeclared identifier 'Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET'
QT_MOC_LITERAL(3, 38, 3) // "obj"
^
/Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_build/gui/qt5webdisplay/ROOTQt5WebDisplay_autogen/EWIEGA46WW/moc_rooturlschemehandler.cpp:29:5: note: expanded from macro 'QT_MOC_LITERAL'
    Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
    ^
/Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_build/gui/qt5webdisplay/ROOTQt5WebDisplay_autogen/EWIEGA46WW/moc_rooturlschemehandler.cpp:80:1: error: unknown type name 'QT_INIT_METAOBJECT'
QT_INIT_METAOBJECT const QMetaObject UrlRequestJobHolder::staticMetaObject = { {
^
/Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_build/gui/qt5webdisplay/ROOTQt5WebDisplay_autogen/EWIEGA46WW/moc_rooturlschemehandler.cpp:80:37: error: expected ';' after top level declarator
QT_INIT_METAOBJECT const QMetaObject UrlRequestJobHolder::staticMetaObject = { {
                                    ^
                                    ;
/Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_build/gui/qt5webdisplay/ROOTQt5WebDisplay_autogen/EWIEGA46WW/moc_rooturlschemehandler.cpp:130:1: error: use of undeclared identifier 'Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET'
QT_MOC_LITERAL(0, 0, 20) // "RootUrlSchemeHandler"
^
/Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_build/gui/qt5webdisplay/ROOTQt5WebDisplay_autogen/EWIEGA46WW/moc_rooturlschemehandler.cpp:124:5: note: expanded from macro 'QT_MOC_LITERAL'
    Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
    ^
/Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_build/gui/qt5webdisplay/ROOTQt5WebDisplay_autogen/EWIEGA46WW/moc_rooturlschemehandler.cpp:161:1: error: unknown type name 'QT_INIT_METAOBJECT'
QT_INIT_METAOBJECT const QMetaObject RootUrlSchemeHandler::staticMetaObject = { {
^
/Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_build/gui/qt5webdisplay/ROOTQt5WebDisplay_autogen/EWIEGA46WW/moc_rooturlschemehandler.cpp:161:37: error: expected ';' after top level declarator
QT_INIT_METAOBJECT const QMetaObject RootUrlSchemeHandler::staticMetaObject = { {
                                    ^
                                    ;
[ 87%] Linking CXX shared library ../../lib/libROOTBrowserTreeWidget.so
In file included from /Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_src/gui/qt5webdisplay/rootwebview.cpp:13:
In file included from /Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_src/gui/qt5webdisplay/rootwebview.h:16:
In file included from /opt/homebrew/opt/qt@5/lib/QtWebEngineWidgets.framework/Headers/QWebEngineView:1:
In file included from /opt/homebrew/opt/qt@5/lib/QtWebEngineWidgets.framework/Headers/qwebengineview.h:48:
In file included from /opt/homebrew/opt/qt@5/lib/QtWebEngineWidgets.framework/Headers/qwebenginepage.h:45:
/opt/homebrew/opt/qt@5/lib/QtWebEngineWidgets.framework/Headers/qwebenginedownloaditem.h:138:18: error: 'deprecated' attribute cannot be applied to types
    DownloadType Q_DECL_DEPRECATED type() const;
                 ^
/opt/homebrew/include/QtCore/qcompilerdetection.h:955:31: note: expanded from macro 'Q_DECL_DEPRECATED'
#  define Q_DECL_DEPRECATED [[deprecated]]
                              ^
In file included from /Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_src/gui/qt5webdisplay/rootwebview.cpp:13:
In file included from /Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_src/gui/qt5webdisplay/rootwebview.h:16:
In file included from /opt/homebrew/opt/qt@5/lib/QtWebEngineWidgets.framework/Headers/QWebEngineView:1:
In file included from /opt/homebrew/opt/qt@5/lib/QtWebEngineWidgets.framework/Headers/qwebengineview.h:48:
In file included from /opt/homebrew/opt/qt@5/lib/QtWebEngineWidgets.framework/Headers/qwebenginepage.h:46:
/opt/homebrew/opt/qt@5/lib/QtWebEngineCore.framework/Headers/qwebenginecallback.h:96:1: error: expected function body after function declarator
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QWebEngineCallback<const QString &>)
^
In file included from /Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_build/gui/qt5webdisplay/ROOTQt5WebDisplay_autogen/mocs_compilation.cpp:3:
In file included from /Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_build/gui/qt5webdisplay/ROOTQt5WebDisplay_autogen/EWIEGA46WW/moc_rootwebpage.cpp:10:
In file included from /Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_build/gui/qt5webdisplay/ROOTQt5WebDisplay_autogen/EWIEGA46WW/../../../../../root_src/gui/qt5webdisplay/rootwebpage.h:16:
In file included from /opt/homebrew/opt/qt@5/lib/QtWebEngineWidgets.framework/Headers/QWebEnginePage:1:
In file included from /opt/homebrew/opt/qt@5/lib/QtWebEngineWidgets.framework/Headers/qwebenginepage.h:45:
/opt/homebrew/opt/qt@5/lib/QtWebEngineWidgets.framework/Headers/qwebenginedownloaditem.h:138:18: error: 'deprecated' attribute cannot be applied to types
    DownloadType Q_DECL_DEPRECATED type() const;
                 ^
/opt/homebrew/include/QtCore/qcompilerdetection.h:955:31: note: expanded from macro 'Q_DECL_DEPRECATED'
#  define Q_DECL_DEPRECATED [[deprecated]]
                              ^
In file included from /Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_src/gui/qt5webdisplay/rootwebview.cpp:13:
In file included from /Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_src/gui/qt5webdisplay/rootwebview.h:16:
In file included from /opt/homebrew/opt/qt@5/lib/QtWebEngineWidgets.framework/Headers/QWebEngineView:1:
In file included from /opt/homebrew/opt/qt@5/lib/QtWebEngineWidgets.framework/Headers/qwebengineview.h:48:
In file included from /opt/homebrew/opt/qt@5/lib/QtWebEngineWidgets.framework/Headers/qwebenginepage.h:47:
/opt/homebrew/include/QtWebEngineCore/qwebenginehttprequest.h:61:24: error: unknown type name 'QWebEngineHttpRequestPrivate'; did you mean 'QWebEngineHttpRequest'?
    QSharedDataPointer<QWebEngineHttpRequestPrivate> d;
                       ^
/opt/homebrew/include/QtWebEngineCore/qwebenginehttprequest.h:18:30: note: 'QWebEngineHttpRequest' declared here
class Q_WEBENGINECORE_EXPORT QWebEngineHttpRequest
                             ^
[ 87%] Linking CXX shared library ../../lib/libROOTBrowserTCanvasWidget.so
In file included from /Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_build/gui/qt5webdisplay/ROOTQt5WebDisplay_autogen/mocs_compilation.cpp:3:
In file included from /Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_build/gui/qt5webdisplay/ROOTQt5WebDisplay_autogen/EWIEGA46WW/moc_rootwebpage.cpp:10:
In file included from /Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_build/gui/qt5webdisplay/ROOTQt5WebDisplay_autogen/EWIEGA46WW/../../../../../root_src/gui/qt5webdisplay/rootwebpage.h:16:
In file included from /opt/homebrew/opt/qt@5/lib/QtWebEngineWidgets.framework/Headers/QWebEnginePage:1:
In file included from /opt/homebrew/opt/qt@5/lib/QtWebEngineWidgets.framework/Headers/qwebenginepage.h:46:
/opt/homebrew/opt/qt@5/lib/QtWebEngineCore.framework/Headers/qwebenginecallback.h:96:1: error: expected function body after function declarator
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QWebEngineCallback<const QString &>)
^
[ 87%] Built target ROOTBrowserTreeWidget
[ 87%] Generating G__SessionViewer.cxx, ../../lib/SessionViewer.pcm
[ 87%] Built target ROOTBrowserTCanvasWidget
In file included from /Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_build/gui/qt5webdisplay/ROOTQt5WebDisplay_autogen/mocs_compilation.cpp:3:
/Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_build/gui/qt5webdisplay/ROOTQt5WebDisplay_autogen/EWIEGA46WW/moc_rootwebpage.cpp:16:2: error: "This file was generated using the moc from 5.15.8. It"
#error "This file was generated using the moc from 5.15.8. It"
 ^
/Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_build/gui/qt5webdisplay/ROOTQt5WebDisplay_autogen/EWIEGA46WW/moc_rootwebpage.cpp:17:2: error: "cannot be used with the include files from this version of Qt."
#error "cannot be used with the include files from this version of Qt."
 ^
/Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_build/gui/qt5webdisplay/ROOTQt5WebDisplay_autogen/EWIEGA46WW/moc_rootwebpage.cpp:18:2: error: "(The moc has changed too much.)"
#error "(The moc has changed too much.)"
 ^
/Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_build/gui/qt5webdisplay/ROOTQt5WebDisplay_autogen/EWIEGA46WW/moc_rootwebpage.cpp:35:1: error: use of undeclared identifier 'Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET'
QT_MOC_LITERAL(0, 0, 11) // "RootWebPage"
^
/Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_build/gui/qt5webdisplay/ROOTQt5WebDisplay_autogen/EWIEGA46WW/moc_rootwebpage.cpp:29:5: note: expanded from macro 'QT_MOC_LITERAL'
    Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
    ^
[ 87%] Generating G__ProofPlayer.cxx, ../../lib/ProofPlayer.pcm
/Users/[...]/Library/PhyTools/RootCern/v6_28_04_cxx20/root_build/gui/qt5webdisplay/ROOTQt5WebDisplay_autogen/EWIEGA46WW/moc_rootwebpage.cpp:66:1: error: unknown type name 'QT_INIT_METAOBJECT'
QT_INIT_METAOBJECT const QMetaObject RootWebPage::staticMetaObject = { {
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.


If I instead compile version master without the option -D builtin_tbb=OFF (default should be on if I am not wrong). I get almost the same error, however this time I have also errors related to std

In module 'std' imported from input_line_1:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__iterator/reverse_iterator.h:141:23: error: 'std::reverse_iterator<std::string *>::operator->' from module 'std.iterator.__iterator.reverse_iterator' is not present in definition of 'std::reverse_iterator<std::string *>' in module 'std.iterator.__iterator.reverse_iterator'
    constexpr pointer operator->() const
                      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__iterator/reverse_iterator.h:141:23: note: declaration of 'operator->' does not match
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__iterator/reverse_iterator.h:141:23: error: 'std::reverse_iterator<std::reverse_iterator<std::string *> >::operator->' from module 'std.iterator.__iterator.reverse_iterator' is not present in definition of 'std::reverse_iterator<std::reverse_iterator<std::string *> >' in module 'std.iterator.__iterator.reverse_iterator'
    constexpr pointer operator->() const
                      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__iterator/reverse_iterator.h:141:23: note: declaration of 'operator->' does not match

Maybe there is just some wrong cmake setting from my side, however, root v6.28/04 with the same settings and in the same environment compiles fine with c++17.

Thank you for any help.

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