<?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>73406</bug_id>
          
          <creation_ts>2004-12-04 19:59 0000</creation_ts>
          <short_desc>jack-audio-connection-kit ebuild uses sse optimizations regardless of support</short_desc>
          <delta_ts>2004-12-05 23:29:11 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>Ebuilds</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          <bug_file_loc>http://forums.gentoo.org/viewtopic.php?t=253410&amp;highlight=jackd+illegal+instruction</bug_file_loc>
          
          
          <priority>P2</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>jdsommer@mtu.edu</reporter>
          <assigned_to>eradicator@gentoo.org</assigned_to>
          <cc>sound@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>jdsommer@mtu.edu</who>
            <bug_when>2004-12-04 19:59:46 0000</bug_when>
            <thetext>After emerging jack-audio-connection-kit-0.99.0 jackd fails with an illegal instruction:

I noticed that during the build, the -msse and -mfpmath-sse options ar included in much of the output, and I suspect that this is the source of the problem, though am not sure. Furthermore, --march=i686 is included, which it definitely should not be given that I am on an athlon.

For examble:
---
/bin/sh ../libtool --mode=link gcc -I.. -I../config -I.. -I.. -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -DREENTRANT -O3 -fomit-frame-pointer -ffast-math -funroll-loops -fmove-all-movables -march=i686 -mmmx -msse -mfpmath=sse  -I../config -I.. -I.. -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -DREENTRANT -O3 -fomit-frame-pointer -ffast-math -funroll-loops -fmove-all-movables -march=i686 -mmmx -msse -mfpmath=sse -march=athlon   -o jack_bufsize  bufsize.o ../libjack/libjack.la -lm -lpthread -ldl
---



Reproducible: Always
Steps to Reproduce:
1. emerge jack-audio-connection-kit 0.99.0 
2. run jackd with appropriate arguments

Actual Results:  
crescendo distfiles # jackd -R -d alsa -p 512
jackd 0.99.0
Copyright 2001-2003 Paul Davis and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details

loading driver ..
creating alsa driver ... hw:0|hw:0|512|2|48000|0|0|nomon|swmeter|-|32bit
control device hw:0
configuring for 48000Hz, period = 512 frames, buffer = 2 periods
Couldn&apos;t open hw:0 for 32bit samples trying 24bit instead
Couldn&apos;t open hw:0 for 24bit samples trying 16bit instead
Couldn&apos;t open hw:0 for 32bit samples trying 24bit instead
Couldn&apos;t open hw:0 for 24bit samples trying 16bit instead
Illegal instruction

Expected Results:  
jackd should not have died.

I am runing on an Athlon: the original variety. It does not support sse.  Output
of /proc/cpuinfo:

processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 6
model           : 2
model name      : AMD Athlon(tm) Processor
stepping        : 1
cpu MHz         : 700.297
cache size      : 512 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 mmx fxsr syscall mmxext 3dnowext 3dnow
bogomips        : 1376.25

Output of emerge info:

Portage 2.0.51-r3 (default-linux/x86/2004.3, gcc-3.3.4, glibc-2.3.4.20040808-r1,
2.6.7-gentoo-r7 i686)
=================================================================
System uname: 2.6.7-gentoo-r7 i686 AMD Athlon(tm) Processor
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.90.0.1.1-r3
Headers:  sys-kernel/linux-headers-2.4.21-r1
Libtools: sys-devel/libtool-1.5.2-r7
ACCEPT_KEYWORDS=&quot;x86&quot;
AUTOCLEAN=&quot;yes&quot;
CFLAGS=&quot;-O3 -mcpu=athlon -march=athlon -mno-sse -mno-sse2 -mfpmath=387 -mmmx
-m3dnow -pipe &quot;
CHOST=&quot;i686-pc-linux-gnu&quot;
COMPILER=&quot;&quot;
CONFIG_PROTECT=&quot;/etc /usr/X11R6/lib/X11/xkb /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/share/config /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/bind
/var/qmail/control&quot;
CONFIG_PROTECT_MASK=&quot;/etc/gconf /etc/terminfo /etc/env.d&quot;
CXXFLAGS=&quot;-O3 -mcpu=athlon -march=athlon -mno-sse -mno-sse2 -mfpmath=387
-mmmx-m3dnow -pipe &quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;autoaddcvs autoconfig ccache distlocks sandbox sfperms&quot;
GENTOO_MIRRORS=&quot;http://mirror.datapipe.net/gentoo&quot;
MAKEOPTS=&quot;-j2&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
PORTDIR_OVERLAY=&quot;&quot;
SYNC=&quot;rsync://rsync.gentoo.org/gentoo-portage&quot;
USE=&quot;X Xaw3d acpi activefilter alsa apm arts avi berkdb bitmap-fonts bonobo cdr
crypt cscope cups dga dvd encode esd evo f77 fam flac foomaticdb fortran gd gdbm
gif gphoto2 gpm gtk gtk2 imagemagick imap imlib jack java joystick jpeg junit
kde krb4 ladcca lcms libg++ libwww mad mcal mikmod motif mozilla mpeg mysql
ncurses nls oggvorbis opengl oss pam pda pdflib perl png python qt quicktime
readline samba sdl slang slp snmp spell ssl svga tcltk tcpd tetex tiff truetype
usb wmf wxwindows x86 xml xml2 xmms xv zlib&quot;</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dirk-s@muenster.de</who>
            <bug_when>2004-12-05 09:48:42 0000</bug_when>
            <thetext>Same problem here. 

May be we shouldn&apos;t use --enable-optimize and set sse and mmx manually:
#       myconf=&quot;${myconf} --enable-optimize --with-gnu-ld&quot;
        myconf=&quot;${myconf} `use_enable sse` `use_enable mmx` --with-gnu-ld&quot;

Dirk</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dirk-s@muenster.de</who>
            <bug_when>2004-12-05 09:51:20 0000</bug_when>
            <thetext>Created an attachment (id=45330)
no auto optimization
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>eradicator@gentoo.org</who>
            <bug_when>2004-12-05 13:16:35 0000</bug_when>
            <thetext>Uhm... your processor supports sse and mms.  I&apos;m more concerned with your CFLAGS... Try this:
CFLAGS=&quot;-O2 -march=athlon -pipe&quot;

Then slowly raise until it breaks.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jonner@teegra.net</who>
            <bug_when>2004-12-05 23:10:10 0000</bug_when>
            <thetext>I&apos;m pretty sure Dirk&apos;s Athlon doesn&apos;t support SSE, though it does do MMX. I have exactly the same problem he does on my Duron system. Jackd works when I use his modified ebuild. Here&apos;s my cpuinfo:

processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 6
model           : 3
model name      : AMD Duron(tm) Processor
stepping        : 1
cpu MHz         : 801.784
cache size      : 64 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr syscall mmxext 3dnowext 3dnow
bogomips        : 1585.15</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>eradicator@gentoo.org</who>
            <bug_when>2004-12-05 23:29:11 0000</bug_when>
            <thetext>this is fixed in -r1, thanks... I thought all athlon&apos;s supported sse... oh well =)</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>45330</attachid>
            <date>2004-12-05 09:51 0000</date>
            <desc>no auto optimization</desc>
            <filename>jack-audio-connection-kit-0.99.0-r1.ebuild</filename>
            <type>text/plain</type>
            <data encoding="base64">IyBDb3B5cmlnaHQgMTk5OS0yMDA0IEdlbnRvbyBGb3VuZGF0aW9uCiMgRGlzdHJpYnV0ZWQgdW5k
ZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSB2MgojICRIZWFk
ZXI6IC92YXIvY3Zzcm9vdC9nZW50b28teDg2L21lZGlhLXNvdW5kL2phY2stYXVkaW8tY29ubmVj
dGlvbi1raXQvamFjay1hdWRpby1jb25uZWN0aW9uLWtpdC0wLjk5LjAuZWJ1aWxkLHYgMS4xMSAy
MDA0LzExLzEyIDA4OjQ0OjM0IGVyYWRpY2F0b3IgRXhwICQKCklVU0U9ImFsdGl2ZWMgYWxzYSBj
YXBzIGRvYyBkZWJ1ZyBqYWNrLXRtcGZzIG9zcyBwb3J0YXVkaW8gc3NlIG1teCIKCmluaGVyaXQg
ZmxhZy1vLW1hdGljIGV1dGlscwoKREVTQ1JJUFRJT049IkEgbG93LWxhdGVuY3kgYXVkaW8gc2Vy
dmVyIgpIT01FUEFHRT0iaHR0cDovL2phY2tpdC5zb3VyY2Vmb3JnZS5uZXQvIgpTUkNfVVJJPSJt
aXJyb3I6Ly9zb3VyY2Vmb3JnZS9qYWNraXQvJHtQfS50YXIuZ3oiCgpMSUNFTlNFPSJHUEwtMiBM
R1BMLTIuMSIKU0xPVD0iMCIKS0VZV09SRFM9In5hbHBoYS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