media-video/mplayer-1.0_pre7-r1 plays wav and ogg files without a problem, but crashes when attempting to play mp3 files. I re-compiled mplayer with USE="debug" and ran it in gdb. Output below: tcort@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 the media-video/mplayer-1.0_pre7-r1 ebuild unsets CFLAGS and CXXFLAGS (unless USE="custom-cflags"). However, the alpha architecture needs CFLAGS="-mieee" 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 ebuild to append-flags "-mieee" if use alpha, and mp3 playback works fine. The patch will be attached to this bug. Reproducible: Always Steps to Reproduce: 1. mplayer anymp3.mp3 Actual Results: See gdb output above. Expected Results: The music should have played. Portage 2.0.51.22-r3 (default-linux/alpha/2005.0, gcc-3.3.5, glibc-2.3.4.20041102-r1, 2.6.15-rc2-git4 alpha) ================================================================= System uname: 2.6.15-rc2-git4 alpha EV56 Gentoo Base System version 1.6.13 dev-lang/python: 2.3.5-r2, 2.4.2 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.20 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="alpha" AUTOCLEAN="yes" CBUILD="alpha-unknown-linux-gnu" CFLAGS="-mieee -O2 -mcpu=ev56 -pipe" CHOST="alpha-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-mieee -O2 -mcpu=ev56 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="ftp://cs.ubishops.ca/pub/gentoo http://mirror.arcticnetwork.ca/pub/gentoo/ http://adelie.polymtl.ca/ http://gentoo.cites.uiuc.edu/pub/gentoo/ ftp://gentoo.arcticnetwork.ca/pub/gentoo/" LDFLAGS="-Wl,-O1" LINGUAS="en" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.ca.gentoo.org/gentoo-portage" USE="alpha X aac aim alsa arts audiofile berkdb bitmap-fonts bzip2 crypt cups curl eds encode esd exif expat fam flac font-server foomaticdb gd gdbm gif glut gmp gnome gpm gstreamer gtk gtk2 icq imlib jabber jpeg kde lcms libg++ libwww lua mad mhash mikmod mng motif mozilla mp3 mpeg msn nas ncurses nls nocd nptl nptlonly offensive ogg oggvorbis openal opengl oscar oss pam pcre pdflib perl png python qt quicktime readline sdl shorten sndfile spell ssl tcpd tiff truetype truetype-fonts type1-fonts udev vorbis xml2 xmms xv xvid yahoo zlib linguas_en userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL
Created attachment 73770 [details, diff] Adds -mieee to CFLAGS on alpha
I'd put it directly in the standard mplayer cflags since I expect this issue not gentoo specific, isn't it?
Created attachment 73791 [details, diff] patches mplayer's configure script to add -mieee to alpha CFLAGS
Created attachment 73792 [details, diff] Patches mplayer's ebuild to apply alpha patch
Submitted bug upstream http://marc.theaimsgroup.com/?l=mplayer-dev-eng&m=113327102802667&w=1 Guillaume Poirier replied and will commit to CVS during the week.
A status update... The mplayer devs believe that this segfault is fixed in CVS. However none of them can cite the specific problem that caused the segfault, why adding -mieee fixed the problem, when it was patched, or where the patch is. Unfortunately, I cannot test the CVS version because the CVS version requires a new version of ffmpeg which doesn't compile on my alpha system. Even when passing mplayer's configure script --disable's for all options it still requires ffmpeg. It should be noted that -mieee does cause a performance hit ( around 5% according to http://skarpsey.dyndns.org/alpha-lfs/#mieee ). However, it is either take the 5% performance hit, or live with not being able to listen to mp3s and perhaps other formats that I didn't test.
ok, then we must fist fix ffmpeg and then move to a newer mplayer (I told that weeks ago and for a reason or another I couldn't manage to snapshot it properly)
I emerged media-video/ffmpeg-0.4.9_p20051216 today and built manually the CVS version of mplayer. mp3 playback with today's CVS co of mplayer's code works without crashing on my alpha. I compiled it without the -mieee cflag, so the problem in this bug is indeed fixed in mplayer's CVS.
hopefully I'll either provide an updated snapshot or we'll get a new upstream release soon
MP3 playback works fine with the new snapshot media-video/mplayer-1.0.20060302.