Bug 69416 - ivan 0.430 does not compile with GCC 3.4
Bug#: 69416 Product:  Gentoo Linux Version: unspecified Platform: x86
OS/Version: All Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: games@gentoo.org Reported By: lack@gentoo.org
Component: Games
URL: 
Summary: ivan 0.430 does not compile with GCC 3.4
Keywords:  
Status Whiteboard: 
Opened: 2004-10-29 08:47 0000
Description:   Opened: 2004-10-29 08:47 0000
When trying to compile ivan with gcc-config set to i686-pc-linux-gnu-3.4.2, I
got the following errors:

...
Making all in Source
make[2]: Entering directory
`/var/tmp/portage/ivan-0.430/work/ivan-0.430/Main/So
urce'
source='actset.cpp' object='actset.o' libtool=no \                             
depfile='.deps/actset.Po' tmpdepfile='.deps/actset.TPo' \
depmode=gcc3 /bin/sh ../../depcomp \                                           
i686-pc-linux-gnu-g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\"
-DPACKAGE_VERSI
ON=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"ivan\"
-DVERS
ION=\"0.430\"  -I. -I. -I../../FeLib/Include -I../../Main/Include 
-I/usr/includ
e/SDL -D_REENTRANT -DLINUX -DLOCAL_STATE_DIR=\"/var/games/ivan/\"
-DDATADIR=\"/u
sr/share/games\" -DUSE_SDL -DGCC  -O2 -march=athlon-xp -pipe -c -o actset.o
`tes
t -f 'actset.cpp' || echo './'`actset.cpp                                      
source='areaset.cpp' object='areaset.o' libtool=no \
depfile='.deps/areaset.Po' tmpdepfile='.deps/areaset.TPo' \                    
depmode=gcc3 /bin/sh ../../depcomp \
i686-pc-linux-gnu-g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\"
-DPACKAGE_VERSI
ON=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"ivan\"
-DVERS
ION=\"0.430\"  -I. -I. -I../../FeLib/Include -I../../Main/Include 
-I/usr/includ
e/SDL -D_REENTRANT -DLINUX -DLOCAL_STATE_DIR=\"/var/games/ivan/\"
-DDATADIR=\"/u
sr/share/games\" -DUSE_SDL -DGCC  -O2 -march=athlon-xp -pipe -c -o areaset.o
`te
st -f 'areaset.cpp' || echo './'`areaset.cpp
In file included from actset.cpp:3:                                            
../../Main/Include/proto.h: In function `outputfile& operator<<(outputfile&,
con
st type*)':
../../Main/Include/proto.h:80: error: no match for 'operator<<' in 'SaveFile << 
(ushort)(0)'
../../Main/Include/proto.h: In function `inputfile& operator>>(inputfile&,
type*
&)':
../../Main/Include/proto.h:88: error: no match for 'operator>>' in 'SaveFile >> 
Type'
actset.cpp: At global scope:
actset.cpp:6: error: too few template-parameter-lists
actset.cpp:7: error: too few template-parameter-lists
actset.cpp:8: error: too few template-parameter-lists
In file included from ../../Main/Include/char.h:9,
                 from actset.cpp:15:
../../Main/Include/script.h:201: error: an explicit specialization must be
prece
ded by 'template <>'
../../Main/Include/script.h:217: error: an explicit specialization must be
preceded by 'template <>'
../../Main/Include/script.h:241: error: an explicit specialization must be
preceded by 'template <>'
../../Main/Include/script.h:253: error: an explicit specialization must be
preceded by 'template <>'
In file included from ../../Main/Include/char.h:9,
                 from areaset.cpp:2:
../../Main/Include/script.h:201: error: an explicit specialization must be
preceded by 'template <>'
../../Main/Include/script.h:217: error: an explicit specialization must be
preceded by 'template <>'
../../Main/Include/script.h:241: error: an explicit specialization must be
preceded by 'template <>'
../../Main/Include/script.h:253: error: an explicit specialization must be
preceded by 'template <>'
In file included from areaset.cpp:8:
../../Main/Include/proto.h: In function `outputfile& operator<<(outputfile&,
const type*)':         
../../Main/Include/proto.h:80: error: ambiguous overload for 'operator<<' in
'SaveFile << (ushort)(0)'
../../Main/Include/level.h:162: note: candidates are: outputfile&
operator<<(outputfile&, const level*) <near match>
../../Main/Include/dungeon.h:49: note:                 outputfile&
operator<<(outputfile&, const dungeon*) <near match>
../../Main/Include/script.h:451: note:                 outputfile&
operator<<(outputfile&, const gamescript*) <near match>
../../Main/Include/team.h:47: note:                 outputfile&
operator<<(outputfile&, const team*) <near match>
../../Main/Include/game.h:51: note:                 outputfile&
operator<<(outputfile&, const homedata*) <near match>
../../FeLib/Include/bitmap.h:189: note:                 outputfile&
operator<<(outputfile&, const bitmap*) <near match>
../../Main/Include/proto.h: In function `inputfile& operator>>(inputfile&,
type*&)':                
../../Main/Include/proto.h:88: error: no match for 'operator>>' in 'SaveFile >>
Type'               
../../FeLib/Include/femath.h:77: note: candidates are: inputfile&
operator>>(inputfile&, interval&) 
../../FeLib/Include/femath.h:79: note:                 inputfile&
operator>>(inputfile&, region&)   
../../Main/Include/igraph.h:50: note:                 inputfile&
operator>>(inputfile&, graphicid&) 
../../Main/Include/level.h:163: note:                 inputfile&
operator>>(inputfile&, level*&)    
../../Main/Include/dungeon.h:50: note:                 inputfile&
operator>>(inputfile&, dungeon*&) 
../../Main/Include/lsquare.h:39: note:                 inputfile&
operator>>(inputfile&, emitter&)  
../../Main/Include/slot.h:119: note:                 inputfile&
operator>>(inputfile&, slot&)       
../../Main/Include/script.h:117: note:                 inputfile&
operator>>(inputfile&, script&)   
../../Main/Include/script.h:452: note:                 inputfile&
operator>>(inputfile&, gamescript*&)
../../Main/Include/team.h:48: note:                 inputfile&
operator>>(inputfile&, team*&)       
../../Main/Include/game.h:52: note:                 inputfile&
operator>>(inputfile&, homedata*&)   
../../Main/Include/game.h:72: note:                 inputfile&
operator>>(inputfile&, configid&)    
../../Main/Include/game.h:84: note:                 inputfile&
operator>>(inputfile&, dangerid&)    
../../FeLib/Include/bitmap.h:190: note:                 inputfile&
operator>>(inputfile&, bitmap*&) 
make[2]: *** [actset.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [areaset.o] Error 1
make[2]: Leaving directory
`/var/tmp/portage/ivan-0.430/work/ivan-0.430/Main/Source'                
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/ivan-0.430/work/ivan-0.430/Main'
make: *** [all-recursive] Error 1

!!! ERROR: games-roguelike/ivan-0.430 failed.
!!! Function games_src_compile, Line 143, Exitcode 2
!!! emake failed    
!!! If you need support, post the topmost build error, NOT this status message.

Workaround:

After switching gcc-config to i686-pc-linux-gnu-3.3.4, everything seemed to
work properly.

------- Comment #1 From Christian Harms 2004-11-29 15:09:49 0000 -------
Submitted to
<http://sourceforge.net/tracker/index.php?func=detail&atid=405033&aid=1070506&group_id=32287>

was answered with
"Thanks. Gcc 3.4.x branch didn't exist when we released 
v0.430 so we didn't notice this problem. It has already been 
fixed in our CVS version and will not reoccur in the soon-to-
be-released v0.50."

tried to set status to resolved-UPSTREAM, but was not allowed :)
looks like we have to wait until "soon" and hope the ebuild's maintainer will
notice :)

------- Comment #2 From Mr. Bones. 2004-12-10 22:51:53 0000 -------
ivan-0.50 added to portage.  Should be better with gcc34.

Thanks for the bug report.