<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>26031</bug_id>
          
          <creation_ts>2003-08-06 03:11 0000</creation_ts>
          <short_desc>emerging allegro fails in src-compile because of a floating point exception</short_desc>
          <delta_ts>2003-08-21 17:42:14 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Library</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>stefan@sblbs.de</reporter>
          <assigned_to>vapier@gentoo.org</assigned_to>
          <cc>ralphdewitt@charter.net</cc>

      

      
          <long_desc isprivate="0">
            <who>stefan@sblbs.de</who>
            <bug_when>2003-08-06 03:11:24 0000</bug_when>
            <thetext>when emerging game-launcher, allegro is a dependency. I use the following
(agressive) settings.

Portage 2.0.48-r5 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1)
=================================================================
System uname: 2.4.21 i686 Intel(R) Pentium(R) M processor 1300MHz
GENTOO_MIRRORS=&quot;ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo
http://gentoo.oregonstate.edu/ 
http://www.ibiblio.org/pub/Linux/distributions/gentoo&quot;
CONFIG_PROTECT=&quot;/etc /var/qmail/control /usr/kde/2/share/config
/usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config
/usr/share/config&quot;
CONFIG_PROTECT_MASK=&quot;/etc/gconf /etc/env.d&quot;
PORTDIR=&quot;/usr/portage&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR_OVERLAY=&quot;&quot;
USE=&quot;x86 oss avi crypt cups encode foomaticdb gif jpeg libg++ mad mikmod mmx
mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib directfb
alsa gdbm slang readline tetex aalib nas svga tcltk java X sdl gpm tcpd pam
libwww ssl perl python esd imlib oggvorbis gnome gtk qt kde motif opengl ldap
cdr aavm acl acpi acpi4linux altcolors altivec amd apache2 ardour-ksi canna
chasen cjk clamav curl dedicated dga dnd dvd emacs ethereal faad fbcon fbdev
flash foreign-package foreign-sysvinit freewnn ggi gphoto2 gtk2 gtkhtml hbci icc
icc-pgo imap jikes junit kakasi kerberos lcms leim libgda maildir mbox mcal mng
mpi mule mupad-noscilab music nhc98 oav objc ofx openal pcmcia pic plotutils pnp
qhull ruby samba sasl scanner slp snmp socks5 sox sse tiff trusted type1 wavelan
wmf wxwindows Xaw3d xface xinerama xosd xvid -3dnow -apm -berkdb -arts&quot;
COMPILER=&quot;gcc3&quot;
CHOST=&quot;i686-pc-linux-gnu&quot;
CFLAGS=&quot;-march=pentium4 -O3 -pipe -mfpmath=sse,387 -mmmx -msse -msse2
-fforce-addr -fomit-frame-pointer -funroll-loops -frerun-loop-opt
-frerun-cse-after-loop -falign-functions=4 -fprefetch-loop-arrays
-fexpensive-optimizations&quot;
CXXFLAGS=&quot;-march=pentium4 -O3 -pipe -mfpmath=sse,387 -mmmx -msse -msse2
-fforce-addr -fomit-frame-pointer -funroll-loops -frerun-loop-opt
-frerun-cse-after-loop -falign-functions=4 -fprefetch-loop-arrays
-fexpensive-optimizations&quot;
ACCEPT_KEYWORDS=&quot;x86&quot;
MAKEOPTS=&quot;-j2&quot;
AUTOCLEAN=&quot;yes&quot;
SYNC=&quot;rsync://rsync.gentoo.org/gentoo-portage&quot;
FEATURES=&quot;sandbox ccache&quot;

then I get ...
gcc -DHAVE_CONFIG_H -Iinclude -Iinclude/allegro -I./include -I./include/allegro
-I.  -I/usr/X11R6/include  -DALLEGRO_LIB_BUILD -mcpu=pentium -O2 -funroll-loops
-ffast-math -fomit-frame-pointer -Wall -Wno-unused -march=pentium4 -O3 -pipe
-mfpmath=sse,387 -mmmx -msse -msse2 -fforce-addr -fomit-frame-pointer
-funroll-loops -frerun-loop-opt -frerun-cse-after-loop -falign-functions=4
-fprefetch-loop-arrays -fexpensive-optimizations -fPIC -DALLEGRO_SHARED
-march=pentium4 -O3 -pipe -mfpmath=sse,387 -mmmx -msse -msse2 -fforce-addr
-fomit-frame-pointer -funroll-loops -frerun-loop-opt -frerun-cse-after-loop
-falign-functions=4 -fprefetch-loop-arrays -fexpensive-optimizations -c
./src/allegro.c -o obj/unix/shared/alleg/allegro.o
src/allegro.c: In function `install_allegro&apos;:
src/allegro.c:366: internal error: Gleitkomma-Ausnahme
Please submit a full bug report,
with preprocessed source if appropriate.
See &lt;URL:http://bugs.gentoo.org/&gt; for instructions.
make: *** [obj/unix/shared/alleg/allegro.o] Fehler 1
 
!!! ERROR: media-libs/allegro-4.0.3 failed.
!!! Function src_compile, Line 52, Exitcode 2
!!! (no error message)



Reproducible: Always
Steps to Reproduce:
1.(set CFLAGS and useflags as I did)
2.emerge game-launcher
3.

Actual Results:  
See above

Expected Results:  
compile</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>stefan@sblbs.de</who>
            <bug_when>2003-08-06 03:17:49 0000</bug_when>
            <thetext>conservative CFLAGS, namely just &quot;-mcpu pentium3&quot; fix the problem.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mholzer@gentoo.org</who>
            <bug_when>2003-08-06 12:12:43 0000</bug_when>
            <thetext>from make.conf

# CRITICAL WARNINGS: ****************************************************** #
# ATHLON-4 will generate invalid SSE  instructions; use &apos;athlon&apos;   instead. #
# PENTIUM4 will generate invalid SSE2 instructions; use &apos;pentium3&apos; instead. #
# ************************************************************************* #
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>brandy@gentoo.org</who>
            <bug_when>2003-08-18 01:11:27 0000</bug_when>
            <thetext>I was intrigued by this bug report and tried to compile allegro with the same 
optimizations as Stefan. With little surprise it failed. However removing 
-fprefetch-loop-arrays it compiled wonderfully. Maybe we could filter 
-fprefetch-loop-arrays. :) </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2003-08-18 18:02:07 0000</bug_when>
            <thetext>*** Bug 26844 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>exitware@gmail.com</who>
            <bug_when>2003-08-19 10:12:43 0000</bug_when>
            <thetext>I can confirm that simply removing -fprefetch-loop-arrays from the CFLAGS solves 
the problem. </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2003-08-20 19:39:07 0000</bug_when>
            <thetext>added to cvs, thanks guys :)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2003-08-21 17:24:50 0000</bug_when>
            <thetext>not fixed ... this has nothing to do with the prefetch flag :) 
 
btw, azarah is *the* man 
http://bugs.gentoo.org/show_bug.cgi?id=25461#c6 </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2003-08-21 17:42:14 0000</bug_when>
            <thetext>*now* it&apos;s fixed in cvs :) 
 
sed -i &apos;/TARGET_ARCH=/s:=.*:=:&apos; configure </thetext>
          </long_desc>
      
    </bug>

</bugzilla>