Bug 132726 - hydrogen fails to build with gcc 4.1.0
Bug#: 132726 Product:  Gentoo Linux Version: 2006.0 Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: eldad@gentoo.org Reported By: mizvekov@gmail.com
Component: GCC Porting
URL: 
Summary: hydrogen fails to build with gcc 4.1.0
Keywords:  
Status Whiteboard: 
Opened: 2006-05-08 14:30 0000
Description:   Opened: 2006-05-08 14:30 0000
This is the error:
i686-pc-linux-gnu-g++ -c -pipe -I/usr/include -g -w -O3 -march=athlon-xp -pipe
-fno-strict-aliasing -D_REENTRANT  -DQT_NO_DEBUG -DQT_THREAD_SUPPORT
-DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/qt/3/mkspecs/linux-g++ -I. -I. -Isrc
-I/usr/qt/3/include -o src/tinystr.o src/lib/xml/tinystr.cpp
src/lib/xml/tinyxml.h:828: error: extra qualification 

------- Comment #1 From Matheus Izvekov 2006-05-08 14:30:31 0000 -------
This is the error:
i686-pc-linux-gnu-g++ -c -pipe -I/usr/include -g -w -O3 -march=athlon-xp -pipe
-fno-strict-aliasing -D_REENTRANT  -DQT_NO_DEBUG -DQT_THREAD_SUPPORT
-DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/qt/3/mkspecs/linux-g++ -I. -I. -Isrc
-I/usr/qt/3/include -o src/tinystr.o src/lib/xml/tinystr.cpp
src/lib/xml/tinyxml.h:828: error: extra qualification ‘TiXmlDeclaration::’ on
member ‘TiXmlDeclaration’

To fix it, here is the patch:

diff -ur a/src/lib/xml/tinyxml.h b/src/lib/xml/tinyxml.h
--- a/src/lib/xml/tinyxml.h     2005-10-17 20:32:04.000000000 -0200
+++ b/src/lib/xml/tinyxml.h     2006-05-08 18:31:27.000000000 -0300
@@ -823,7 +823,7 @@
 #endif

        /// Construct.
-       TiXmlDeclaration::TiXmlDeclaration( const char * _version,
+       TiXmlDeclaration( const char * _version,
                                                                              
const char * _encoding,
                                                                              
const char * _standalone );

------- Comment #2 From Matteo Azzali 2006-05-08 14:51:51 0000 -------
You just need to remove "TiXmlDeclaration::" from the file
src/lib/xml/tinyxml.h ,
line 828.
I would do myself but it asks for 16 dependancies here (I have an almost 
gnome-free system), so it would be nice if some hydrogen or gnome user would
provide a patch....

------- Comment #3 From Matheus Izvekov 2006-05-08 14:58:26 0000 -------
I did provide a patch, isnt it good?

------- Comment #4 From Eldad Zack (RETIRED) 2006-05-09 08:23:26 0000 -------
Looks good to me, I'll test it out as soon as I can.

------- Comment #5 From Eldad Zack (RETIRED) 2006-05-12 15:01:26 0000 -------
in CVS, thanks for the patch.