Community Packages

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#64745 - [root] Needs to be built in C++17 mode to support building C++ 17 code

Attached to Project: Community Packages
Opened by beojan (beojan) - Thursday, 05 December 2019, 12:00 GMT
Last edited by Christian Rebischke (Shibumi) - Saturday, 22 February 2020, 20:25 GMT
Task Type Bug Report
Category Packages
Status Assigned
Assigned To Konstantin Gizdov (kgizdov)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 1
Private No


Could you build ROOT in C++ 17 mode (with -Dcxx17=ON). This is necessary to support building C++ 17 code that links to ROOT.

This is what's done in the LCG releases using GCC 7 and above, so doing this isn't departing too far from upstream.

By the way, there's also a known ROOT bug that prevents using std::variant with GCC 9 (
I've found that building ROOT with GCC 8 works fine even if the linking code is itself built with GCC 9, so that would also be helpful.
This task depends upon

Comment by Konstantin Gizdov (kgizdov) - Monday, 24 February 2020, 16:32 GMT
ROOT is already built with the latest released standard (c++17). Have a look at settings.cmake and the following from the release notes -
However, root-cuda cannot be built with c++17 standard because the CUDA libraries are not compatible with it. root-cuda is thus built with GCC 8 and c++14.

For your std::variant issue - I suggest you try and avoid generating a dictionary unless absolutely necessary. Another option is to follow the suggestion in the bug you linked and circumvent it by disabling or providing a different implementation. In any case that is an upstream bug, not an issue with the package.

As a side note, I have written something on that bug report page.