Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 86318 - mplayer mmx and mmxext USE flag set, but doesn't effect
Summary: mplayer mmx and mmxext USE flag set, but doesn't effect
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
: 91352 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-03-22 15:30 UTC by whitehawk
Modified: 2005-07-25 11:10 UTC (History)
6 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description whitehawk 2005-03-22 15:30:26 UTC
In the USE flags mmx and mmxext is set, but after compilation mplayer says that mmx and mmx2 is disabled.


as mplayer was compiled:

[ebuild   R   ] media-video/mplayer-1.0_pre6-r2  -3dfx -3dnow -3dnowext +X +aalib +alsa (-altivec) -arts +avi +bidi -cdparanoia -debug -dga -directfb +divx4linux -doc -dts -dv -dvb +dvd +dvdread -edl +encode -esd +fbcon -ggi -gif +gtk -i8x0 +ipv6 -jack -joystick +jpeg +libcaca -lirc -live -lzo +mad -matroska -matrox +mmx +mmxext +mpeg -mythtv +nas +nls +nvidia +oggvorbis +opengl -oss +png -real +rtc -samba -sdl +sse -sse2 +svga -tga +theora +truetype -v4l -v4l2 -xanim -xinerama +xmms +xv +xvid +xvmc

what mplayer says:
MMX supported but disabled
MMX2 supported but disabled
CPUflags:  MMX: 0 MMX2: 0 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
x86 CPU - with the following extensions: SSE

(it might look a bit different, cause I had the last line in Hungarian, and I did not change the locale for this :D)

when the ebuild runs configure it says:

Detected operating system: Linux
Detected host architecture: i386
Checking for cc version ... 3.4, ok
Checking for host cc ... cc
Checking for CPU vendor ... GenuineIntel (6:8:10)
Checking for CPU type ...  Pentium III (Coppermine)
Checking for GCC & CPU optimization abilities ... pentium3
Checking for kernel support of mmx ... yes
Checking for kernel support of mmx2 ... yes
Checking for kernel support of sse ... yes
Checking for mtrr support ... yes
Checking for assembler support of -pipe option ... yes

  Byte order: little-endian
  Optimizing for: pentium3 mmx mmx2 sse mtrr

when mmxext is set I get this warning before configure also:
 * You have mmxext support enabled but your processor doesn't
 * Seem to support it!  You might be cross compiling or do not have /proc filesystem
 * enabled.  If either is the case, set CROSSCOMPILE to 1 to disable this warning.

But p3 supports it, so I don't really understand it. And configure runs like quoted above, and states that it is optimizing for mmx, mmx2 and sse

Reproducible: Always
Steps to Reproduce:





Portage 2.0.51.19 (default-linux/x86/2004.3, gcc-3.4.3-20050110,
glibc-2.3.4.20050125-r1, 2.6.9-ck3 i686)
=================================================================
System uname: 2.6.9-ck3 i686 Pentium III (Coppermine)
Gentoo Base System version 1.6.10
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, Feb 18 2005, 00:17:45)]
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.9.5, 1.5, 1.6.3, 1.8.5-r3, 1.7.9-r1, 1.4_p6
sys-devel/binutils:  2.15.92.0.2-r7
sys-devel/libtool:   1.5.14
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer -fforce-addr
-falign-functions=4 -fprefetch-loop-arrays"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env
/usr/kde/3.3/share/config /usr/kde/3.3/shutdown /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/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer -fforce-addr
-falign-functions=4 -fprefetch-loop-arrays"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://gentoo.inode.at/ http://trumpetti.atm.tut.fi/gentoo/
http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://gentoo.math.bme.hu
ftp://ftp2.gentoo.hu/gentoo/"
LANG="hu_HU.UTF-8"
LC_ALL="hu_HU.UTF-8"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 X aalib acl acpi adns alsa apm atlas audiofile avi bash-completion bidi
bindist bitmap-fonts bonobo caps cdr crypt cscope cups curl dedicated divx4linux
dvd emboss encode ethereal evo fam fbcon fdftk fftw firebird flac flash
font-server foomaticdb fortran freetds gb gd gdbm gif ginac gphoto2 gpm
gstreamer gtk gtk2 gtkhtml ifc imagemagick imap imlib ipv6 java jikes jpeg lcms
ldap lesstif libg++ libgda libwww mad maildir mcal memlimit mikmod mmx motif
mozilla mp3 mpeg mpi mule nas ncurses nhc98 nls nocardbus nocd nptl odbc
offensive oggvorbis opengl pam pdflib perl plotutils png ppds prelude python
quicktime readline ruby sasl slang slp snmp speex spell sqlite sse ssl svg svga
tcltk tcpd theora threads tiff truetype truetype-fonts type1-fonts unicode usb
videos wmf xface xml xml2 xmms xv xvid zlib linguas_hu linguas_en linguas_it"
Unset:  ASFLAGS, CBUILD, CTARGET, LDFLAGS
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-03-22 16:09:14 UTC
Please post the output of

grep flags /proc/cpuinfo

Also note that "supported bug disabled" probably is because sse has more priority than the two before.
Comment 2 Philip Kovacs 2005-03-22 16:17:36 UTC
same situation (no mmx enabled) on my p4:  

$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 2
model name      : Intel(R) Pentium(R) 4 CPU 2.40GHz
stepping        : 7
cpu MHz         : 2430.465
cache size      : 512 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid xtpr
bogomips        : 4800.51

$ emerge info

Portage 2.0.51.19 (default-linux/x86/2004.3, gcc-3.3.5, glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r4 i686)
=================================================================
System uname: 2.6.11-gentoo-r4 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Mar  2 2005, 22:57:00)]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium4 -O2 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium4 -O2 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo ftp://gentoo.mirrors.pair.com http://gentoo.ccccom.com"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="x86 X alsa avi cdr cups divx4linux dvd dvdr encode fbcon gif gpm gtk gtk2 jpeg mad mikmod mmx mpeg ncurses nls nptl oggvorbis opengl oss png python readline sdl slang spell sse sse2 ssl tcpd truetype xml2 xprint xv xvid zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS

Comment 3 Philip Kovacs 2005-03-22 16:55:11 UTC
re: Diego's comment: "Also note that "supported but disabled" probably is because sse has more priority than the two before."

No! The ebuild logic selected to use the configure flags: --disable-mmx and --disable-mmx2.  That is the reason mplayer states that the feature is disabled at startup messages.



Comment 4 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-03-22 17:08:12 UTC
Ok i'm not able to try this out as seems like on amd64 mplayer doesn't care at all of simd stuff (for the ones which doesn't know what simd is, http://en.wikipedia.org/wiki/SIMD ).

Anyway, as comment #2 states, seems like portage's cpuflag detection is right, as /proc/cpuinfo flags are the flags reported by the CPU, if you haven't some flags it's probable that the cpu isn't aware of those instruction sets (not sure about it, but maybe you need to set the correct processor type on kernel configuration).

About the found but disabled, I'm still thinking that earliest simd instruction sets shades older (so sse will be preferred to mmx and sse2 will be preferred to sse for example).
Comment 5 Philip Kovacs 2005-03-22 17:38:00 UTC
I want to be clear about this... I have configured mplayer and compiled it a hundred times outside of portage.....  On my box, the mplayer configure will not explicitly disable mmx/mmx2.  When I run mplayer, those mmx/mmx2 flags are on (1) and there are no problems whatsoever, and no messages from mplayer about "supported but disabled."

Clearly, there's some logic in the portage ebuild that is explicitly econf'ing --disable-mmx and --disable-mmx2.   
Comment 6 Simone Scanzoni 2005-03-22 19:06:13 UTC
I noticed the same problem (mplayer-1.0_pre6-r2).

I suppose here's the incriminated code (in the ebuild):
[417]
    if has_pic && use x86 || use !mmx; then
        myconf="${myconf} --disable-mmx"
    else
        myconf="${myconf} --enable-mmx"
    fi

    if has_pic && use x86 || use !mmxext; then
        myconf="${myconf} --disable-mmx2"
    else
        myconf="${myconf} --enable-mmx2"
    fi
[429]

I tried to edit it and enable both mmx and mmx2 anyways, it worked fine, compilation, prelinking and execution.

After a quick search on Google, mmx and pic seemed to be mutually exclusive for non-x86 in the postprocessing library from ffmpeg, I wonder if there's some relation with this...


I have a Pentium3, 2.4.28-gentoo-r8 :
$ cat /proc/cpuinfo |grep flags
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse
Since MPlayer detects mmx2, I suppose the check done by Portage for mmxext (if it's the same as mmx2) isn't correct (perhaps only for 2.4.x kernels ?).
Comment 7 ArYiX 2005-03-23 01:59:57 UTC
1st try:

/etc/make.conf

USE="mmx mmxext 3dnow 3dnowext..."

2nd try:

#USE="mmx mmxext 3dnow 3dnowext.." emerge mplayer

3rd try:

/etc/portage/package.use

media-video/mplayer network real live mmx mmx2 3dnow 3dnowex mtrr


always view:

bash-2.05b# emerge -pv mplayer

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] media-video/mplayer-1.0_pre6-r2  -3dfx +3dnow +3dnowext +X +aalib +alsa (-altivec) -arts +avi -bidi* -cdparanoia* -debug -dga -directfb -divx4linux -doc* -dts* -dv -dvb -dvd -dvdread -edl* +encode +esd -fbcon -ggi +gif +gtk -i8x0 -ipv6 +jack -joystick +jpeg -libcaca -lirc +live -lzo* +mad -matroska* -matrox +mmx +mmxext +mpeg -mythtv -nas +nls -nvidia* +oggvorbis +opengl +oss +png +real -rtc* -samba +sdl -sse -sse2 +svga -tga +theora +truetype -v4l -v4l2 -xanim +xinerama +xmms +xv +xvid -xvmc* 0 kB 


but this not cause effects, finally...

manually configure says:

Compile with extension: mmx mmx2 3dnow 3dnowext mtrr
..or something like this..

after emerge finalize

mplayer says:

bash-2.05b# mplayer           
MPlayer 1.0pre6-3.3.5 (C) 2000-2004 MPlayer Team
CPU: Advanced Micro Devices Athlon K7 (Family: 6, Stepping: 2)
Detected cache-line size is 64 bytes
MMX supported but disabled
MMX2 supported but disabled
3DNow supported but disabled
3DNowExt supported but disabled
CPUflags:  MMX: 0 MMX2: 0 3DNow: 0 3DNow2: 0 SSE: 0 SSE2: 0

why?


--ArYiX
Comment 8 ArYiX 2005-03-23 03:07:13 UTC
I downgraded to mplayer-1.0-pre6-r1 in flavor mplayer-1.0-pre6-r2

mmx, mmxext, 3dnow, 3dnowext, apears good again!!!

the problem is an ebuild for mplayer-1.0-pre6-r2?

--ArYiX

Comment 9 whitehawk 2005-03-23 08:53:18 UTC
Diego: if you look at the ebuild, then you can see, that for amd64 the used simd is not changeable, it is fixed there, in the ebuild.

My CPUs:

falcone@nido ~ $ cat /proc/cpuinfo 
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 8
model name	: Pentium III (Coppermine)
stepping	: 10
cpu MHz		: 865.330
cache size	: 256 KB
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 2
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov                                                                                         pat pse36 mmx fxsr sse
bogomips	: 1699.84

processor	: 1
vendor_id	: GenuineIntel
cpu family	: 6
model		: 8
model name	: Pentium III (Coppermine)
stepping	: 10
cpu MHz		: 865.330
cache size	: 256 KB
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 2
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov                                                                                         pat pse36 mmx fxsr sse
bogomips	: 1728.51
Comment 10 Tibor Sipos 2005-04-13 03:44:51 UTC
Hi,

the same for Athlon. If I disabled 3dnowex flag, the mplayer config script will find all extensions and say "yes", but the compiled binary shows them disabled, and video play will be slow. If I enable 3dnowex flag, it will be ok, but the ebuild says at the beginning that it is not supported on my CPU. /proc/cpuinfo shows that my Athlon CPU support mmx, mmxext, 3dnow AND 3dnowext.

Sipi
Comment 11 Philip Kovacs 2005-04-13 08:30:32 UTC
actually, this mmx/mmxext bug should now be closed.  The mmx and mmxext USE flags will activate both mmx and mmx2 in mplayer now (latest -r2 ebuild).   The 3dnow flags I cannot comment on and perhaps require a new bug report or belong in another existing bug report somewhere.  Again, this bug, as originally documented, appears to have been fixed from my perpective. 
Comment 12 Luca Barbato gentoo-dev 2005-04-13 10:44:21 UTC
the warning will be removed in the near future and any bug related to misuse of cpu optimization will be marked as invalid. I'm not sure if that is the best procedure but I think that this could be fine for most of you.

tell me if I'm wrong and I'll keep the warning and I'll try to fix it
Comment 13 Philip Kovacs 2005-04-13 11:16:53 UTC
Luca, which warning are you referring to: the flag-o-matic warning about use flags not matching /proc/cpuinfo ?  That's a different issue really.... This was a legitimate bug report about mmx/mmx2 functionality not being activated in mplayer,
despite seemingly valid use flags (mmx/mmxext).  As I said, above, that specific problem appears to have been fixed.  Your comment about the warning seems to be unrelated.
Comment 14 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-05-03 14:53:51 UTC
*** Bug 91352 has been marked as a duplicate of this bug. ***
Comment 15 Luca Barbato gentoo-dev 2005-05-09 08:46:46 UTC
is the issue still valid?
Comment 16 Philip Kovacs 2005-05-09 09:03:47 UTC
it's closed to my satisfaction.  this bug was also marked as a duplicate and that duplicate is resolved.      
Comment 17 Philip Kovacs 2005-05-09 09:06:34 UTC
oh i see: bug 86318 and bug 91352 are marked as duplicates of each other...  
Comment 18 Luca Barbato gentoo-dev 2005-05-09 12:03:45 UTC
Fixed then
Comment 19 Georgi Georgiev 2005-07-25 00:43:38 UTC
What exactly happened here? It says the issue is fixed, but I still get the:

 * You have mmxext support enabled but your processor doesn't
 * Seem to support it!  You might be cross compiling or do not have /proc filesystem
 * enabled.  If either is the case, set CROSSCOMPILE to 1 to disable this warning.

Well, if I emerge with USE=-mmxext then mplayer complains that the cpu supports
it but it's not compiled in.
Comment 20 Philip Kovacs 2005-07-25 11:10:40 UTC
heavens please don't rehash this again.  this is not a problem.   your
/proc/cpuflags are probably mmx, sse and sse2, right?   the ebuild does not
"see" an mmxext flag in your cpuflags, but the sse support implies it -- so
ignore this warning.  use the use flags mmx, mmxext, sse and sse2 and be done
with it.   forget the warning at build time.