[MPlayer-dev-eng] -mieee CFLAG missing on alpha (patch included)

Thomas Cort linuxgeek at gmail.com
Tue Nov 29 14:29:39 CET 2005


mplayer-1.0_pre7 plays wav and ogg files without a problem, but
crashes when attempting to play mp3 files. I re-compiled mplayer with
debug enabled and ran it in gdb. Output below:



tcort at pan ~ $ gdb mplayer
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "alpha-unknown-linux-gnu"...Using host libthread_db
library "/lib/libthread_db.so.1".

(gdb) run /exports/music/Raffi_-_Bananaphone.mp3
Starting program: /usr/bin/mplayer /exports/music/Raffi_-_Bananaphone.mp3
[Thread debugging using libthread_db enabled]
[New Thread 2199023420624 (LWP 27771)]
Using GNU internationalization
Original domain: messages
Original dirname: /usr/share/locale
Current domain: mplayer
Current dirname: /usr/share/locale

MPlayer 1.0pre7try2-3.3.5 (C) 2000-2005 MPlayer Team
CPU: Digital Alpha


85 audio & 196 video codecs
Playing /exports/music/Raffi_-_Bananaphone.mp3.
Cache fill:  0.00% (0 bytes)    Audio file detected.
Clip info:
 Title: Bananaphone
 Artist: Raffi
 Album: Bananaphone
 Year:
 Comment:
 Track: 1
 Genre: Unknown
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3

Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread 2199023420624 (LWP 27771)]
0x0000000120155d7c in demux_audio_fill_buffer (ds=0x120726b30) at demuxer.h:218
218     demuxer.h: No such file or directory.
        in demuxer.h
(gdb) quit
The program is running.  Exit anyway? (y or n) y



As you can see, there was a SIGFPE (floating-point exception). This is because
mplayer doesn't set CFLAGS="-mieee $CFLAGS". However, the alpha
architecture needs -mieee in CFLAGS to do some (maybe all?)
floating-point operations.

Quote from the -mieee section of the gcc-3.3.5 man page:
"The Alpha architecture implements floating-point hardware optimized
for maximum performance.  It is mostly compliant with the IEEE
floating point standard.  However, for full compliance, software
assistance is required.  This option generates code fully IEEE com-
pliant code except that the inexact-flag is not maintained (see
below).  If this option is turned on, the preprocessor macro
"_IEEE_FP" is defined during compilation.  The resulting code is
less efficient but is able to correctly support denormalized num-
bers and exceptional IEEE values such as not-a-number and
plus/minus infinity.  Other Alpha compilers call this option
-ieee_with_no_inexact."

I patched the configure script to add "-mieee" to CFLAGS if arch is
alpha. mp3 playback works fine now. The patch is attached.

There is a Gentoo bug about this here:
http://bugs.gentoo.org/show_bug.cgi?id=113857

-Thomas Cort
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayer-1.0_pre7-alpha.patch
Type: text/x-patch
Size: 342 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20051129/391eb004/attachment.bin>


More information about the MPlayer-dev-eng mailing list