Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 816027 - media-libs/libaom-3.1.2: build fails with USE=abi_x86_32 on amd64 system
Summary: media-libs/libaom-3.1.2: build fails with USE=abi_x86_32 on amd64 system
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: media-video herd
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 827895
  Show dependency tree
 
Reported: 2021-10-03 10:14 UTC by OKUMURA N. Shin-ya
Modified: 2022-03-17 02:09 UTC (History)
3 users (show)

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


Attachments
build log (build.log,385.02 KB, text/x-log)
2021-10-03 10:15 UTC, OKUMURA N. Shin-ya
Details
build log (32), fail (build-abi_x86_32.x86.log,373.77 KB, text/plain)
2021-10-03 10:15 UTC, OKUMURA N. Shin-ya
Details
build log (64), success (build-abi_x86_64.amd64.log,10.21 KB, text/x-log)
2021-10-03 10:16 UTC, OKUMURA N. Shin-ya
Details
emerge --info (emerge-info.txt,7.00 KB, text/plain)
2021-10-03 13:02 UTC, OKUMURA N. Shin-ya
Details

Note You need to log in before you can comment on or make changes to this bug.
Description OKUMURA N. Shin-ya 2021-10-03 10:14:22 UTC
"emerge media-libs/libaom-3.1.2" fails with USE=abi_x86_32 on x64 system as follows;

[287/288] : && /usr/bin/x86_64-pc-linux-gnu-g++ -m32 -march=native -O2 -pipe -fcommon  -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 -Wl,--defsym=__gentoo_check_ldflags__=0 CMakeFiles/aom_common_app_util.dir/av1/arg_defs.c.o CMakeFiles/aom_common_app_util.dir/common/args_helper.c.o 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/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/yuv.dir/third_party/libyuv/source/convert_argb.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/yuv.dir/third_party/libyuv/source/scale_uv.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/dump_obu.dir/gen_src/usage_exit.cc.o CMakeFiles/dump_obu.dir/tools/dump_obu.cc.o CMakeFiles/dump_obu.dir/tools/obu_parser.cc.o -o dump_obu  -Wl,-rpath,/var/tmp/portage/media-libs/libaom-3.1.2/work/libaom-3.1.2_build-abi_x86_32.x86  libaom.so.3.1.2  -lm  -lpthread && :
FAILED: dump_obu 
: && /usr/bin/x86_64-pc-linux-gnu-g++ -m32 -march=native -O2 -pipe -fcommon  -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 -Wl,--defsym=__gentoo_check_ldflags__=0 CMakeFiles/aom_common_app_util.dir/av1/arg_defs.c.o CMakeFiles/aom_common_app_util.dir/common/args_helper.c.o 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/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/yuv.dir/third_party/libyuv/source/convert_argb.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/yuv.dir/third_party/libyuv/source/scale_uv.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/dump_obu.dir/gen_src/usage_exit.cc.o CMakeFiles/dump_obu.dir/tools/dump_obu.cc.o CMakeFiles/dump_obu.dir/tools/obu_parser.cc.o -o dump_obu  -Wl,-rpath,/var/tmp/portage/media-libs/libaom-3.1.2/work/libaom-3.1.2_build-abi_x86_32.x86  libaom.so.3.1.2  -lm  -lpthread && :
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: libaom.so.3.1.2: undefined reference to `aom_sad4xh_sse2'
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: libaom.so.3.1.2: undefined reference to `aom_sad16xh_sse2'
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: libaom.so.3.1.2: undefined reference to `aom_sad64xh_sse2'
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: libaom.so.3.1.2: undefined reference to `aom_sad8xh_sse2'
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: libaom.so.3.1.2: undefined reference to `aom_sad32xh_sse2'
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: libaom.so.3.1.2: undefined reference to `aom_sad128xh_sse2'
collect2: error: ld returned 1 exit status


Reproducible: Always

Steps to Reproduce:
1.emerge =media-libs/libaom-3.1.2
Actual Results:  
See attached files, I will attach soon.

Expected Results:  
build success.
Comment 1 OKUMURA N. Shin-ya 2021-10-03 10:15:04 UTC
Created attachment 742617 [details]
build log
Comment 2 OKUMURA N. Shin-ya 2021-10-03 10:15:44 UTC
Created attachment 742620 [details]
build log (32), fail
Comment 3 OKUMURA N. Shin-ya 2021-10-03 10:16:05 UTC
Created attachment 742623 [details]
build log (64), success
Comment 4 Jonas Stein gentoo-dev 2021-10-03 10:33:09 UTC
Thank you for the report. We need to have all information at hand before ticket assignment. Please 
* paste the emerge info 
as described on https://wiki.gentoo.org/wiki/Attach_the_logs_to_the_bug_ticket

Please reopen this ticket (Status:UNCONFIRMED) afterwards.
Comment 5 Tee KOBAYASHI 2021-10-03 11:19:00 UTC
See also https://bugs.gentoo.org/671340
Comment 6 OKUMURA N. Shin-ya 2021-10-03 13:02:36 UTC
Created attachment 742644 [details]
emerge --info
Comment 7 OKUMURA N. Shin-ya 2021-10-03 13:13:52 UTC
I attached emerge --info.
Please tell me if more information(s) is needed.
Comment 8 Daniel Novomeský 2021-11-30 12:49:25 UTC
32-bit build fails with CPU_FLAGS_X86="mmx mmxext sse sse2" flags.

It start to work with:
CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3" emerge -1 libaom

Try if it works for you.
Even if you have old CPU, probably it will work.

I guess that libaom use some run-time check so it will use only current CPU-supported optimizations.

Tell us if this workaround works for you.
Comment 9 OKUMURA N. Shin-ya 2021-12-04 02:57:58 UTC
O.K, emerge success with CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3" and then;
# ls -l /usr/lib{32,64}/libaom*.so.3.1.2
-rwxr-xr-x 1 root root 4926116 Dec  4 11:41 /usr/lib32/libaom.so.3.1.2
-rwxr-xr-x 1 root root 4497304 Dec  4 11:41 /usr/lib64/libaom.so.3.1.2

Thunderbird, that uses libaom, seems running well currently.
Comment 10 Larry the Git Cow gentoo-dev 2021-12-24 06:14:16 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=628a37720393c8362cdecfaa9686e1e873f320c5

commit 628a37720393c8362cdecfaa9686e1e873f320c5
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-12-24 06:13:33 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-12-24 06:13:33 +0000

    media-libs/libaom: add 3.2.0
    
    Bug: https://bugs.gentoo.org/816027
    Bug: https://bugs.gentoo.org/828112
    Bug: https://bugs.gentoo.org/793932
    Bug: https://bugs.gentoo.org/798126
    Signed-off-by: Sam James <sam@gentoo.org>

 media-libs/libaom/Manifest            |  1 +
 media-libs/libaom/libaom-3.2.0.ebuild | 84 +++++++++++++++++++++++++++++++++++
 media-libs/libaom/libaom-9999.ebuild  | 13 ++++--
 3 files changed, 95 insertions(+), 3 deletions(-)
Comment 11 Larry the Git Cow gentoo-dev 2022-03-17 02:09:52 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f96696e0926a6e2ff71c7455755e6a5563f0570

commit 1f96696e0926a6e2ff71c7455755e6a5563f0570
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-03-17 02:07:19 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-03-17 02:08:39 +0000

    media-libs/libaom: workaround bugs in intrinsic-enabled/disabled builds
    
    - For 32-bit multilib builds on amd64, force on SSE3 & SSSE3. It seems
      to check at runtime anyway (for some targets, inc. this one).
    
    - For arm32-on-arm64 builds, go generic, because it gets confused by ARM64
      when NEON is disabled (I think?). Could try forcing arm at some point.
    
    Closes: https://bugs.gentoo.org/816027
    Closes: https://bugs.gentoo.org/835456
    Signed-off-by: Sam James <sam@gentoo.org>

 media-libs/libaom/libaom-3.3.0.ebuild | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)