Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 113627

Summary: games-roguelike/ivan segfaults consistently unless certain CFLAGS are omitted
Product: Gentoo Linux Reporter: trefoil <gentoo>
Component: [OLD] GamesAssignee: Gentoo Games <games>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
URL: http://ivan.13.forumer.com/viewtopic.php?t=48
Whiteboard:
Package list:
Runtime testing required: ---

Description trefoil 2005-11-26 07:27:29 UTC
If Ivan is compiled with:
"-march=athlon-xp -O2" or
"-march=pentium-3 -O2" or
"-march=i686 -O2"
it crashes as stated below. For me, using just "-O2" or "-march=pentium-3 -O0"
fixes the problem.

Other CFLAGS combinations may work, but the simplest solution is to modify the
ebuild to force -O0 or remove the -march setting. More information may be
available at the link included.

Reproducible: Always
Steps to Reproduce:
1.Start Ivan, compiled with "-march=i686 -O2".
2.Adventure a little while, die.
3.Say yes to view the list of monsters killed, watch the game segfault.



Portage 2.0.51.22-r3 (default-linux/x86/2005.1, gcc-3.3.6, glibc-2.3.5-r2,
2.6.14-gentoo-r2 i686)
=================================================================
System uname: 2.6.14-gentoo-r2 i686 Pentium III (Coppermine)
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5, 2.4.2
sys-apps/sandbox:    1.2.12
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.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium3 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /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="-O2 -march=pentium3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.mirrors.pair.com/
http://mirror.espri.arizona.edu/gentoo/ http://mirrors.acm.cs.rpi.edu/gentoo/
http://open-systems.ufl.edu/mirrors/gentoo"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X a52 aac acpi alsa apm arts audiofile avi berkdb bitmap-fonts bzip2
cdparanoia crypt cups dvd emboss encode exif expat fam flac foomaticdb fortran
gdbm gif glut gnome gpm gstreamer gtk gtk2 idn imagemagick imap imlib ipv6
joystick jpeg kde kdexdeltas lcms libg++ libwww lua mad mikmod mmx mng motif
mozilla mp3 mpeg music ncurses nls nptl ogg oggvorbis opengl oss pam pcre pdflib
perl php png python qt quicktime readline ruby sdl spell sqlite sse ssl tcpd
tidy tiff truetype truetype-fonts type1-fonts udev usb voice vorbis win32codecs
xine xml xml2 xmms xv xvid zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LINGUAS, PORTDIR_OVERLAY
Comment 1 Mr. Bones. (RETIRED) gentoo-dev 2006-01-04 21:39:02 UTC
Ok, the ebuild now converts all -O arguments to -O0 in the ebuild.

Thanks for the bug report.