Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 671340 - media-libs/libaom-1.0.0 USE="cpu_flags_x86_sse2 -cpu_flags_x86_ssse3" - libaom.so.0: undefined reference to `aom_sad4xh_sse2'
Summary: media-libs/libaom-1.0.0 USE="cpu_flags_x86_sse2 -cpu_flags_x86_ssse3" - libao...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 4 votes (vote)
Assignee: media-video herd
URL:
Whiteboard:
Keywords:
: 686770 687624 699482 (view as bug list)
Depends on:
Blocks: 678160
  Show dependency tree
 
Reported: 2018-11-17 13:02 UTC by Jeroen Roovers
Modified: 2020-05-07 17:44 UTC (History)
22 users (show)

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


Attachments
media-libs:libaom-1.0.0-r1:20181117-122721.log (media-libs:libaom-1.0.0-r1:20181117-122721.log,323.76 KB, text/plain)
2018-11-17 13:02 UTC, Jeroen Roovers
Details
build log with all sse* cpuflags enabled. (build.log,459.19 KB, text/x-log)
2019-03-26 04:20 UTC, N. Andrew Walsh
Details
build log (media-libs:libaom-1.0.0-r2:20190608-090900.log,465.75 KB, text/x-log)
2019-06-08 09:51 UTC, thanasis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeroen Roovers gentoo-dev 2018-11-17 13:02:35 UTC
Created attachment 555458 [details]
media-libs:libaom-1.0.0-r1:20181117-122721.log

aom_dsp/x86/jnt_sad_ssse3.c doesn't get built with this combination of USE flags.
Comment 1 Charlie Gehlin 2019-03-01 13:01:53 UTC
Stumbled upon this bug compiling my own _very_ 64-bit genric distribution for a future LiveDVD (and/or netboot...) with march=x86-64 and mtune=k8 BUT with disabled 3dNow! (-mno-3dnow -mno-3dnowa) in order to support even the early 64-bit VIA processors with very few extra instruction-sets...
However, looking at the ebuild, it seems to handle the CPU-flags internally within multilib_src_configure().
BUT adding '-DAOM_TARGET_CPU=generic' (as suggested at https://github.com/mozilla/aom/issues/2) at the bottom of these options seems to help compiling, working here in my local overlay.
Realizing that this is NOT the real solution on how to solve the ebuilds internal CPU-flags logic, but it might help pointing someone who knows what (s)he's doing in the right direction..

Cheers! /Charlie
Comment 2 N. Andrew Walsh 2019-03-26 04:19:57 UTC
I get a similar error, but I have all the sse variants enabled in make.conf: sse, sse2, sse2, and sse4a. And I get more error messages:

libaom.so.0: undefined reference to `aom_sad4xh_sse2'
libaom.so.0: undefined reference to `aom_sad16xh_sse2'
libaom.so.0: undefined reference to `aom_sad64xh_sse2'
libaom.so.0: undefined reference to `aom_sad8xh_sse2'
libaom.so.0: undefined reference to `aom_sad32xh_sse2'
libaom.so.0: undefined reference to `aom_sad128xh_sse2'

I'll attach the build.log.
Comment 3 N. Andrew Walsh 2019-03-26 04:20:56 UTC
Created attachment 570830 [details]
build log with all sse* cpuflags enabled.
Comment 4 Kelly Hirai 2019-04-03 04:03:21 UTC
i got passed this bug by migrating my processor use flags to the new CPU_FLAG_X86 symbol as prescribed in the gentoo wiki article of the same name.
Comment 5 Radoslaw Madej (radegand) 2019-04-03 12:07:41 UTC
(In reply to Kelly Hirai from comment #4)
> i got passed this bug by migrating my processor use flags to the new
> CPU_FLAG_X86 symbol as prescribed in the gentoo wiki article of the same
> name.

Do you mind sharing the link or shedding more light on this issue? I'm hit with the same bug and I can't get passed it to compile the latest firefox. 

Thanks in advance!
Comment 6 Matthew Schultz 2019-04-03 14:12:54 UTC
(In reply to Radoslaw Madej (radegand) from comment #5)
> (In reply to Kelly Hirai from comment #4)
> > i got passed this bug by migrating my processor use flags to the new
> > CPU_FLAG_X86 symbol as prescribed in the gentoo wiki article of the same
> > name.
> 
> Do you mind sharing the link or shedding more light on this issue? I'm hit
> with the same bug and I can't get passed it to compile the latest firefox. 
> 
> Thanks in advance!

https://wiki.gentoo.org/wiki/CPU_FLAGS_X86
Comment 7 Matthew Schultz 2019-04-03 14:15:13 UTC
(In reply to Kelly Hirai from comment #4)
> i got passed this bug by migrating my processor use flags to the new
> CPU_FLAG_X86 symbol as prescribed in the gentoo wiki article of the same
> name.

Not sure how that fixes the problem.  I have the same specified in both areas and it still fails to compile on one of my machines.
Comment 8 Radoslaw Madej (radegand) 2019-04-03 15:12:00 UTC
(In reply to Matthew Schultz from comment #6)
> https://wiki.gentoo.org/wiki/CPU_FLAGS_X86

So yeah, I also had these set and it doesn't help, I get the 'undefined reference' errors.
I thought Kelly meant something related to this:
https://wiki.gentoo.org/wiki/CPU_FLAGS_X86_conversion
https://packages.gentoo.org/useflags/cpu_flags_x86_xop
Comment 9 Matthew Schultz 2019-04-03 15:35:40 UTC
Also possibly of relevance, the machine I have that successfully compiled and installed libaom-1.0.0 has every CPU_FLAGS_X86 flag enabled while the machine that is not able to compile it has the following:

CPU_FLAGS_X86="mmx sse sse2 sse3 -avx -avx2 -sse4_1 -ssse3"
Comment 10 Fred Krogh 2019-04-04 01:14:44 UTC
Its working for me after
$ cpuid2cpuflags 
CPU_FLAGS_X86: aes avx mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3
and then putting
 CPU_FLAGS_X86="aes avx mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"
in /etc/make.conf.
Comment 11 Radoslaw Madej (radegand) 2019-04-05 08:16:00 UTC
Yes, this solved it for me:
CPU_FLAGS_X86="aes avx mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"

turned out to be that by mistake I set CPU_FLAGS_X86 twice in my make conf, and the latter did not include all the flags... <facepalm>
Comment 12 Matthew Schultz 2019-04-05 14:42:15 UTC
(In reply to Matthew Schultz from comment #9)
> Also possibly of relevance, the machine I have that successfully compiled
> and installed libaom-1.0.0 has every CPU_FLAGS_X86 flag enabled while the
> machine that is not able to compile it has the following:
> 
> CPU_FLAGS_X86="mmx sse sse2 sse3 -avx -avx2 -sse4_1 -ssse3"

I think this bug might have more to do with certain older CPUs.  After testing this a bit more, it seems to fail consistently on my older machines which run AMD cpus with the aforementioned CPU_FLAGS_X86 set.  No other CPU_FLAGS_X86 can be set on these older CPUs because they aren't supported.  In addition, this appears to be an amd64 arch problem because it compiles fine on my opteron 144 running x86 arch.
Comment 13 B Nice 2019-04-06 18:22:43 UTC
This bug also hits not so old  AMD (Phenom II) CPUS.  The make.conf has: CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a", but I still get the same errors as Comment 2.
Comment 14 Wadlax 2019-04-12 14:58:32 UTC
On my AMD Phenom II X6 , emerge libaom-1.0.0-r1
1) Fails with "+sse2"
CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a"

2) Succeeds with "-sse2"
CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext popcnt sse sse3 sse4a"

Full cpu flags (from 1) i got from cpuid2cpuflags
Comment 15 Wadlax 2019-04-12 15:10:50 UTC
Fixed emerge by setting full CPU_FLAGS_X86 in make.conf 
and adding "media-libs/libaom -cpu_flags_x86_sse2" to the package.use

Had compile problems on AMD Phenom II X6
Compile on Intel i7-4771 was ok without any changes
(switched to CPU_FLAGS_X86 on both systems long ago)
Comment 16 B Nice 2019-04-13 13:24:52 UTC
Can emerge by changing make.conf ABI_X86= to "64", but not "32" or "32 64".  "32" and "64 32" errors out with the same error as comment 2.  

"64" gives a post compile warning message of:  QA Notice: Package triggers severe warnings which indicate that it
 *            may exhibit random runtime failures.
 * /var/tmp/portage/media-libs/libaom-1.0.0-r1/work/av1/encoder/rdopt.c:8263:51: warning: array subscript -1 is below array bounds of ‘const CANDIDATE_MV[8]’ {aka ‘const struct candidate_mv[8]’} [-Warray-bounds]

As comment 15, compiles fine on Intel Atom Cherry Lake and Intel i7 gen 7 chips.  No such luck on AMD Phenom II 965.

Tied into Bug 678160?
Comment 17 N. Andrew Walsh 2019-04-18 13:07:11 UTC
(In reply to Wadlax from comment #15)
> Fixed emerge by setting full CPU_FLAGS_X86 in make.conf 
> and adding "media-libs/libaom -cpu_flags_x86_sse2" to the package.use
> 
> Had compile problems on AMD Phenom II X6
> Compile on Intel i7-4771 was ok without any changes
> (switched to CPU_FLAGS_X86 on both systems long ago)

changing libaom's use flags in package.use like this solved the issue for me. Thanks!
Comment 18 Ben Kohler gentoo-dev 2019-06-04 18:53:49 UTC
*** Bug 686770 has been marked as a duplicate of this bug. ***
Comment 19 thanasis 2019-06-08 09:51:44 UTC
Created attachment 579196 [details]
build log
Comment 20 Andreas Sturmlechner gentoo-dev 2019-07-01 09:16:31 UTC
*** Bug 687624 has been marked as a duplicate of this bug. ***
Comment 21 Ben 2019-09-19 16:01:46 UTC
Just ran into this, looks like upstream issue, but I'm a cmake n00b.  I haven't tested the resultant binary but this at least this patch allows build:

--- work.orig/aom_dsp/aom_dsp.cmake     2018-06-28 09:19:27.000000000 -0600
+++ work/aom_dsp/aom_dsp.cmake  2019-09-19 09:33:08.756420455 -0600
@@ -183,6 +183,7 @@
               "${AOM_ROOT}/aom_dsp/x86/highbd_variance_sse2.c"
               "${AOM_ROOT}/aom_dsp/x86/quantize_sse2.c"
               "${AOM_ROOT}/aom_dsp/x86/sum_squares_sse2.c"
+              "${AOM_ROOT}/aom_dsp/x86/jnt_sad_ssse3.c"
               "${AOM_ROOT}/aom_dsp/x86/variance_sse2.c")
 
   list(APPEND AOM_DSP_ENCODER_ASM_SSSE3_X86_64
@@ -208,8 +209,7 @@
               "${AOM_ROOT}/aom_dsp/x86/masked_sad_intrin_ssse3.c"
               "${AOM_ROOT}/aom_dsp/x86/masked_variance_intrin_ssse3.h"
               "${AOM_ROOT}/aom_dsp/x86/masked_variance_intrin_ssse3.c"
-              "${AOM_ROOT}/aom_dsp/x86/jnt_variance_ssse3.c"
-              "${AOM_ROOT}/aom_dsp/x86/jnt_sad_ssse3.c")
+              "${AOM_ROOT}/aom_dsp/x86/jnt_variance_ssse3.c")
 
   list(APPEND AOM_DSP_ENCODER_INTRIN_SSE4_1
               "${AOM_ROOT}/aom_dsp/x86/highbd_variance_sse4.c"

With this patch I was able to build without SSSE3 enabled and it appears to not affect my machine with SSSE3.  As this patch is written, people with SSSE3 instructions must also enable SSE2 because I'm a cmake n00b and don't know a better way to do this (is it okay to duplicate files in the cmake file?).

Again I have not tested the resultant binaries so more testing is needed, the machine that I need to test on is currently building rust so it needs to be undisturbed for a while...
Comment 22 onkobu 2019-09-19 22:02:06 UTC
On a machine with cpuid2cpuflags with output of CPU_FLAGS_X86: aes avx f16c fma3 fma4 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 xop and CPU_FLAGS_X86 to exactly this makes it work. It seems like the combination of avx and the more recent sse4*/ssse do the trick. Didn't need to apply a patch.
Comment 23 Ben 2019-09-19 22:42:17 UTC
Correct, newer machines that have SSSE3 set (will have SSE2 as well) and will thus build properly.

Only the older target machines that have SSE2 but not SSSE3 will have problems.  

Or if you typo SSE3 instead of SSSE3...
Comment 24 Ben 2019-09-22 17:04:13 UTC
Just wanted to follow up that the machine with SSE2 but not SSSE3 was able to build and run libaom with the patch.  I tried using it with ffmpeg-4 to encode av1 streams, it at least does not give me illegal instructions but could not discern if the program was working completely (the webpages I read about how to use ffmpeg to build av1 gave me this huge disclaimer about how slow it is, and I do witness the extreme slowness of using libaom compounded with the fact it's running on an old P4.)

www-client/firefox-68.1.0[system-av1] seems to build/run fine with the patched libaom, but I don't have any av1 streams to test playback against.
Comment 25 Alexander Bezrukov 2019-09-27 06:39:13 UTC
I have had yet no chance to check if the compiled binary actually functioning correctly (updated my ws from a mobile device while travelling abroad with almost no internet access) but I can confirm that the patch from comment #21 at least allows libaom to compile and link. K8 CPU with SSE2, SSE3 but not SSSE3, CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext sse sse2 sse3".
Comment 26 garmine 2019-10-31 15:59:45 UTC
I can confirm libaom 1.0.0-r2 builds with the following flags set:

# grep CPU_FLAGS /etc/portage/make.conf
CPU_FLAGS_X86="mmx mmxext popcnt sse sse2 sse3 sse4a"

# grep libaom /etc/portage/package.use/default
media-libs/libaom -cpu_flags_x86_sse2 # gentoo bug #6713401

The machine is a VM running on AMD Epyc HW. Without the SSE2 flag disabled for the package the build fails with the above mentioned linker errors.
Comment 27 Jeroen Roovers gentoo-dev 2019-11-07 08:51:55 UTC
*** Bug 699482 has been marked as a duplicate of this bug. ***
Comment 28 Markus Giese 2019-11-07 15:53:45 UTC
adding "media-libs/libaom -cpu_flags_x86_sse2" to package.use fixed it for me as well

cheers
Comment 29 jospezial 2020-03-28 23:17:45 UTC
Still the same even on live ebuild (did not test with the patch):

311/316] /usr/bin/cmake -E cmake_symlink_library libaom.so.1.0.0  libaom.so.0 libaom.so && :
[312/316] : && /usr/bin/x86_64-pc-linux-gnu-g++ -m32  -march=native -mtune=native -O2 -pipe  -std=c++11 -Wall -Wdisabled-optimization -Wextra -Wfloat-conversion -Wlogical-op -Wpointer-arith -Wsign-compare -Wtype-limits -Wuninitialized -Wunused -Wvla -Wstack-usage=240000 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -Wl,-O1 -Wl,--as-needed CMakeFiles/aom_common_app_util.dir/common/args.c.o CMakeFiles/aom_common_app_util.dir/common/av1_config.c.o CMakeFiles/aom_common_app_util.dir/common/md5_utils.c.o CMakeFiles/aom_common_app_util.dir/common/tools_common.c.o CMakeFiles/aom_common_app_util.dir/common/rawenc.c.o CMakeFiles/aom_common_app_util.dir/common/y4menc.c.o CMakeFiles/test_aom_common.dir/test/aom_integer_test.cc.o CMakeFiles/test_aom_common.dir/test/av1_config_test.cc.o CMakeFiles/test_aom_common.dir/test/blockd_test.cc.o CMakeFiles/test_aom_common.dir/test/decode_test_driver.cc.o CMakeFiles/test_aom_common.dir/test/log2_test.cc.o CMakeFiles/test_aom_common.dir/test/metadata_test.cc.o CMakeFiles/test_aom_common.dir/test/test_vectors.cc.o CMakeFiles/aom_decoder_app_util.dir/common/ivfdec.c.o CMakeFiles/aom_decoder_app_util.dir/common/obudec.c.o CMakeFiles/aom_decoder_app_util.dir/common/video_reader.c.o CMakeFiles/aom_decoder_app_util.dir/common/webmdec.cc.o CMakeFiles/test_aom_decoder.dir/test/decode_api_test.cc.o CMakeFiles/test_aom_decoder.dir/test/external_frame_buffer_test.cc.o CMakeFiles/test_aom_decoder.dir/test/invalid_file_test.cc.o CMakeFiles/test_aom_decoder.dir/test/test_vector_test.cc.o CMakeFiles/test_aom_encoder.dir/test/active_map_test.cc.o CMakeFiles/test_aom_encoder.dir/test/altref_test.cc.o CMakeFiles/test_aom_encoder.dir/test/aq_segment_test.cc.o CMakeFiles/test_aom_encoder.dir/test/borders_test.cc.o CMakeFiles/test_aom_encoder.dir/test/cpu_speed_test.cc.o CMakeFiles/test_aom_encoder.dir/test/datarate_test.cc.o CMakeFiles/test_aom_encoder.dir/test/svc_datarate_test.cc.o CMakeFiles/test_aom_encoder.dir/test/encode_api_test.cc.o CMakeFiles/test_aom_encoder.dir/test/encode_test_driver.cc.o CMakeFiles/test_aom_encoder.dir/test/end_to_end_test.cc.o CMakeFiles/test_aom_encoder.dir/test/fwd_kf_test.cc.o CMakeFiles/test_aom_encoder.dir/test/gf_pyr_height_test.cc.o CMakeFiles/test_aom_encoder.dir/test/rt_end_to_end_test.cc.o CMakeFiles/test_aom_encoder.dir/test/error_resilience_test.cc.o CMakeFiles/test_aom_encoder.dir/test/frame_size_tests.cc.o CMakeFiles/test_aom_encoder.dir/test/horz_superres_test.cc.o CMakeFiles/test_aom_encoder.dir/test/level_test.cc.o CMakeFiles/test_aom_encoder.dir/test/lossless_test.cc.o CMakeFiles/test_aom_encoder.dir/test/monochrome_test.cc.o CMakeFiles/test_aom_encoder.dir/test/qm_test.cc.o CMakeFiles/test_aom_encoder.dir/test/resize_test.cc.o CMakeFiles/test_aom_encoder.dir/test/scalability_test.cc.o CMakeFiles/test_aom_encoder.dir/test/y4m_test.cc.o CMakeFiles/test_aom_encoder.dir/test/time_stamp_test.cc.o CMakeFiles/aom_encoder_app_util.dir/common/ivfenc.c.o CMakeFiles/aom_encoder_app_util.dir/common/video_writer.c.o CMakeFiles/aom_encoder_app_util.dir/common/warnings.c.o CMakeFiles/aom_encoder_app_util.dir/common/y4minput.c.o CMakeFiles/aom_encoder_app_util.dir/examples/encoder_util.c.o CMakeFiles/aom_encoder_app_util.dir/common/webmenc.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/cpu_id.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/planar_functions.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/row_any.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/row_common.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/row_gcc.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/row_mips.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/row_neon.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/row_neon64.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/row_win.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/scale.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/scale_any.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/scale_common.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/scale_gcc.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/scale_mips.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/scale_neon.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/scale_neon64.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/scale_win.cc.o CMakeFiles/webm.dir/third_party/libwebm/common/hdr_util.cc.o CMakeFiles/webm.dir/third_party/libwebm/mkvmuxer/mkvmuxer.cc.o CMakeFiles/webm.dir/third_party/libwebm/mkvmuxer/mkvmuxerutil.cc.o CMakeFiles/webm.dir/third_party/libwebm/mkvmuxer/mkvwriter.cc.o CMakeFiles/webm.dir/third_party/libwebm/mkvparser/mkvparser.cc.o CMakeFiles/webm.dir/third_party/libwebm/mkvparser/mkvreader.cc.o CMakeFiles/test_libaom.dir/gen_src/usage_exit.c.o CMakeFiles/test_libaom.dir/test/test_libaom.cc.o  -o test_libaom  -Wl,-rpath,/var/tmp/portage/media-libs/libaom-9999/work/libaom-9999_build-abi_x86_32.x86  libaom.so.1.0.0  libaom_gtest.a  -lm  -lpthread && :
FAILED: test_libaom 
: && /usr/bin/x86_64-pc-linux-gnu-g++ -m32  -march=native -mtune=native -O2 -pipe  -std=c++11 -Wall -Wdisabled-optimization -Wextra -Wfloat-conversion -Wlogical-op -Wpointer-arith -Wsign-compare -Wtype-limits -Wuninitialized -Wunused -Wvla -Wstack-usage=240000 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -Wl,-O1 -Wl,--as-needed CMakeFiles/aom_common_app_util.dir/common/args.c.o CMakeFiles/aom_common_app_util.dir/common/av1_config.c.o CMakeFiles/aom_common_app_util.dir/common/md5_utils.c.o CMakeFiles/aom_common_app_util.dir/common/tools_common.c.o CMakeFiles/aom_common_app_util.dir/common/rawenc.c.o CMakeFiles/aom_common_app_util.dir/common/y4menc.c.o CMakeFiles/test_aom_common.dir/test/aom_integer_test.cc.o CMakeFiles/test_aom_common.dir/test/av1_config_test.cc.o CMakeFiles/test_aom_common.dir/test/blockd_test.cc.o CMakeFiles/test_aom_common.dir/test/decode_test_driver.cc.o CMakeFiles/test_aom_common.dir/test/log2_test.cc.o CMakeFiles/test_aom_common.dir/test/metadata_test.cc.o CMakeFiles/test_aom_common.dir/test/test_vectors.cc.o CMakeFiles/aom_decoder_app_util.dir/common/ivfdec.c.o CMakeFiles/aom_decoder_app_util.dir/common/obudec.c.o CMakeFiles/aom_decoder_app_util.dir/common/video_reader.c.o CMakeFiles/aom_decoder_app_util.dir/common/webmdec.cc.o CMakeFiles/test_aom_decoder.dir/test/decode_api_test.cc.o CMakeFiles/test_aom_decoder.dir/test/external_frame_buffer_test.cc.o CMakeFiles/test_aom_decoder.dir/test/invalid_file_test.cc.o CMakeFiles/test_aom_decoder.dir/test/test_vector_test.cc.o CMakeFiles/test_aom_encoder.dir/test/active_map_test.cc.o CMakeFiles/test_aom_encoder.dir/test/altref_test.cc.o CMakeFiles/test_aom_encoder.dir/test/aq_segment_test.cc.o CMakeFiles/test_aom_encoder.dir/test/borders_test.cc.o CMakeFiles/test_aom_encoder.dir/test/cpu_speed_test.cc.o CMakeFiles/test_aom_encoder.dir/test/datarate_test.cc.o CMakeFiles/test_aom_encoder.dir/test/svc_datarate_test.cc.o CMakeFiles/test_aom_encoder.dir/test/encode_api_test.cc.o CMakeFiles/test_aom_encoder.dir/test/encode_test_driver.cc.o CMakeFiles/test_aom_encoder.dir/test/end_to_end_test.cc.o CMakeFiles/test_aom_encoder.dir/test/fwd_kf_test.cc.o CMakeFiles/test_aom_encoder.dir/test/gf_pyr_height_test.cc.o CMakeFiles/test_aom_encoder.dir/test/rt_end_to_end_test.cc.o CMakeFiles/test_aom_encoder.dir/test/error_resilience_test.cc.o CMakeFiles/test_aom_encoder.dir/test/frame_size_tests.cc.o CMakeFiles/test_aom_encoder.dir/test/horz_superres_test.cc.o CMakeFiles/test_aom_encoder.dir/test/level_test.cc.o CMakeFiles/test_aom_encoder.dir/test/lossless_test.cc.o CMakeFiles/test_aom_encoder.dir/test/monochrome_test.cc.o CMakeFiles/test_aom_encoder.dir/test/qm_test.cc.o CMakeFiles/test_aom_encoder.dir/test/resize_test.cc.o CMakeFiles/test_aom_encoder.dir/test/scalability_test.cc.o CMakeFiles/test_aom_encoder.dir/test/y4m_test.cc.o CMakeFiles/test_aom_encoder.dir/test/time_stamp_test.cc.o CMakeFiles/aom_encoder_app_util.dir/common/ivfenc.c.o CMakeFiles/aom_encoder_app_util.dir/common/video_writer.c.o CMakeFiles/aom_encoder_app_util.dir/common/warnings.c.o CMakeFiles/aom_encoder_app_util.dir/common/y4minput.c.o CMakeFiles/aom_encoder_app_util.dir/examples/encoder_util.c.o CMakeFiles/aom_encoder_app_util.dir/common/webmenc.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/cpu_id.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/planar_functions.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/row_any.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/row_common.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/row_gcc.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/row_mips.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/row_neon.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/row_neon64.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/row_win.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/scale.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/scale_any.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/scale_common.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/scale_gcc.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/scale_mips.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/scale_neon.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/scale_neon64.cc.o CMakeFiles/yuv.dir/third_party/libyuv/source/scale_win.cc.o CMakeFiles/webm.dir/third_party/libwebm/common/hdr_util.cc.o CMakeFiles/webm.dir/third_party/libwebm/mkvmuxer/mkvmuxer.cc.o CMakeFiles/webm.dir/third_party/libwebm/mkvmuxer/mkvmuxerutil.cc.o CMakeFiles/webm.dir/third_party/libwebm/mkvmuxer/mkvwriter.cc.o CMakeFiles/webm.dir/third_party/libwebm/mkvparser/mkvparser.cc.o CMakeFiles/webm.dir/third_party/libwebm/mkvparser/mkvreader.cc.o CMakeFiles/test_libaom.dir/gen_src/usage_exit.c.o CMakeFiles/test_libaom.dir/test/test_libaom.cc.o  -o test_libaom  -Wl,-rpath,/var/tmp/portage/media-libs/libaom-9999/work/libaom-9999_build-abi_x86_32.x86  libaom.so.1.0.0  libaom_gtest.a  -lm  -lpthread && :
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libaom.so.1.0.0: undefined reference to `aom_sad4xh_sse2'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libaom.so.1.0.0: undefined reference to `aom_sad16xh_sse2'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libaom.so.1.0.0: undefined reference to `aom_sad64xh_sse2'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libaom.so.1.0.0: undefined reference to `aom_sad8xh_sse2'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libaom.so.1.0.0: undefined reference to `aom_sad32xh_sse2'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libaom.so.1.0.0: undefined reference to `aom_sad128xh_sse2'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
 * ERROR: media-libs/libaom-9999::gentoo failed (compile phase):
 *   ninja -v -j1 -l0 failed

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

/etc/portage/make.conf:
CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a"

cat /proc/cpuinfo 
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 16
model           : 6
model name      : AMD Athlon(tm) II X2 240 Processor
stepping        : 2
microcode       : 0x10000c7
cpu MHz         : 800.000
cache size      : 1024 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
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 nodeid_msr hw_pstate vmmcall npt lbrv svm_lock nrip_save
bugs            : tlb_mmatch apic_c1e fxsave_leak sysret_ss_attrs null_seg amd_e400 spectre_v1 spectre_v2
bogomips        : 5625.64
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate