scummvm-0.7.0 won't build on Athlon XP platform with GCC 3.3.4. It fails on this line: g++ -Wp,-MMD,"backends/midi/mt32/.deps/part.d",-MQ,"backends/midi/mt32/part.o",-MP -Wall -march=athlon-xp -O2 -pipe -fomit-frame-pointer -falign-functions=4 -falign-jumps=4 -fPIC -ffast-math -march=athlon-xp -O2 -pipe -fomit-frame-pointer -falign-functions=4 -falign-jumps=4 -fPIC -ffast-math -ansi -W -Wno-unused-parameter -O -Wuninitialized -Wno-long-long-Wno-multichar -Wno-unknown-pragmas -pedantic -Wpointer-arith -Wcast-qual -Wconversion -Wshadow -Wimplicit -Wundef -Wnon-virtual-dtor -Wno-reorder -Wwrite-strings -fcheck-new -Wctor-dtor-privacy -DHAVE_CONFIG_H -DUNIX -DDISABLE_SAGA -DDISABLE_KYRA -I. -I. -I./common -I./backends/midi/mt32 -I/usr/include/SDL -D_REENTRANT -Itest/cxxtest -c backends/midi/mt32/part.cpp -o backends/midi/mt32/part.o backends/midi/mt32/i386.cpp: Dans function
scummvm-0.7.0 won't build on Athlon XP platform with GCC 3.3.4. It fails on this line: g++ -Wp,-MMD,"backends/midi/mt32/.deps/part.d",-MQ,"backends/midi/mt32/part.o",-MP -Wall -march=athlon-xp -O2 -pipe -fomit-frame-pointer -falign-functions=4 -falign-jumps=4 -fPIC -ffast-math -march=athlon-xp -O2 -pipe -fomit-frame-pointer -falign-functions=4 -falign-jumps=4 -fPIC -ffast-math -ansi -W -Wno-unused-parameter -O -Wuninitialized -Wno-long-long-Wno-multichar -Wno-unknown-pragmas -pedantic -Wpointer-arith -Wcast-qual -Wconversion -Wshadow -Wimplicit -Wundef -Wnon-virtual-dtor -Wno-reorder -Wwrite-strings -fcheck-new -Wctor-dtor-privacy -DHAVE_CONFIG_H -DUNIX -DDISABLE_SAGA -DDISABLE_KYRA -I. -I. -I./common -I./backends/midi/mt32 -I/usr/include/SDL -D_REENTRANT -Itest/cxxtest -c backends/midi/mt32/part.cpp -o backends/midi/mt32/part.o backends/midi/mt32/i386.cpp: Dans function « bool MT32Emu::Detect3DNow() »: backends/midi/mt32/i386.cpp:466: internal compiler error: in verify_local_live_at_start, at flow.c:601 I attract your attention to the particular error: "internal compiler error", and in what kind of function it's happening: Detect3DNow(). I assume this is an architecture-specific bug that doesn't happen everywhere. This may be a GCC bug *OR* a problem in the way my own GCC was compiled. Here are the USE flags my GCC was compiled with: +X -bootstrap -build -debug -fortran -gcj -hardened -multilib +nls +objc +pic -static (-uclibc) Temporary workaround: Disable MT32 emulation (configure option --disable-mt32emu) on the affected platforms. Reproducible: Always Steps to Reproduce: 1. Find Athlon XP box 2. emerge =games-engines/scummvm-0.7.0 emerge info: Portage 2.0.51-r3 (default-linux/x86/2004.3, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.6.9-gentoo-r6 i686) ================================================================= System uname: 2.6.9-gentoo-r6 i686 AMD Athlon(tm) XP 1600+ Gentoo Base System version 1.4.16 Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.90.0.1.1-r3 Headers: sys-kernel/linux26-headers-2.6.8.1-r1 Libtools: sys-devel/libtool-1.5.2-r7 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -falign-functions=4 -falign-jumps=4 -fPIC -ffast-math" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config//usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/init.d /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -falign-functions=4 -falign-jumps=4 -fPIC -ffast-math" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms userpriv usersandbox" GENTOO_MIRRORS="http://mir.zyrianes.net/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo http://www.gigaload.org/gentoo.org/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="x86 3dnow 3dnowex S3TC X aalib acl acpi adns alsa amd apache2 apm arts artswrappersuid audiofile avi berkdb bitmap-fonts bonobo cap caps cdparanoia cdr clamav crypt cscope cups curl dga divx4linux dv dvd dvdr encode esd ethereal evms2 expat faad fam fastcgi ffmpegflac flash fluidsynth foomaticdb foreign-package foreign-sysvinit fortran gb gd gd-external gdbm geoip ggi gif gimpprint glut gmtfull gmthigh gmtsuppl gmttria gphoto2 gpm gps gstreamer gtk gtk2 gtkhtml guile hbci imagemagick imap imlib innodb ipalias ipv6 jabber jack jack-tmpfs java jikes jpeg junit kde ladcca ldap libcaca libwww lufsusermount mad maildir matroska mbox mcal md5sum mikmod mmx mmx2 mng motif mpeg music mysql nas ncurses net nethack network nls no_wxgtk1 nptl oav objc odbc offensive ofx oggvorbis openal opengl pam pcap pcre pda pdflib perl php pic plotutils png ppds python qemu-fast qt quicktime radeon readline real rtc ruby samba sasl scanner sdk sdl slang slp smime snmp softmmu sox speex spell sqlite sse sse2 ssl stencil-buffer stroke svg tcltk tcpd tetex theora tiff transcode truetype truetype-fonts type1-fonts usb v4l2 videos vim-with-x wmf wxwin wxwindows xine xml xml2 xmms xosd xv xvid xvmc zlib"
Mr_Bones_: Why has amd64 been added to the CC list ?
Accident... we hadn't given Mr_Bones_ his medication before we let him out of his cage... sincerest apologies.
Doh. Anyhow, Sundance, try it with CFLAGS and CXXFLAGS set to "-pipe" and see if that makes a difference for you. Builds fine here.
I had almost the same problem. Same error but on the next file to be compiled: g++ -Wp,-MMD,"backends/midi/mt32/.deps/partial.d",-MQ,"backends/midi/mt32/partial.o",-MP -Wall -O3 -march=athlon-xp -pipe -fomit-frame-pointer -fPIC -DPIC -O3 -march=athlon-xp -pipe -fomit-frame-pointer -fPIC -DPIC -ansi -W -Wno-unused-parameter -O -Wuninitialized -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -pedantic -Wpointer-arith -Wcast-qual -Wconversion -Wshadow -Wimplicit -Wundef -Wnon-virtual-dtor -Wno-reorder -Wwrite-strings -fcheck-new -Wctor-dtor-privacy -DHAVE_CONFIG_H -DUNIX -DDISABLE_SAGA -DDISABLE_KYRA -I. -I. -I./common -I./backends/midi/mt32 -I/usr/include/SDL -D_REENTRANT -Itest/cxxtest -c backends/midi/mt32/partial.cpp -o backends/midi/mt32/partial.o backends/midi/mt32/i386.cpp: In function `bool MT32Emu::Detect3DNow()': backends/midi/mt32/i386.cpp:466: internal compiler error: in verify_local_live_at_start, at flow.c:601 My CFLAGS and CXXFLAGS were both set to: -O3 -march=athlon-xp -pipe -fomit-frame-pointer -fPIC -DPIC I tried the following as suggested by Mr. Bones and it compiled correctly: CFLAGS=-pipe CXXFLAGS=-pipe emerge games-engines/scummvm Here is some info about my system: leezpc ~ # emerge -V Portage 2.0.51-r3 (default-linux/x86/2004.0, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.6.8-gentoo-r1 i686) leezpc ~ # uname -a Linux leezpc 2.6.8-gentoo-r1 #1 Thu Nov 11 21:31:45 GMT 2004 i686 AMD Athlon(tm) XP 1800+ AuthenticAMD GNU/Linux
Is this an gcc upstream bug or a gentoo patch that makes this problem?
Mr. Bones: Thank you for your answer. I've built ScummVM-0.7.0 with CFLAGS set to "-pipe", and it indeed works. I've hunted down the flag that causes it to fail, and it seems to be "-fPIC". I tried with and without "-march=athlon-xp", and it doesn't affect the end result. I don't know if this is a GCC bug or a ScummVM bug, but you will probably want to inform the GCC guys nonetheless, since it failed with an 'internal compiler error'. In the meanwhile, the ScummVM ebuild can be fixed by filtering out the -fPIC flag, I suppose.
You shouldn't have -fPIC in your global CFLAGS anyhow so I'm going to go ahead and mark this INVALID. Glad it's working for you.
Isn't -fPIC mandatory to make prelink work though?
Not exactly, since most stuff builds properly. It really can break stuff to force -fPIC in CFLAGS, as there are certain things that won't build with it.
Thank you for the kind answer to this off-topic question. :) I've removed -fPIC from my CFLAGS. There seems to be a USE flag to handle this option nowadays, anyway, so it's all good. Thanks again!