[ROOT] Update2: cintdlls fails to build with GCC 3.1.1 & 3.2 (Was: ROOT + GCC 3.2 seems okay.)

From: Brett Viren (bv@bnl.gov)
Date: Wed Aug 28 2002 - 21:15:46 MEST


Brett Viren writes:
 > Brett Viren writes:
 > -Brett.

I gotta stop talking to myself like this...


Okay, I found a problem with ROOT and GCC 3.1.1/3.2 in the area of
building cintdlls ("make cintdlls"):


-------------------
In file included from cint/lib/dll_stl/G__cpp_vector.cxx:4:
cint/lib/dll_stl/G__cpp_vector.h:73: syntax error before `;' token
cint/lib/dll_stl/G__cpp_vector.h:77: syntax error before `;' token
(many more ....)
In file included from cint/lib/dll_stl/G__cpp_list.cxx:4:
cint/lib/dll_stl/G__cpp_list.h:71: syntax error before `;' token
cint/lib/dll_stl/G__cpp_list.h:76: syntax error before `;' token
(many more ....)
-------------------


And similar for map, map2, deque, set, multimap, multimap2, multiset,
stack, and queue.

The offending lines are like the following for the "vector" and the
"list", respectively:


-------------------
typedef random_access_iterator<char,long> G__random_access_iteratorlEcharcOlonggR;
typedef bidirectional_iterator<int,long> G__bidirectional_iteratorlEintcOlonggR;
-------------------


I tried playing with these lines and found the "syntax error" is due
to these iterators types not being defined.

The only places I find these defined in GCC 3.1.1 and 3.2's libstdc++
headers are:

/usr/include/c++/3.1/backward/iterator.h
/usr/include/c++/3.2/backward/iterator.h 

in which I find this warning:

-------------------
#warning This file includes at least one deprecated or antiquated header. \
Please consider using one of the 32 headers found in section 17.4.1.2 of the \
C++ standard. Examples include substituting the <X> header for the <X.h> \
header for C++ includes, or <sstream> instead of the deprecated header \
<strstream.h>. To disable this warning use -Wno-deprecated.
-------------------

and this comment:

-------------------
// The base classes input_iterator, output_iterator, forward_iterator,
// bidirectional_iterator, and random_access_iterator are not part of
// the C++ standard.  (They have been replaced by struct iterator.)
// They are included for backward compatibility with the HP STL.
[ defs of the iterators ... ]
-------------------

The backward/iterator.h file is not getting included into
G__cpp_vector.cxx and the rest, although the warning is triggered in
two spots (both due to cint/lib/longlong/longlong.h including
iostream.h).


This is with ROOT 3.03/08 CVS ca. 8/26 on Debian x86 with both GCC
versions 3.1.1 and 3.2:


-------------------
g++-3.1 -v
Reading specs from /usr/lib/gcc-lib/i386-linux/3.1.1/specs
Configured with: /mnt/data/gcc-3.1/gcc-3.1-3.1.1ds3/src/configure -v --enable-languages=c,c++,java,f77,proto,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.1 --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --enable-clocale=gnu --enable-__cxa_atexit --enable-threads=posix --enable-java-gc=boehm --enable-objc-gc i386-linux
Thread model: posix
gcc version 3.1.1
-------------------


and


-------------------
g++-3.2 -v
Reading specs from /usr/lib/gcc-lib/i386-linux/3.2/specs
Configured with: /mnt/data/gcc-3.1/gcc-3.2-3.2ds0/src/configure -v --enable-languages=c,c++,java,f77,proto,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.2 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-java-gc=boehm --enable-objc-gc i386-linux
Thread model: posix
gcc version 3.2 20020809 (Debian prerelease)
-------------------


Not sure what the best solution is, but I guess replacing these
iterator types with those defined in <iterator> is a start.

Cheers,
-Brett.



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:06 MET