I am unable to compile atanks under the newer gcc 3.4 compiler. Reproducible: Always Steps to Reproduce: 1. 2. 3. Portage 2.0.50-r9 (gcc34-x86-2004.2, gcc-3.4.1, glibc-2.3.4.20040808-r0, 2.6.8-rc4-mm1) ================================================================= System uname: 2.6.8-rc4-mm1 i686 AMD Athlon(tm) XP 2600+ Gentoo Base System version 1.5.3 distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.5-r1 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=athlon-xp -momit-leaf-frame-pointer -fomit-frame-pointer -funroll-loops -ffast-math -ftracer -fprefetch-loop-arrays -finline-limit=600 -mfpmath=387 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -march=athlon-xp -momit-leaf-frame-pointer -fomit-frame-pointer -funroll-loops -ffast-math -ftracer -fprefetch-loop-arrays -finline-limit=600 -mfpmath=387 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache prelink" GENTOO_MIRRORS="http://gentoo.mirrors.pair.com http://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/bmg-main" SYNC="rsync://192.168.0.50/gentoo-portage" USE="3dfx 3dnow X aalib aim alsa apm avi berkdb bonobo cdr crypt cups curl dga directfb divx4linux dvd encode escreen esd etwin fbcon fdftk flac flash foomaticdb gb gdbm gif gimpprint gnome gnutls gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile icq imagemagick imlib ipv6 jabber jack java javascript jikes joystick jpeg libg++ libwww mad maildir mbox mikmod mmx mng motif mozilla mpeg msn mysql ncurses nls nodroproot odbc oggvorbis openal opengl oscar oss pam pdflib perl png ppds python quicktime readline samba scanner sdl slang slp speex spell sse ssl svg svga szip tcltk tcpd tiff truetype usb vidoes wmf wxwindows x86 xml xml2 xmms xv yahoo zlib"
here is the error message: Calculating dependencies ...done! >>> emerge (1 of 1) games-action/atanks-1.1.0 to / >>> md5 src_uri ;-) atanks-1.1.0.tar.gz >>> Unpacking source... >>> Unpacking atanks-1.1.0.tar.gz to /var/tmp/portage/atanks-1.1.0/work >>> Source unpacked. make -C src make[1]: Entering directory `/var/tmp/portage/atanks-1.1.0/work/atanks/src' g++ -c globaldata.cc -o globaldata.o -DLINUX -DVERSION=\"1.1.0\" -DDATA_DIR=\"/usr/share/games/atanks\" -O3 -march=athlon-xp -momit-leaf-frame-pointer -fomit-frame-pointer -funroll-loops -ffast-math -ftracer -fprefetch-loop-arrays -finline-limit=600 -mfpmath=387 -pipe -Wall -Iinclude -g g++ -c environment.cc -o environment.o -DLINUX -DVERSION=\"1.1.0\" -DDATA_DIR=\"/usr/share/games/atanks\" -O3 -march=athlon-xp -momit-leaf-frame-pointer -fomit-frame-pointer -funroll-loops -ffast-math -ftracer -fprefetch-loop-arrays -finline-limit=600 -mfpmath=387 -pipe -Wall -Iinclude -g environment.cc: In member function `int ENVIRONMENT::ingamemenu()': environment.cc:297: warning: `textout_centre' is deprecated (declared at /usr/include/allegro/alcompat.h:174) environment.cc:297: warning: `textout_centre' is deprecated (declared at /usr/include/allegro/alcompat.h:174) g++ -c player.cc -o player.o -DLINUX -DVERSION=\"1.1.0\" -DDATA_DIR=\"/usr/share/games/atanks\" -O3 -march=athlon-xp -momit-leaf-frame-pointer -fomit-frame-pointer -funroll-loops -ffast-math -ftracer -fprefetch-loop-arrays -finline-limit=600 -mfpmath=387 -pipe -Wall -Iinclude -g player.cc: In member function `int PLAYER::addTankDamageToMatrix(TANK*, TANK*, int)': player.cc:1012: error: call of overloaded `abs(double)' is ambiguous /usr/include/stdlib.h:748: note: candidates are: int abs(int) /usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/g++-v3/cstdlib:153: note: long long int __gnu_cxx::abs(long long int) /usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/g++-v3/cstdlib:123: note: long int std::abs(long int) player.cc:1017: error: call of overloaded `abs(double)' is ambiguous /usr/include/stdlib.h:748: note: candidates are: int abs(int) /usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/g++-v3/cstdlib:153: note: long long int __gnu_cxx::abs(long long int) /usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/g++-v3/cstdlib:123: note: long int std::abs(long int) player.cc: In member function `void PLAYER::calcDamageMatrix(TANK*, int)': player.cc:1088: error: call of overloaded `abs(double)' is ambiguous /usr/include/stdlib.h:748: note: candidates are: int abs(int) /usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/g++-v3/cstdlib:153: note: long long int __gnu_cxx::abs(long long int) /usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/g++-v3/cstdlib:123: note: long int std::abs(long int) make[1]: *** [player.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory `/var/tmp/portage/atanks-1.1.0/work/atanks/src' make: *** [all] Error 2 !!! ERROR: games-action/atanks-1.1.0 failed. !!! Function games_src_compile, Line 122, Exitcode 2 !!! emake failed
Created attachment 38871 [details, diff] GCC 3.4 compile fix This fixes the errors that gcc 3.4 complained about and allows it to successfully compile. The changes shouldn't cause any problems as far as I can tell.
applied, thanks Halcy0n