Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 97799 - foobillard, segfault if -ffast-math is used
Summary: foobillard, segfault if -ffast-math is used
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: AMD64 Linux
: High minor (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
: 238198 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-07-03 03:00 UTC by rob shelton
Modified: 2008-09-22 02:23 UTC (History)
1 user (show)

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 rob shelton 2005-07-03 03:00:08 UTC
Foobillard needs the -ffast-math flag filtering from the CFLAGS when compiled on
AMD64, otherwise running the game gives a segmentation fault.

Works perfectly when the -ffast-math flag is removed

Reproducible: Always
Steps to Reproduce:
1.emerge foobillard
2.foobillard
3.

Actual Results:  
Segmentation fault

Expected Results:  
Game starts and runs

Portage 2.0.51.19 (default-linux/amd64/2005.0, gcc-3.4.3,
glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r11 x86_64)
=================================================================
System uname: 2.6.11-gentoo-r11 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.6.12
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, May 19 2005, 21:18:36)]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.5
sys-apps/sandbox:    [Not Present]
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.9.5, 1.7.9-r1, 1.8.5-r3, 1.4_p6, 1.6.3, 1.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.6.8.1-r4
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-mtune=k8 -O2 -ffast-math -mmmx -m3dnow -msse -msse2 -pipe"
CHOST="x86_64-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
/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/terminfo /etc/env.d"
CXXFLAGS="-mtune=k8 -O2 -ffast-math -mmmx -m3dnow -msse -msse2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X Xaw3d a52 aac aalib acl acpi alsa arts audiofile avi berkdb
bitmap-fonts bonobo bzip2 cdparanoia cdr crypt cups curl dlloader doc dts dv dvd
dvdr dvdread eds emacs encode esd fame ffmpeg fftw flac flash font-server
foomaticdb fortran gcj gd gdbm ggi gif gphoto2 gpm graphviz gstreamer gtk gtk2
gtkhtml guile ide ieee1394 imagemagick imlib ipv6 java javascript jbig joystick
jp2 jpeg jpeg2k junit justify kcal kde kdeenablefinal lesstif libwww lirc
lm_sensors lzo lzw lzw-tiff mad matroska md5sum memlimit mikmod mjpeg mng motif
mozilla mp3 mpeg mpi mysql mythtv ncurses network nls nptl nptlonly nvidia objc
odbc ogg oggvorbis openal opengl oss pam pda pdflib perl plotutils png povray
ppds python qt readline rtc ruby samba scanner sdl slang sndfile speex spell
sqlite ssl svg tcltk tcpd tetex tga theora threads tiff toolbar transcode
truetype truetype-fonts type1-fonts unicode usb userlocales v4l v4l2 vcd vidix
visualization vorbis wmf xanim xine xml xml2 xmms xpm xprint xrandr xv xvid xvmc
yv12 zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-07-03 03:31:07 UTC
From man gcc:

<snip>
This option should never be turned on by any -O option since it can result in
incorrect output for programs which depend on an exact implementation of IEEE or
ISO rules/specifications for math functions.
</snip>

Remove it from your C[XX]FLAGS...
Comment 2 Carsten Lohrke (RETIRED) gentoo-dev 2005-07-03 08:48:43 UTC
don't use silly compiler flags, using -ffast-math globally breaks a lot of
applications
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2008-09-22 02:23:41 UTC
*** Bug 238198 has been marked as a duplicate of this bug. ***