Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 95047 - DOSBox - gcc flag prevents compilation
Summary: DOSBox - gcc flag prevents compilation
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Other
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-04 11:49 UTC by Joël
Modified: 2005-06-04 17:31 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joël 2005-06-04 11:49:50 UTC
There's a command-line switch that prevents dosbox 0.63 compilation with gcc 3.4.4, on x86. As far as I know, it is not an experimental switch.

Shortest example:

CXXFLAGS="-O2 -fsched2-use-traces" emerge dosbox

=> internal compiler error while compiling core_full.cpp

Wacky variation on the theme (can probably be simplified a lot):

CFLAGS="-pipe -O3 -march=pentium-m -mfpmath=sse,387 -maccumulate-outgoing-args -mno-align-stringops -fomit-frame-pointer -ffast-math -funroll-all-loops -fsched-spec-load -ftracer -fmove-all-movables -fsched2-use-superblocks -fsched2-use-traces" emerge dosbox

=> In core_dyn_x86.cpp:
{standard input}: Assembler messages:
{standard input}:19072: Error: symbol `run_return_adress' is already defined


Workaround:

As soon as the -fsched2-use-traces flag is removed, everything compiles fine. So maybe it should be filtered with flag-o-matic ?
Comment 1 Volker Hemmann 2005-06-04 12:11:54 UTC
Hi,  
I can confirm it, with this   
emerge --info:  
Portage 2.0.51.22-r1 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r0,  
2.6.11-gentoo-r9 i686)  
=================================================================  
System uname: 2.6.11-gentoo-r9 i686 AMD Athlon(tm) XP 2000+  
Gentoo Base System version 1.6.12  
ccache version 2.4 [enabled]  
dev-lang/python:     2.2.3-r5, 2.3.5  
sys-apps/sandbox:    1.2.8  
sys-devel/autoconf:  2.13, 2.59-r6  
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5  
sys-devel/binutils:  2.16-r1  
sys-devel/libtool:   1.5.18  
virtual/os-headers:  2.6.11-r1  
ACCEPT_KEYWORDS="x86 ~x86"  
AUTOCLEAN="yes"  
CBUILD="i686-pc-linux-gnu"  
CFLAGS="-march=athlon-xp -O2 -mmmx -m3dnow -msse -mfpmath=sse -ftracer  
-frename-registers -fweb -fomit-frame-pointer -Wdisabled-optimization -pipe"  
CHOST="i686-pc-linux-gnu"  
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"  
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"  
CXXFLAGS="-march=athlon-xp -O2 -mmmx -m3dnow -msse -mfpmath=sse -ftracer  
-frename-registers -fweb -fomit-frame-pointer -Wdisabled-optimization -pipe"  
DISTDIR="/usr/portage/distfiles"  
FEATURES="autoconfig candy ccache distlocks notitles sandbox sfperms strict"  
GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo  
http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo"  
LC_ALL="de_DE@euro"  
LINGUAS="de"  
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 16bit 3dnow 3dnowext 3ds S3TC X a52 aac aalib acpi alsa arts audiofile  
avi bash-completion berkdb bitmap-fonts bluetooth bzip2 bzlib cairo caps cdparanoia  
cdr cpudetection crypt css ctype curl dio divx4linux dnd dpms dvd dvdr dvdread editor  
emacs-w3 emboss encode exif expat fame fb fbcon ffmpeg fftw flac fortran freetype  
ftp gcc-libffi gd gdbm gif gimp glitz gnokii graphviz gs gtk gtk2 icq imagemagick imlib  
ipv6 irmc jack jack-tmpfs java javascript joystick jp2 jpeg jpeg2k kde kdeenablefinal  
ladcca lesstif libg++ libwww lzw mad maildir mikmod mjpeg mmx mng monkey motif  
mp3 mpeg mplayer mule music mysql ncurses nls no-htdocs no-old-linux noamazon  
noantlr nobcel nobeanutils nobsf nobsh nocardbus nocd nocommonslogging  
nocommonsnet nojdepend nojsch nojython nolog4j nooro nosendmail nowin nptl  
nvidia objc offensive ogg oggvorbis openal opengl pam pdflib perl physfs pic png  
posix python qemu-fast qt quicktime readline real samba scanner sdl server  
sharedmem slang sms snmp speex spell sqlite sse ssl stencil-buffer svg tcltk tcpd  
theora threads tiff timidity transcode truetype truetype-fonts type1-fonts unicode usb  
userlocales v4l v4l2 vanilla vcd videos vidix visualization vorbis win32codecs xanim  
xemacs xine xinerama xml2 xmlrpc xmms xosd xpm xrandr xscreensaver xv xvid xvmc  
yv12 zlib zvbi linguas_de userland_GNU kernel_linux elibc_glibc"  
Unset:  ASFLAGS, CTARGET, LANG, LDFLAGS, MAKEOPTS  
  
it builds, but as soon as -fsched2-use-traces is added, gcc bombs out:  
Making all in core_dyn_x86  
make[4]: Entering directory  
`/var/tmp/portage/dosbox-0.63/work/dosbox-0.63/src/cpu/core_dyn_x86'  
make[4]: F
Comment 2 Volker Hemmann 2005-06-04 12:11:54 UTC
Hi,  
I can confirm it, with this   
emerge --info:  
Portage 2.0.51.22-r1 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r0,  
2.6.11-gentoo-r9 i686)  
=================================================================  
System uname: 2.6.11-gentoo-r9 i686 AMD Athlon(tm) XP 2000+  
Gentoo Base System version 1.6.12  
ccache version 2.4 [enabled]  
dev-lang/python:     2.2.3-r5, 2.3.5  
sys-apps/sandbox:    1.2.8  
sys-devel/autoconf:  2.13, 2.59-r6  
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5  
sys-devel/binutils:  2.16-r1  
sys-devel/libtool:   1.5.18  
virtual/os-headers:  2.6.11-r1  
ACCEPT_KEYWORDS="x86 ~x86"  
AUTOCLEAN="yes"  
CBUILD="i686-pc-linux-gnu"  
CFLAGS="-march=athlon-xp -O2 -mmmx -m3dnow -msse -mfpmath=sse -ftracer  
-frename-registers -fweb -fomit-frame-pointer -Wdisabled-optimization -pipe"  
CHOST="i686-pc-linux-gnu"  
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"  
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"  
CXXFLAGS="-march=athlon-xp -O2 -mmmx -m3dnow -msse -mfpmath=sse -ftracer  
-frename-registers -fweb -fomit-frame-pointer -Wdisabled-optimization -pipe"  
DISTDIR="/usr/portage/distfiles"  
FEATURES="autoconfig candy ccache distlocks notitles sandbox sfperms strict"  
GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo  
http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo"  
LC_ALL="de_DE@euro"  
LINGUAS="de"  
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 16bit 3dnow 3dnowext 3ds S3TC X a52 aac aalib acpi alsa arts audiofile  
avi bash-completion berkdb bitmap-fonts bluetooth bzip2 bzlib cairo caps cdparanoia  
cdr cpudetection crypt css ctype curl dio divx4linux dnd dpms dvd dvdr dvdread editor  
emacs-w3 emboss encode exif expat fame fb fbcon ffmpeg fftw flac fortran freetype  
ftp gcc-libffi gd gdbm gif gimp glitz gnokii graphviz gs gtk gtk2 icq imagemagick imlib  
ipv6 irmc jack jack-tmpfs java javascript joystick jp2 jpeg jpeg2k kde kdeenablefinal  
ladcca lesstif libg++ libwww lzw mad maildir mikmod mjpeg mmx mng monkey motif  
mp3 mpeg mplayer mule music mysql ncurses nls no-htdocs no-old-linux noamazon  
noantlr nobcel nobeanutils nobsf nobsh nocardbus nocd nocommonslogging  
nocommonsnet nojdepend nojsch nojython nolog4j nooro nosendmail nowin nptl  
nvidia objc offensive ogg oggvorbis openal opengl pam pdflib perl physfs pic png  
posix python qemu-fast qt quicktime readline real samba scanner sdl server  
sharedmem slang sms snmp speex spell sqlite sse ssl stencil-buffer svg tcltk tcpd  
theora threads tiff timidity transcode truetype truetype-fonts type1-fonts unicode usb  
userlocales v4l v4l2 vanilla vcd videos vidix visualization vorbis win32codecs xanim  
xemacs xine xinerama xml2 xmlrpc xmms xosd xpm xrandr xscreensaver xv xvid xvmc  
yv12 zlib zvbi linguas_de userland_GNU kernel_linux elibc_glibc"  
Unset:  ASFLAGS, CTARGET, LANG, LDFLAGS, MAKEOPTS  
  
it builds, but as soon as -fsched2-use-traces is added, gcc bombs out:  
Making all in core_dyn_x86  
make[4]: Entering directory  
`/var/tmp/portage/dosbox-0.63/work/dosbox-0.63/src/cpu/core_dyn_x86'  
make[4]: Für das Ziel »all« ist nichts zu tun.  
make[4]: Leaving directory  
`/var/tmp/portage/dosbox-0.63/work/dosbox-0.63/src/cpu/core_dyn_x86'  
make[4]: Entering directory  
`/var/tmp/portage/dosbox-0.63/work/dosbox-0.63/src/cpu'  
i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I../..  -I../../include  
-I/usr/include/SDL -D_REENTRANT  -march=athlon-xp -O2 -mmmx -m3dnow -msse  
-fsched2-use-traces -mfpmath=sse -ftracer -frename-registers -fweb  
-fomit-frame-pointer -Wdisabled-optimization -pipe -c -o callback.o callback.cpp  
i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I../..  -I../../include  
-I/usr/include/SDL -D_REENTRANT  -march=athlon-xp -O2 -mmmx -m3dnow -msse  
-fsched2-use-traces -mfpmath=sse -ftracer -frename-registers -fweb  
-fomit-frame-pointer -Wdisabled-optimization -pipe -c -o cpu.o cpu.cpp  
cpu.cpp: In function `void CPU_CycleIncrease()':  
cpu.cpp:1307: interner Compiler-Fehler: in convert_regs_1, bei reg-stack.c:2820  
Please submit a full bug report,  
with preprocessed source if appropriate.  
See <URL:http://bugs.gentoo.org/> for instructions.  
Preprocessed source stored into /var/tmp/portage/dosbox-0.63/temp/ccZ6l5OW.out  
file, please attach this to your bugreport.  
  
(I would, but each time I try I get an 'empty file' error.) 
Comment 3 Mr. Bones. (RETIRED) gentoo-dev 2005-06-04 13:05:28 UTC
sounds more like a gcc bug to me.  Moving to toolchain.
Comment 4 Joël 2005-06-04 15:49:56 UTC
At first I hesitated to open this bug (seemed unimportant).. but now I'd be glad
if it can help improving gcc :-)

Also it seems, even when compilation completes, there might be a problem.

Has anyone got the Lotus III game ? Depending on CFLAGS, I'm getting a complete
crash of dosbox upon startup of this game. And other games work fine, regardless
of CFLAGS.

I'm trying to narrow down the Lotus III problem (I hope it's closely related to
this bug).
Comment 5 SpanKY gentoo-dev 2005-06-04 16:28:40 UTC
glad you found the flag
Comment 6 Joël 2005-06-04 17:31:44 UTC
Ok, after some effort I've just found what makes Lotus III fail in dosbox:

--- runs ok with: ---
CXXFLAGS="-O2 -march=pentium-m -mfpmath=sse" emerge dosbox

--- fails with: ---
CXXFLAGS="-O2 -march=pentium-m -mfpmath=sse,387" emerge dosbox


Hope this helps ;-)