Root 5 compilation with gcc 10.2

Following these two threads here:

and here:

I applied the linked patches, but compiling gives the error:

[ 15%] Generating G__Thread.cxx, G__Thread.h
Error: Missing one of ';' expected at or after line 30.
Error: Unexpected end of file (G__fignorestream():3) /home/maxnoe/root/cint/cint/lib/prec_stl/deque:440:
Warning: Error occurred during reading source files
Warning: Error occurred during dictionary source generation
!!!Removing G__Thread.cxx G__Thread.h !!!
Error: ../../bin/rootcint_tmp: error loading headers...
make[2]: *** [core/thread/CMakeFiles/Thread.dir/build.make:99: core/thread/G__Thread.cxx] Error 1
make[1]: *** [CMakeFiles/Makefile2:4657: core/thread/CMakeFiles/Thread.dir/all] Error 2

I know very well that root 5 is not supported anymore, bu maybe one of the original authors of these patch files has an idea?

@reznicek @denauroi


ROOT Version: latest github v5-34-00-patches branch
Platform: linux (Manjaro)
Compiler: gcc 10.2.0


The was a parentheses error in the patch file, one parenthesis needs to be removed in each line of the patch:

diff --git a/cint/cint/lib/prec_stl/deque b/cint/cint/lib/prec_stl/deque
index a80f42c..ae5cd9f 100644
--- a/cint/cint/lib/prec_stl/deque
+++ b/cint/cint/lib/prec_stl/deque
@@ -99,8 +99,10 @@ class deque {
 #else
     bool operator!=(const iterator& x) ;
 #endif
+#if (!defined(G__GNUC) || (defined(G__GNUC) && G__GNUC_VER>=3004 && G__GNUC_VER<10000))
     iterator operator+(long n);
     iterator operator-(long n);
+#endif
     iterator& operator+=(long n);
     iterator& operator-=(long n);
     T& operator[](long n) ;
@@ -148,8 +150,10 @@ class deque {
     reverse_iterator operator++(int a);
     reverse_iterator& operator--();
     reverse_iterator operator--(int a);
+#if (!defined(G__GNUC) || (defined(G__GNUC) && G__GNUC_VER>=3004 && G__GNUC_VER<10000))
     reverse_iterator operator+(long n);
     reverse_iterator operator-(long n);
+#endif
     reverse_iterator& operator+=(long n);
     reverse_iterator& operator-=(long n);
     T& operator[](long n) ;

Corrected patch file: gcc10.patch.txt (973 Bytes)

1 Like

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