Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 73406 - jack-audio-connection-kit ebuild uses sse optimizations regardless of support
Summary: jack-audio-connection-kit ebuild uses sse optimizations regardless of support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High critical (vote)
Assignee: Jeremy Huddleston (RETIRED)
URL: http://forums.gentoo.org/viewtopic.ph...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-04 19:59 UTC by Jason Sommerville
Modified: 2004-12-05 23:29 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
no auto optimization (jack-audio-connection-kit-0.99.0-r1.ebuild,2.47 KB, text/plain)
2004-12-05 09:51 UTC, Dirk Silkenbäumer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Sommerville 2004-12-04 19:59:46 UTC
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't open hw:0 for 32bit samples trying 24bit instead
Couldn't open hw:0 for 24bit samples trying 16bit instead
Couldn't open hw:0 for 32bit samples trying 24bit instead
Couldn'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="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -mcpu=athlon -march=athlon -mno-sse -mno-sse2 -mfpmath=387 -mmmx
-m3dnow -pipe "
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/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"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -mcpu=athlon -march=athlon -mno-sse -mno-sse2 -mfpmath=387
-mmmx-m3dnow -pipe "
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="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"
Comment 1 Dirk Silkenbäumer 2004-12-05 09:48:42 UTC
Same problem here. 

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

Dirk
Comment 2 Dirk Silkenbäumer 2004-12-05 09:51:20 UTC
Created attachment 45330 [details]
no auto optimization
Comment 3 Jeremy Huddleston (RETIRED) gentoo-dev 2004-12-05 13:16:35 UTC
Uhm... your processor supports sse and mms.  I'm more concerned with your CFLAGS... Try this:
CFLAGS="-O2 -march=athlon -pipe"

Then slowly raise until it breaks.
Comment 4 Jonathan Rogers 2004-12-05 23:10:10 UTC
I'm pretty sure Dirk's Athlon doesn'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'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
Comment 5 Jeremy Huddleston (RETIRED) gentoo-dev 2004-12-05 23:29:11 UTC
this is fixed in -r1, thanks... I thought all athlon's supported sse... oh well =)