First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 51116
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Games <games@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Alexander Kahl <e-user@gmx.net>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
ufo-ai-0.10.040218_add-filter-flags.patch This patch filters out the -fstack-protector flag. patch Peter Jensen 2004-05-15 11:07 0000 307 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 51116 depends on: Show dependency tree
Bug 51116 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-05-15 01:30 0000
Compiling ufo-ai with CFLAGS="-march=athlon-xp -mcpu=athlon-xp -m3dnow -msse
-mfpmath=sse -mmmx -O3
-pipe -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop
-frerun-loop-opt -falign-functions=4 -maccumulate-outgoing-args -ffast-math
-fprefetch-loop-arrays -fstack-protector"
either leads to signal 11 when clicking on "equip" or "buy/sell" inside the
game or, sometimes, it works but character/object models are "invisible".
Building with CFLAGS="-mcpu=athlon-xp -O3 -pipe -fomit-frame-pointer
-falign-functions=4 -fstack-protector" the game works properly. Thus the ebuild
needs to filter the flags causing the problem.

Reproducible: Always
Steps to Reproduce:
1. Compile the build with the given CFLAGS
2. Start the game
3. Begin new game
4. Click on "equip" or "buy/sell"

Actual Results:  
Game crashed, see given URL for debug output.

Expected Results:  
Work properly.

Portage 2.0.50-r6 (default-x86-2004.0, gcc-3.3.2, glibc-2.3.2-r9,
2.6.5-gentoo-r1)
=================================================================
System uname: 2.6.5-gentoo-r1 i686 AMD Athlon(tm)
Gentoo Base System version 1.4.10
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.58-r1
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -mcpu=athlon-xp -m3dnow -msse -mfpmath=sse -mmmx -O3
-pipe -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop
-frerun-loop-opt -falign-functions=4 -maccumulate-outgoing-args -ffast-math
-fprefetch-loop-arrays -fstack-protector"
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/lib/mozilla/defaults/pref /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -mcpu=athlon-xp -m3dnow -msse -mfpmath=sse -mmmx -O3
-pipe -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop
-frerun-loop-opt -falign-functions=4 -maccumulate-outgoing-args -ffast-math
-fprefetch-loop-arrays -fstack-protector"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp.linux.ee/pub/gentoo/distfiles/
http://212.219.247.11/sites/www.ibiblio.org/gentoo/
http://ftp.linux.ee/pub/gentoo/distfiles/
http://212.219.247.21/sites/www.ibiblio.org/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X aalib acpi alsa avi berkdb cdr crypt cups directfb dvd emacs
encode
esd fam fbcon flac foomaticdb gdbm gif gimpprint gnome gpm gstreamer gtk gtk2
icq imap imlib java joystick jpeg ldap libg++ libwww mad maildir matroska
mikmod
mitshm mmx mng motif mozilla moznocompose moznoirc moznomail mpeg ncurses nls
nocd nptl oggvorbis opengl oscar oss pam pdflib perl png ppds python quicktime
readline samba sdl slang spell sse ssl svga tcpd theora threads truetype
unicode
videos x86 xml2 xmms xv zlib"

------- Comment #1 From Peter Jensen 2004-05-15 10:58:37 0000 -------
I've just rebuilt the game a *lot* of times, and I can say that the only flag
that trips me up in the way you describe is "-fstack-protector".
That would have been my first guess, but you said it worked!  Well, perhaps it
does on your system, but not here.
These CFLAGS work fine here, once -fstack-protector has been filtered out:

"-march=pentium3 -mcpu=pentium3 -msse -mfpmath=sse -mmmx -O3 -pipe
-fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop
-frerun-loop-opt -falign-functions=4 -maccumulate-outgoing-args -ffast-math
-fprefetch-loop-arrays"

Obviously I had to change the CPU type to my Pentium III and remove -m3dnow,
which is an AMD specific feature.

------- Comment #2 From Peter Jensen 2004-05-15 11:07:12 0000 -------
Created an attachment (id=31488) [edit]
This patch filters out the -fstack-protector flag.

I tested this with all sorts of weird optimizations, and the game doesn't trip
up any more.

------- Comment #3 From SpanKY 2004-05-15 23:08:10 0000 -------
fixed in cvs, thanks

------- Comment #4 From Alexander Kahl 2004-05-17 23:41:56 0000 -------
Well this is strange for I am sure I've recompiled my working version with
-fstack-protector; I'm going to recompile without -fstack-protector but with
the other flags within the next hour and re-report if the build works.

------- Comment #5 From Peter Jensen 2004-05-18 02:31:20 0000 -------
I just tried this on my Athlon machine with those *exact* CFLAGS.
With the filter-flags it works, wihout the filter-flags it doesn't.
If you have a different experience, I suspect something else is broken.
I recommend keeping this bug closed.

First Last Prev Next    No search results available      Search page      Enter new bug