Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 499336 - =media-libs/libvpx-1.4.0 on x32 - vp9_encodemb.c:(.text+0x105): undefined reference to `vp9_subtract_block_sse2'
Summary: =media-libs/libvpx-1.4.0 on x32 - vp9_encodemb.c:(.text+0x105): undefined ref...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: x32
  Show dependency tree
 
Reported: 2014-01-26 11:18 UTC by Bertrand Jacquin
Modified: 2022-01-03 12:47 UTC (History)
7 users (show)

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


Attachments
build.log (build.log,278.15 KB, text/plain)
2014-01-26 11:19 UTC, Bertrand Jacquin
Details
emerge --info (info.log,15.89 KB, text/plain)
2014-01-26 11:20 UTC, Bertrand Jacquin
Details
Second build.log (build.log,259.07 KB, text/plain)
2016-02-24 10:37 UTC, Dainius Masiliūnas
Details
Fix x32 build support (libvpx-1.6.1-x32.patch,378 bytes, patch)
2017-03-06 22:58 UTC, Steven Newbury
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bertrand Jacquin 2014-01-26 11:18:50 UTC
Building media-libs/libvpx-1.3.0 for ABI_X86=x32 with USE="mmx sse sse2 threads (-altivec) -avx% -avx2% -doc -postproc -sse3 -sse4_1 -ssse3 -static-libs
{-test}" lead to the following error :

x86_64-pc-linux-gnux32-gcc -shared -Wl,-O1 -Wl,--as-needed -mx32 -Wl,--no-undefined -Wl,-soname,libvpx.so.1 -Wl,--version-script,libvpx.ver -o libvpx.so.1.3.0 vpx/src/svc_encodeframe.c.o vpx/src/vpx_decoder.c.o vpx/src/vpx_encoder.c.o vpx/src/vpx_codec.c.o vpx/src/vpx_image.c.o vpx_mem/vpx_mem.c.o vpx_scale/generic/vpx_scale.c.o vpx_scale/generic/yv12config.c.o vpx_scale/generic/yv12extend.c.o vpx_scale/generic/gen_scalers.c.o vpx_scale/vpx_scale_asm_offsets.c.o vpx_scale/vpx_scale_rtcd.c.o vpx_ports/x86_cpuid.c.o vp8/common/alloccommon.c.o vp8/common/blockd.c.o vp8/common/debugmodes.c.o vp8/common/dequantize.c.o vp8/common/entropy.c.o vp8/common/entropymode.c.o vp8/common/entropymv.c.o vp8/common/extend.c.o vp8/common/filter.c.o vp8/common/findnearmv.c.o vp8/common/generic/systemdependent.c.o vp8/common/idct_blk.c.o vp8/common/idctllm.c.o vp8/common/rtcd.c.o vp8/common/loopfilter.c.o vp8/common/loopfilter_filters.c.o vp8/common/mbpitch.c.o vp8/common/modecont.c.o vp8/common/quant_common.c.o vp8/common/reconinter.c.o vp8/common/reconintra.c.o vp8/common/reconintra4x4.c.o vp8/common/sad_c.c.o vp8/common/setupintrarecon.c.o vp8/common/swapyv12buffer.c.o vp8/common/variance_c.c.o vp8/common/treecoder.c.o vp8/common/x86/filter_x86.c.o vp8/common/x86/vp8_asm_stubs.c.o vp8/common/x86/loopfilter_x86.c.o vp8/common/x86/idct_blk_mmx.c.o vp8/common/x86/variance_mmx.c.o vp8/common/x86/idct_blk_sse2.c.o vp8/common/x86/recon_wrapper_sse2.c.o vp8/common/x86/variance_sse2.c.o vp8/vp8_cx_iface.c.o vp8/encoder/bitstream.c.o vp8/encoder/boolhuff.c.o vp8/encoder/dct.c.o vp8/encoder/encodeframe.c.o vp8/encoder/encodeintra.c.o vp8/encoder/encodemb.c.o vp8/encoder/encodemv.c.o vp8/encoder/ethreading.c.o vp8/encoder/firstpass.c.o vp8/encoder/denoising.c.o vp8/encoder/lookahead.c.o vp8/encoder/mcomp.c.o vp8/encoder/modecosts.c.o vp8/encoder/onyx_if.c.o vp8/encoder/pickinter.c.o vp8/encoder/picklpf.c.o vp8/encoder/psnr.c.o vp8/encoder/quantize.c.o vp8/encoder/ratectrl.c.o vp8/encoder/rdopt.c.o vp8/encoder/segmentation.c.o vp8/encoder/tokenize.c.o vp8/encoder/treewriter.c.o vp8/encoder/temporal_filter.c.o vp8/encoder/vp8_asm_enc_offsets.c.o vp8/encoder/x86/vp8_enc_stubs_mmx.c.o vp8/encoder/x86/quantize_sse2.c.o vp8/encoder/x86/denoising_sse2.c.o vp8/encoder/x86/vp8_enc_stubs_sse2.c.o vp8/vp8_dx_iface.c.o
vp8/decoder/dboolhuff.c.o vp8/decoder/decodemv.c.o vp8/decoder/decodframe.c.o vp8/decoder/detokenize.c.o vp8/decoder/onyxd_if.c.o vp8/decoder/threading.c.o vp9/common/vp9_alloccommon.c.o vp9/common/vp9_convolve.c.o vp9/common/vp9_debugmodes.c.o vp9/common/vp9_entropy.c.o vp9/common/vp9_entropymode.c.o vp9/common/vp9_entropymv.c.o vp9/common/vp9_extend.c.o vp9/common/vp9_filter.c.o vp9/common/vp9_findnearmv.c.o vp9/common/generic/vp9_systemdependent.c.o vp9/common/vp9_idct.c.o vp9/common/vp9_pred_common.c.o vp9/common/vp9_rtcd.c.o vp9/common/vp9_scale.c.o vp9/common/vp9_seg_common.c.o vp9/common/vp9_tile_common.c.o vp9/common/vp9_loopfilter.c.o vp9/common/vp9_loopfilter_filters.c.o vp9/common/vp9_mvref_common.c.o vp9/common/vp9_quant_common.c.o vp9/common/vp9_reconinter.c.o vp9/common/vp9_reconintra.c.o vp9/common/vp9_treecoder.c.o vp9/common/vp9_common_data.c.o vp9/common/vp9_scan.c.o vp9/common/x86/vp9_asm_stubs.c.o vp9/common/x86/vp9_loopfilter_intrin_sse2.c.o vp9/common/x86/vp9_idct_intrin_sse2.c.o vp9/vp9_cx_iface.c.o vp9/encoder/vp9_bitstream.c.o vp9/encoder/vp9_boolhuff.c.o vp9/encoder/vp9_dct.c.o vp9/encoder/vp9_encodeframe.c.o vp9/encoder/vp9_encodeintra.c.o vp9/encoder/vp9_encodemb.c.o vp9/encoder/vp9_encodemv.c.o vp9/encoder/vp9_firstpass.c.o vp9/encoder/vp9_lookahead.c.o vp9/encoder/vp9_mcomp.c.o vp9/encoder/vp9_modecosts.c.o vp9/encoder/vp9_onyx_if.c.o vp9/encoder/vp9_picklpf.c.o vp9/encoder/vp9_psnr.c.o
vp9/encoder/vp9_quantize.c.o vp9/encoder/vp9_ratectrl.c.o vp9/encoder/vp9_rdopt.c.o vp9/encoder/vp9_sad_c.c.o vp9/encoder/vp9_segmentation.c.o vp9/encoder/vp9_subexp.c.o vp9/encoder/vp9_tokenize.c.o vp9/encoder/vp9_treewriter.c.o vp9/encoder/vp9_variance_c.c.o vp9/encoder/vp9_vaq.c.o vp9/encoder/vp9_temporal_filter.c.o vp9/encoder/vp9_mbgraph.c.o vp9/encoder/x86/vp9_variance_mmx.c.o vp9/encoder/x86/vp9_variance_sse2.c.o vp9/encoder/x86/vp9_dct_sse2.c.o vp9/encoder/x86/vp9_dct32x32_sse2.c.o vp9/vp9_dx_iface.c.o vp9/decoder/vp9_dboolhuff.c.o vp9/decoder/vp9_decodemv.c.o vp9/decoder/vp9_decodframe.c.o vp9/decoder/vp9_detokenize.c.o vp9/decoder/vp9_thread.c.o vp9/decoder/vp9_onyxd_if.c.o vp9/decoder/vp9_dsubexp.c.o vpx_config.c.o vpx_ports/emms.asm.o vpx_ports/x86_abi_support.asm.o vp8/common/x86/dequantize_mmx.asm.o vp8/common/x86/idctllm_mmx.asm.o vp8/common/x86/iwalsh_mmx.asm.o vp8/common/x86/loopfilter_mmx.asm.o vp8/common/x86/recon_mmx.asm.o vp8/common/x86/sad_mmx.asm.o vp8/common/x86/subpixel_mmx.asm.o vp8/common/x86/variance_impl_mmx.asm.o vp8/common/x86/idctllm_sse2.asm.o vp8/common/x86/recon_sse2.asm.o vp8/common/x86/sad_sse2.asm.o vp8/common/x86/subpixel_sse2.asm.o vp8/common/x86/loopfilter_sse2.asm.o vp8/common/x86/iwalsh_sse2.asm.o vp8/common/x86/variance_impl_sse2.asm.o vp8/common/x86/loopfilter_block_sse2.asm.o vp8/encoder/x86/dct_mmx.asm.o vp8/encoder/x86/subtract_mmx.asm.o vp8/encoder/x86/dct_sse2.asm.o vp8/encoder/x86/fwalsh_sse2.asm.o vp8/encoder/x86/subtract_sse2.asm.o vp8/encoder/x86/temporal_filter_apply_sse2.asm.o vp8/encoder/x86/quantize_mmx.asm.o vp8/encoder/x86/encodeopt.asm.o vp8/encoder/x86/ssim_opt.asm.o vp9/common/x86/vp9_loopfilter_mmx.asm.o vp9/common/x86/vp9_subpixel_8t_sse2.asm.o vp9/common/x86/vp9_copy_sse2.asm.o vp9/common/x86/vp9_intrapred_sse2.asm.o vp9/encoder/x86/vp9_variance_impl_mmx.asm.o vp9/encoder/x86/vp9_sad_mmx.asm.o vp9/encoder/x86/vp9_variance_impl_sse2.asm.o vp9/encoder/x86/vp9_sad4d_sse2.asm.o vp9/encoder/x86/vp9_subpel_variance_impl_sse2.asm.o vp9/encoder/x86/vp9_temporal_filter_apply_sse2.asm.o vp9/encoder/x86/vp9_error_sse2.asm.o vp9/encoder/x86/vp9_sad_sse2.asm.o vp9/encoder/x86/vp9_subtract_sse2.asm.o vp9/encoder/x86/vp9_subpel_variance.asm.o vp9/encoder/x86/vp9_ssim_opt.asm.o third_party/x86inc/x86inc.asm.o -lpthread -lm
vp9/encoder/vp9_encodemb.c.o: In function `subtract_plane':
vp9_encodemb.c:(.text+0x105): undefined reference to `vp9_subtract_block_sse2'
vp9/encoder/vp9_encodemb.c.o: In function `vp9_encode_block_intra':
vp9_encodemb.c:(.text+0x2952): undefined reference to `vp9_subtract_block_sse2'
vp9_encodemb.c:(.text+0x2a72): undefined reference to `vp9_subtract_block_sse2'
vp9_encodemb.c:(.text+0x2b96): undefined reference to `vp9_subtract_block_sse2'
vp9_encodemb.c:(.text+0x2caf): undefined reference to `vp9_subtract_block_sse2'

[...]

collect2: error: ld returned 1 exit status
Makefile:354: recipe for target 'libvpx.so.1.3.0' failed
make[1]: *** [libvpx.so.1.3.0] Error 1
Makefile:17: recipe for target '.DEFAULT' failed
make: *** [.DEFAULT] Error 2
 * ERROR: media-libs/libvpx-1.3.0::gentoo failed (compile phase):
 *   emake failed

Full logs attached, as emerge --info

Reproducible: Always
Comment 1 Bertrand Jacquin 2014-01-26 11:19:51 UTC
Created attachment 368760 [details]
build.log
Comment 2 Bertrand Jacquin 2014-01-26 11:20:07 UTC
Created attachment 368762 [details]
emerge --info
Comment 3 Mirko Langisch 2014-01-31 09:48:24 UTC
http://code.google.com/p/webm/issues/detail?id=666

it's impossible to build with sse2 disabled (and sseN enabled), because of these shared macros
Comment 4 Bertrand Jacquin 2014-02-01 17:16:04 UTC
(In reply to nort obor from comment #3)
> http://code.google.com/p/webm/issues/detail?id=666
> 
> it's impossible to build with sse2 disabled (and sseN enabled), because of
> these shared macros

As I read it from the URL you posted, the build fail if ssse3 in enabled, and sse2 disable.

In the current case, ssse3 is disabled and sse2 is enable.
Comment 5 Mirko Langisch 2014-02-04 09:33:36 UTC
Sorry, Bertrand, i overread that you actually had sse2 enabled m(

I was looking for a bug like the one i hit, and it looked familiar on the first glance
Comment 6 Thibaud CANALE 2014-07-09 09:16:38 UTC
Hello,

Any update about those errors, please?

I wonder, why are VP8 and VP9 in the same package/code? Is there anyway to disable VP9 meanwhile the bug is fixed?

Thanks for support.
Comment 7 Denis Dupeyron (RETIRED) gentoo-dev 2014-07-21 16:28:24 UTC
Current git HEAD also does not compile with the same errors. This is intriguing because 3 weeks ago there was a commit for an x32-related fix in build/make.configure.sh, and I assume they at least built it to verify.

As a test I tried to build libvpx with no CPU flags or just mmx to get rid of the sse2/sse3. In this case it fails with "not a valid base/index expression" assembly errors while building third_party/libyuv/source/scale.c. Then enabling sse requires sse2 so you get the errors mentioned by posters above.

The funny thing, and maybe a clue, is that even with ssse3 disabled it still complains it can't find some ssse3 references.

This is annoying because libvpx is a hard dependency of any recent firefox, and chromium isn't supported on x32.

Denis.
Comment 8 Chase Rayfield 2014-09-29 00:34:58 UTC
I was able to build libvpx-9999 with USE="threads" and without the assembly optimisation flags... so it can built no reason to set it as a blocker for firefox etc... It would be nice to have those optimisations though.
Comment 9 Dainius Masiliūnas 2016-02-24 10:37:36 UTC
Created attachment 426398 [details]
Second build.log

I am getting a slightly different error (yasm not found), but I guess the idea is the same.
Comment 10 Dainius Masiliūnas 2016-02-24 11:06:59 UTC
After manually emerging yasm (this should really be required in the ebuild), I got the same errors as in the OP. The workaround in Comment #8 works for 1.4.0 too: as long as ssse3, sse2, sse and mmx are turned off, emerging libvpx succeeds. I didn't need to disable sse3 (but maybe because it's not actually used).
Comment 11 Mike Gilbert gentoo-dev 2016-02-24 21:37:36 UTC
(In reply to Dainius Masiliūnas from comment #9)

That's a much different error. Report a new bug for that.
Comment 12 Dainius Masiliūnas 2016-02-25 00:02:09 UTC
(In reply to Mike Gilbert from comment #11)
> That's a much different error. Report a new bug for that.

All right then, reported as bug #575588.
Comment 13 Steven Newbury 2017-03-06 22:58:11 UTC
Created attachment 466184 [details, diff]
Fix x32 build support
Comment 14 Larry the Git Cow gentoo-dev 2021-12-30 04:21:23 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73bb5c035a58480d2a455619a02f4097b1e58a10

commit 73bb5c035a58480d2a455619a02f4097b1e58a10
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-12-30 04:20:43 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-12-30 04:21:14 +0000

    media-libs/libvpx: add 1.11.0
    
    Notably now forcing specific targets only where we
    know libvpx works well and otherwise using
    the generic implementation due to
    runtime breakage (and extensive test failures).
    
    Closes: https://bugs.gentoo.org/830254
    Bug: https://bugs.gentoo.org/814668
    Bug: https://bugs.gentoo.org/700902
    Bug: https://bugs.gentoo.org/746173
    Bug: https://bugs.gentoo.org/499336
    Signed-off-by: Sam James <sam@gentoo.org>

 media-libs/libvpx/Manifest             |   2 +
 media-libs/libvpx/libvpx-1.11.0.ebuild | 136 +++++++++++++++++++++++++++++++++
 2 files changed, 138 insertions(+)
Comment 15 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-03 12:47:12 UTC
(In reply to Steven Newbury from comment #13)
> Created attachment 466184 [details, diff] [details, diff]
> Fix x32 build support

Still needed?