Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 564128

Summary: media-video/ffmpeg-2.8.1 requires mmxext cpuflag, but my Atom has none
Product: Gentoo Linux Reporter: Sascha Wuestemann <bigfoot>
Component: Current packagesAssignee: Gentoo Media-video project <media-video>
Status: RESOLVED INVALID    
Severity: normal CC: mgorny
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info

Description Sascha Wuestemann 2015-10-25 22:11:42 UTC
Created attachment 415488 [details]
emerge --info

Upon world upgrade, emerges stops because

!!! The ebuild selected to satisfy "media-video/ffmpeg:0=" has unmet requirements.
...
The following REQUIRED_USE flag constraints are unsatisfied:
    cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 ) cpu_flags_x86_sse? ( cpu_flags_x86_mmxext )

My CPU:
$ cat /proc/cpuinfo 
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 28
model name      : Intel(R) Atom(TM) CPU  330   @ 1.60GHz

has the following cpu flags:
flags           : fpu vme de tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts nopl aperfmperf pni dtes64 monitor ds_cpl tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm dtherm

and lacks mmxext.

Is mmxext really nescessary for ffmpeg to run?
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-10-25 22:38:06 UTC
mmxext (as used by amd in the past) is a subset of sse, so your processor certainly has it.
Comment 2 Jouni Kosonen 2015-10-25 22:46:42 UTC
To expand on #1, the flags: line in cpuinfo and the CPU_FLAGS_X86 values do not have a one-to-one relation so your current CPU_FLAGS_X86="mmx sse sse2" is somewhat pessimistic.

Try emerging and running app-portage/cpuinfo2cpuflags - it should tell you what to put in /etc/portage/make.conf.

For your processor, I'd expect it to emit something like

CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3"
Comment 3 Chí-Thanh Christopher Nguyễn gentoo-dev 2015-10-26 09:01:55 UTC
Processors which support mmxext usually have the corresponding CPU flag set.

This means the Atom 330 either does not support mmxext, or it wrongly says it is not supported.

If the former, ffmpeg maintainers may want to look at whether mmxext is really required for sse*
If the latter, maybe a quirk can be added to app-portage/cpuinfo2cpuflags.
Comment 4 Sascha Wuestemann 2015-10-26 10:24:00 UTC
(In reply to Jouni Kosonen from comment #2)
> To expand on #1, the flags: line in cpuinfo and the CPU_FLAGS_X86 values do
> not have a one-to-one relation so your current CPU_FLAGS_X86="mmx sse sse2"
> is somewhat pessimistic.
> 
> Try emerging and running app-portage/cpuinfo2cpuflags - it should tell you
> what to put in /etc/portage/make.conf.
> 
> For your processor, I'd expect it to emit something like
> 
> CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3"

I can confirm that:

# cpuinfo2cpuflags-x86 
CPU_FLAGS_X86: mmx mmxext sse sse2 sse3 ssse3
Comment 5 Sascha Wuestemann 2015-10-26 10:27:37 UTC
(In reply to Chí-Thanh Christopher Nguyễn from comment #3)
> Processors which support mmxext usually have the corresponding CPU flag set.
> 
> This means the Atom 330 either does not support mmxext, or it wrongly says
> it is not supported.
> 
> If the former, ffmpeg maintainers may want to look at whether mmxext is
> really required for sse*
> If the latter, maybe a quirk can be added to app-portage/cpuinfo2cpuflags.

An emerge up world is on the go, about 200 updates more to go and ffmpeg there within.
Comment 6 Alexis Ballier gentoo-dev 2015-10-26 11:15:50 UTC
mmxext is a subset of sse, so comment #1 was correct