-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Description
Check duplicate issues.
- Checked for duplicates
Description
ROOT failed[a] to build using newer GCC 14.3.1. Searching net I found
- Building LLVM 20.1.4 fails with C++20 llvm/llvm-project#139072
- https://gcc.gnu.org/gcc-15/porting_to.html#cxx20-iterators
Any idea how to fix/avoid this build error?
[a]
root-6.32.13/interpreter/llvm-project/llvm/include/llvm/ADT/iterator.h:272:16: error: static assertion failed: The '-' operator is only defined for random access iterators.
272 | BaseT::IsRandomAccess,
| ^~~~~~~~~~~~~~
root-6.32.13/interpreter/llvm-project/llvm/include/llvm/ADT/iterator.h:272:16: note: 'llvm::iterator_facade_base<llvm::StringMapKeyIterator<llvm::StringRef>, std::forward_iterator_tag, llvm::StringRef, long int, llvm::StringRef*, llvm::StringRef&>::IsRandomAccess' evaluates to false
root-6.32.13/interpreter/llvm-project/llvm/include/llvm/ADT/iterator.h:274:14: error: no match for 'operator-' (operand types are 'const llvm::StringMapConstIterator<llvm::StringRef>' and 'const llvm::StringMapConstIterator<llvm::StringRef>')
274 | return I - RHS.I;
Reproducer
Build ROOT 6.32 (or root master) using latest GCC 15.1 or 14.3.1 with C++20
ROOT version
ROOT 6.32
Installation method
build from sources
Operating system
Linux
Additional context
Build ROOT for CMS offline software
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Issues