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

Bug 663954

Summary: media-video/ffmpeg-3.3.6 CPU_X86_USE flag popcnt requires sse4_1, but AMD CPUs don't have the latter
Product: Gentoo Linux Reporter: gentoo
Component: Current packagesAssignee: Gentoo Media-video project <media-video>
Status: RESOLVED WORKSFORME    
Severity: normal CC: gentoo, jstein
Priority: Normal    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description gentoo 2018-08-18 07:51:26 UTC
Trying to update my system (amd64) using portage emerge, but getting this complaint from package media-video/ffmpeg-3.3.6:

  The following REQUIRED_USE flag constraints are unsatisfied:
    cpu_flags_x86_popcnt? ( cpu_flags_x86_sse4_1 )

However, I have set the CPU_X86_USE flags as suggested by the cpuid2cpuflags tool (version 5). That tool says that I should set as follows:

$ cpuid2cpuflags     
CPU_FLAGS_X86: 3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a

Note: popcnt is in the list, but sse4_1 is not.

Here is the flag output from cat /proc/cpuinfo, the CPU is "AMD Athlon(tm) II X2 250 Processor".

flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt hw_pstate vmmcall npt lbrv svm_lock nrip_save

I don't know if this is a but in ffmpeg package (i.e., popcnt can exist without sse4_1) or in the cpu id tool (i.e., the tool fails to write that the cpu also supports sse4_1). But this should be fixed either in ffmpeg or in that cpuid tool.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-08-18 17:59:56 UTC
cpuid2cpuflags is behaving correctly here.  There is a subset of AMD CPUs that support only SSE4a but not SSE4.1.
Comment 2 gentoo 2018-08-18 19:01:23 UTC
I re-synced the portage tree and somehow the problem disappeared... maybe because a similar bug 663956 has been fixed in media-libs/opencv-3.4.1-r4 ?