Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 212318 - media-video/mplayer-1.0_rc2_p25993-r1 illegal instruction
Summary: media-video/mplayer-1.0_rc2_p25993-r1 illegal instruction
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-04 21:48 UTC by Dan Treble
Modified: 2009-08-03 20:06 UTC (History)
2 users (show)

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


Attachments
mplayer -v (mplayer-verbose.txt,5.25 KB, text/plain)
2008-05-17 21:30 UTC, Tobias Jakobi
Details
emerge --info (emerge-info.txt,3.23 KB, text/plain)
2008-05-17 21:30 UTC, Tobias Jakobi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Treble 2008-03-04 21:48:26 UTC
I am unable to compile this version of mplayer without an sse3 instruction.

MPlayer dev-SVN-rUNKNOWN-4.2.3 (C) 2000-2008 MPlayer Team
CPU: VIA Nehemiah (Family: 6, Model: 9, Stepping: 3)
MMX supported but disabled
MMX2 supported but disabled
SSE supported but disabled
CPUflags:  MMX: 0 MMX2: 0 3DNow: 0 3DNow2: 0 SSE: 0 SSE2: 0
Compiled for x86 CPU with extensions:
[New Thread 0xb6e186c0 (LWP 18396)]

Program received signal SIGILL, Illegal instruction.
[Switching to Thread 0xb6e186c0 (LWP 18396)]
_______________________________________________________________________________
     eax:00000001 ebx:087C8C68  ecx:B7246D00  edx:BFC97326     eflags:00010202
     esi:00000031 edi:087C8C30  esp:BFC97230  ebp:BFC97258     eip:0806A946
     cs:0073  ds:007B  es:007B  fs:0000  gs:0033  ss:007B    o d I t s z a p c 
[007B:BFC97230]---------------------------------------------------------[stack]
BFC97260 : E4 FF 4B 08  03 79 C9 BF - 26 73 C9 BF  68 8C 7C 08 ..K..y..&s..h.|.
BFC97250 : E0 A8 06 08  03 79 C9 BF - B8 72 C9 BF  D2 93 06 08 .....y...r......
BFC97240 : F3 A1 4B 08  03 79 C9 BF - 89 8C F4 B7  F5 91 7C 08 ..K..y........|.
BFC97230 : 26 73 C9 BF  49 0D 4F 08 - 58 72 C9 BF  BF 8C 06 08 &s..I.O.Xr......
[007B:087C8C30]---------------------------------------------------------[ data]
087C8C30 : F0 8B 7C 08  F3 A1 4B 08 - E4 FF 4B 08  60 8C 7C 08 ..|...K...K.`.|.
087C8C40 : 00 00 00 00  00 00 00 00 - 00 00 00 00  11 00 00 00 ................
[0073:0806A946]---------------------------------------------------------[ code]
0x806a946 <parse_flag+102>:	fisttpl (%ebx)
0x806a948 <parse_flag+104>:	jmp    0x806a906 <parse_flag+38>
0x806a94a <parse_flag+106>:	mov    0x10(%ebp),%edx
0x806a94d <parse_flag+109>:	movl   $0x8545f95,0x4(%esp)
0x806a955 <parse_flag+117>:	mov    %edx,(%esp)
0x806a958 <parse_flag+120>:	call   0x8054550 <strcasecmp@plt>
------------------------------------------------------------------------------
0x0806a946 in parse_flag (opt=0x84bffe4, name=0xbfc97903 "fontconfig", param=0xbfc97326 "1", dst=0x87c8c68, src=0x0) at m_option.c:94
94	m_option.c: No such file or directory.
	in m_option.c
gdb> bt
#0  0x0806a946 in parse_flag (opt=0x84bffe4, name=0xbfc97903 "fontconfig", param=0xbfc97326 "1", dst=0x87c8c68, src=0x0) at m_option.c:94
#1  0x080693d2 in m_config_parse_option (config=0x87c1080, arg=0xbfc97903 "fontconfig", param=0xbfc97326 "1", set=0x1) at m_option.h:459
#2  0x0806f16d in m_config_parse_config_file (config=0x87c1080, conffile=0x84b92fb "/etc/mplayer/mplayer.conf") at parser-cfg.c:222
#3  0x080581dd in main (argc=0x1, argv=0xbfc99f64) at mplayer.c:831


http://forums.gentoo.org/viewtopic-p-4922063.html#4922063



Reproducible: Always

Steps to Reproduce:
1.Emerge the ebuild USE=-mmx -sse -mmxext
2.Run the executable on a non sse3 processor
3.

Actual Results:  
MPlayer dev-SVN-rUNKNOWN-4.2.3 (C) 2000-2008 MPlayer Team
CPU: VIA Nehemiah (Family: 6, Model: 9, Stepping: 3)
MMX supported but disabled
MMX2 supported but disabled
SSE supported but disabled
CPUflags:  MMX: 0 MMX2: 0 3DNow: 0 3DNow2: 0 SSE: 0 SSE2: 0
Compiled for x86 CPU with extensions:
Illegal instruction

Expected Results:  
Not executed the illegal instruction!
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2008-03-04 21:52:49 UTC
Reopen with emerge --info and emerge -pv mplayer output; thanks.
Comment 2 Dan Treble 2008-03-04 22:11:46 UTC
Portage 2.1.4.4 (default-linux/x86/2006.1/desktop, gcc-4.2.3, glibc-2.7-r1, 2.6.24-gentoo i686)
=================================================================
System uname: 2.6.24-gentoo i686 VIA Nehemiah
Timestamp of tree: Mon, 25 Feb 2008 00:16:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.4
dev-lang/python:     2.5.1-r5
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.24
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=i686 -Os -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=i686 -Os -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distcc distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS=" ftp://ftp.iinet.net.au/pub/Gentoo/ ftp://mirror.pacific.net.au/linux/Gentoo  ftp://mirror.isp.net.au/pub/gentoo/  http://mirror.isp.net.au/ftp/pub/gentoo/"
LDFLAGS="-Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.au.gentoo.org/gentoo-portage"
USE="X a52 alsa asf au berkdb bitmap-fonts bzip2 cairo cdparanoia cdr cle266 cli cracklib crypt cups dbus dri dvb dvd dvdr dvdread eds emboss encode esd fam firefox fortran gdbm gif gnome gpm gstreamer gtk gtk2 hal howl iconv ieee1394 ipv6 isdnlog jpeg ldap lzw mad midi mikmod mmx mmxext mozilla mp3 mpeg mudflap mysql ncurses nls nptl nptlonly ogg oggvorbis opengl openmp oss pam pcre pdf perl png ppds pppd python qt qt3 qt4 quicktime readline reflection samba sdl session spell spl sse ssl svg tcpd tiff truetype truetype-fonts type1-fonts unichrome unicode usb v4l vcd vorbis wifi win32codecs x86 xine xml xorg xv xvid xvmc" ALSA_CARDS="via82xx" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="via"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


[ebuild   R   ] media-video/mplayer-1.0_rc2_p25993-r1  USE="X a52 alsa cdparanoia debug dvb dvd encode esd gif gtk iconv ipv6 jpeg mad mp3 opengl oss png quicktime samba sdl truetype unicode v4l vorbis win32codecs xv xvid xvmc -3dnow -3dnowext -aac -aalib (-altivec) -amrnb -amrwb -arts -bidi -bindist -bl -cddb -cdio -color-console -cpudetection -custom-cflags -dga -directfb -doc -dts -dv -enca -fbcon -ftp -ggi -jack -joystick -ladspa -libcaca -lirc -live -lzo -md5sum -mmx -mmxext -mp2 -musepack -nas -nemesi -openal -pnm -pulseaudio -radio -rar -real -rtc -speex -srt -sse -sse2 -ssse3 -svga -teletext -tga -theora -tivo -v4l2 -vidix -x264 -xanim -xinerama -xscreensaver -zoran" VIDEO_CARDS="-mga -s3virge -tdfx -vesa" 0 kB 
Comment 3 Alexis Ballier gentoo-dev 2008-03-04 22:23:19 UTC
hmm that reminds me some illegal instruction problems I've hit on fbsd.
Can you check if the custom-cflags useflag helps ? In my case it did so I did not try to debug more :/
Comment 4 Dan Treble 2008-03-06 11:52:51 UTC
custom-cflags works, thanks

more of a work around than a fix :-/
Comment 5 Alexis Ballier gentoo-dev 2008-03-06 12:24:59 UTC
(In reply to comment #4)
> custom-cflags works, thanks
> 
> more of a work around than a fix :-/
> 

hmm well yes its a workaround and not a fix; I'm afraid we'll still need you ;)

probably a bug in the cflags of mplayer or in the toolchain.
Comment 6 Steve Dibb (RETIRED) gentoo-dev 2008-03-07 23:35:11 UTC
CPU: VIA Nehemiah (Family: 6, Model: 9, Stepping: 3)
MMX supported but disabled
MMX2 supported but disabled
SSE supported but disabled

that's probably part of the problem right there.
Comment 7 Dan Treble 2008-03-09 06:17:58 UTC
My suspicion is that it is a combination of -march=native and distcc. My other box that does the majority of my compilation is sse3.
Comment 8 Steve Dibb (RETIRED) gentoo-dev 2008-04-17 17:22:56 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > custom-cflags works, thanks
> > 
> > more of a work around than a fix :-/
> > 
> 
> hmm well yes its a workaround and not a fix; I'm afraid we'll still need you ;)
> 
> probably a bug in the cflags of mplayer or in the toolchain.

The fix is in that you're forcibly disabling CPU instruction sets that MPlayer supports (mmx, etc).  It doesn't matter that this is a C7.  Even on a normal x86 box, it would most likely cause the same problem.

custom-cflag's isn't a hack, fixing your use flags is the real solution for your  architecture.

I'm inclined to close as INVALID.  Thoughts?

Comment 9 Dan Treble 2008-04-17 21:45:16 UTC
Steve, I'm going to have to take issue with some of your comments.

Firstly
  CPU: VIA Nehemiah (Family: 6, Model: 9, Stepping: 3)
  MMX supported but disabled
  MMX2 supported but disabled
  SSE supported but disabled

  that's probably part of the problem right there.

Now that is a strange thing to say, since my problem that mplayer executed an illegal sse3 instruction for my chipset. So I deliberately disabled all additional instruction sets to try and solve it. Unfortunately even that didn't solve it.

Then you add

 The fix is in that you're forcibly disabling CPU instruction sets that MPlayer
 supports (mmx, etc).  It doesn't matter that this is a C7.  Even on a normal
 x86 box, it would most likely cause the same problem.

Sorry that is not quite right either. I didn't have to forcibly disable any cpu instruction sets to fix it in the end. In fact you can see from my first post that forcibly disabling instruction sets didn't work. I believe the problem was that without custom cflags, mplayer compiled with -march=native, that became a problem when distcc compiled my objects on a sse3 native machine and sent them back.Using custom cflags gave me -march=c3-2, which worked fine even with distcc distributing my files to another box. Therefore I believe march=native and distcc is a bad combination.







Comment 10 Steve Dibb (RETIRED) gentoo-dev 2008-04-18 01:28:38 UTC
(In reply to comment #9)
> Steve, I'm going to have to take issue with some of your comments.

That's fine, after re-reading, I obviously got a little confused.

> Therefore I believe march=native
> and distcc is a bad combination.

I would agree with you there, this isn't the first time I've seen that issue come up.

Comment 11 Mart Raudsepp gentoo-dev 2008-05-06 11:59:08 UTC
Here's a "me too".
It compiles with -march=i468 -mtune=generic over distcc and ends up with at least 23 SSE instructions being in the /usr/bin/mplayer binary per analyse-x86.sh tool (counts the instructions for each instructionset from a disassembly).

USE=custom-cflags is a workaround, as it then uses the CFLAGS with which it doesn't appear to be a problem. Why does arch=i486 and tune=generic cause SSE instructions being used I don't know- Maybe some judgments are based on where it is compiled on, and as distcc is involved... However i have not tried to build without distcc as I don't have the patience to wait for hours to get this done on a 433MHz/256MB system.

The CFLAGS with which it works via USE=custom-cflags are

CFLAGS="-O2 -march=geode -pipe". Geode is my target architecture (first supported as a -march target since gcc4.3)
Comment 12 Mart Raudsepp gentoo-dev 2008-05-06 11:59:36 UTC
sorry, accidentally clicked on "reassign to default assignee" before hitting commit. Fixing back.
Comment 13 Tobias Jakobi 2008-05-17 21:29:51 UTC
I'm also hitting this bug:

version:
media-video/mplayer-1.0_rc2_p26753

Attaching mplayer -v output...

/proc/cpuinfo:
processor	: 0
vendor_id	: AuthenticAMD
cpu family	: 6
model		: 4
model name	: AMD Athlon(tm) processor
stepping	: 4
cpu MHz		: 550.060
cache size	: 256 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 sep mtrr pge mca cmov pat pse36 mmx fxsr syscall mmxext 3dnowext 3dnow
bogomips	: 1101.35
clflush size	: 32

emerge -1va:
[ebuild   R   ] media-video/mplayer-1.0_rc2_p26753  USE="3dnow 3dnowext a52 aac alsa cdio cpudetection dts dvd iconv ipv6 lirc mad mmx mmxext mp3 musepack pulseaudio rtc samba theora unicode vorbis -X -aalib (-altivec) -amrnb -amrwb -arts -bidi -bindist -bl -cddb -cdparanoia -custom-cflags -debug -dga -directfb -doc -dv -dvb -enca -encode -esd -fbcon -ftp -ggi -gif -gtk -jack -joystick -jpeg -ladspa -libcaca -live -lzo -md5sum -mp2 -nas -nemesi -openal -opengl -oss -png -pnm -quicktime -radio -rar -real -sdl -speex -srt -sse -sse2 -ssse3 -svga -teletext -tga -truetype -v4l -v4l2 -vidix -win32codecs -x264 -xanim -xinerama -xscreensaver -xv -xvid -xvmc -zoran" VIDEO_CARDS="-mga -s3virge -tdfx -vesa" 0 kB 

This worked since today when I updated to a newer mplayer version.
Comment 14 Tobias Jakobi 2008-05-17 21:30:26 UTC
Created attachment 153463 [details]
mplayer -v

trying to do some CDDA playback
Comment 15 Tobias Jakobi 2008-05-17 21:30:51 UTC
Created attachment 153465 [details]
emerge --info
Comment 16 Tobias Jakobi 2008-05-18 12:12:54 UTC
According to the reactions on the mplayer-users ml nobody here reported this upstream.

You can find my post to ml here:
http://lists.mplayerhq.hu/pipermail/mplayer-users/2008-May/073068.html
Comment 17 Tobias Jakobi 2008-05-18 14:33:37 UTC
Discussion on mplayer ml indicates that this is a gentoo bug and not a bug in the mplayer build system.

Without the portage environment and compiling from current SVN the binaries don't end up with SSE instructions compiled in.
Like I said on the ml I tried both a pass without my CFLAGS and a second pass with CFLAGS exported to the ebuild env. Both times it works and no SSE is compiled in.

Problem with the ebuild or the toolchain? I hope this gets fixed soon!

Greets,
Tobias
Comment 18 Alexis Ballier gentoo-dev 2008-05-18 14:48:10 UTC
   # Letting users turn off optimizations results in epic build fail
    # across the board.  MPlayer's build system by default will
    # detect them and use them just fine, so don't let them change
    # them unless they really know what they are doing anyway.
    if use custom-cflags; then
        if use mmx; then
            for x in 3dnow 3dnowext mmxext sse sse2 ssse3; do
                use ${x} || myconf="${myconf} --disable-${x}"
            done
        else
            myconf="${myconf} --disable-mmx --disable-mmxext --disable-sse \
            --disable-sse2 --disable-ssse3 --disable-3dnow \
            --disable-3dnowext"
        fi
    fi

seems to be the faulty lines.
Is it no longer true that mplayer detects the optimisations of the cpu at buildtime ?
Perhaps we could just drop the   'if use custom-cflags' condition.

beandog ? lu_zero ?
Comment 19 Tobias Jakobi 2008-05-18 17:29:50 UTC
(In reply to comment #18)
> Is it no longer true that mplayer detects the optimisations of the cpu at
> buildtime ?

It does! With current mplayer SVN and no CFLAGS exported I get this output when starting up mplayer -v:
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx

That's exactly the extra instruction sets my CPU supports, nothing more. MMX is there, 3DNow is there, and SSE is not there (not supported by the AMD tbird).

Exporting CFLAGS doesn't change this extension list. It must be something in the ebuild or some manipulation of the buildsystem.

Also see my post in the ml about the optimization parameter string passed to gcc, it's quite "weird" when custom-cflags is not on.

Without portage and CFLAGS exported the CFLAGS are just your CFLAGS, mplayer's build system doesn't seem to add anything.

Without portage and not CFLAGS export I get this optimization string:
-O4 -march=athlon -mtune=athlon -pipe -ffast-math -fomit-frame-pointer

Also sane!
Comment 20 Steve Dibb (RETIRED) gentoo-dev 2008-05-21 05:10:14 UTC
(In reply to comment #18)
>    # Letting users turn off optimizations results in epic build fail
>     # across the board.  MPlayer's build system by default will
>     # detect them and use them just fine, so don't let them change
>     # them unless they really know what they are doing anyway.
>     if use custom-cflags; then
>         if use mmx; then
>             for x in 3dnow 3dnowext mmxext sse sse2 ssse3; do
>                 use ${x} || myconf="${myconf} --disable-${x}"
>             done
>         else
>             myconf="${myconf} --disable-mmx --disable-mmxext --disable-sse \
>             --disable-sse2 --disable-ssse3 --disable-3dnow \
>             --disable-3dnowext"
>         fi
>     fi
> 
> seems to be the faulty lines.
> Is it no longer true that mplayer detects the optimisations of the cpu at
> buildtime ?

WORKSFORME

> Perhaps we could just drop the   'if use custom-cflags' condition.

Not a bad idea, and done in mplayer-1.0_rc2_p26753-r1.
Comment 21 Another Mortal 2008-05-25 21:51:58 UTC
(In reply to comment #20)
> (In reply to comment #18)
> >    # Letting users turn off optimizations results in epic build fail
> >     # across the board.  MPlayer's build system by default will
> >     # detect them and use them just fine, so don't let them change
> >     # them unless they really know what they are doing anyway.
> >     if use custom-cflags; then
> >         if use mmx; then
> >             for x in 3dnow 3dnowext mmxext sse sse2 ssse3; do
> >                 use ${x} || myconf="${myconf} --disable-${x}"
> >             done
> >         else
> >             myconf="${myconf} --disable-mmx --disable-mmxext --disable-sse \
> >             --disable-sse2 --disable-ssse3 --disable-3dnow \
> >             --disable-3dnowext"
> >         fi
> >     fi
> > 
> > seems to be the faulty lines.
> > Is it no longer true that mplayer detects the optimisations of the cpu at
> > buildtime ?
> 
> WORKSFORME
> 
> > Perhaps we could just drop the   'if use custom-cflags' condition.
> 
> Not a bad idea, and done in mplayer-1.0_rc2_p26753-r1.
> 

Actually, this change causes the mplayer build to break
on one of my systems (amd64 hardened) with the exact error
reported in http://bugs.gentoo.org/show_bug.cgi?id=223337.
BTW, this doesn't depend on whether or not the hardened
or the vanilla compiler are used.

The problem seems to be that the mmx flag is forced off
in this configuration (why? and how do I turn it back on?),
and since that's the only flag checked before turning off 
*all* optimizations (why?!? oh, why?), there's no [easy] 
way to get any of them turned on.

(The custom-cflags check avoided this issue up until now.)
Comment 22 Steve Dibb (RETIRED) gentoo-dev 2008-05-25 23:40:51 UTC
(In reply to comment #21)

> Actually, this change causes the mplayer build to break
> on one of my systems (amd64 hardened) with the exact error
> reported in http://bugs.gentoo.org/show_bug.cgi?id=223337.
> BTW, this doesn't depend on whether or not the hardened
> or the vanilla compiler are used.

Need emerge --info and emerge -pv mplayer.
 
> The problem seems to be that the mmx flag is forced off
> in this configuration (why? and how do I turn it back on?),

Simply turn on all of them for this ebuild, and mplayer will automatically detect which ones you have, and build for those.

> and since that's the only flag checked before turning off 
> *all* optimizations (why?!? oh, why?)

AFAIK, they are all dependent upon MMX, in the sense that if you don't have support for that, you won't have it for any of the other ones.  Regardless, I'll add a use flag so you can specifically custom tailor them, though.

But if the custom-cflags setting is breaking hardened boxes, then I'll need an ebuild patch specifically for your profile, since it works fine for others.
Comment 23 Steve Dibb (RETIRED) gentoo-dev 2008-05-26 00:54:55 UTC
(In reply to comment #22)
> > and since that's the only flag checked before turning off 
> > *all* optimizations (why?!? oh, why?)
> 
> AFAIK, they are all dependent upon MMX, in the sense that if you don't have
> support for that, you won't have it for any of the other ones.  Regardless,
> I'll add a use flag so you can specifically custom tailor them, though.

Added custom-cpuopts use flag in mplayer-1.0_rc2_p26753-r2
Comment 24 Konstantin Münning 2009-01-20 16:11:46 UTC
(In reply to comment #23)
> 
> Added custom-cpuopts use flag in mplayer-1.0_rc2_p26753-r2
> 

Hello! I had the invalid instriction problem with mplayer-1.0_rc2_p28288 and custom-cpuopts did not solve or anyway affected it (having correct use flags, of course ;-)). The machine with the problem has a PIII-CPU and I was using distcc. Apparently the automatic build-time CPU detection (which can now be disabled with custom-cpuopts) has only some internal effects but does not change what code optimisations/instructions gcc uses (as CFLAGS -march=xxx). My CFLAGS on this host are correct so I assume these flags are either not used or filtered by the mplayer build system. IMHO the conclusion in comment #17 that this is not a bug in the mplayer build system is wrong as this build system is responsible for passing the correct CFLAGS.

So short solution for me - I compiled mplayer withount distcc and it works fine.

A final solution would be to use the supplied CFLAGS during the build, a quick workaround would be to check/disable distcc in the ebuild.
Comment 25 Samuli Suominen (RETIRED) gentoo-dev 2009-08-03 18:25:52 UTC
so.. this is still problem with 20090731?
Comment 26 Tobias Jakobi 2009-08-03 18:31:59 UTC
Sry, I no longer have this system, so I can't check :(