Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 447046 - media-libs/libvpx-1.1.0 fix building on arm hardfloat with glibc-2.16.0
Summary: media-libs/libvpx-1.1.0 fix building on arm hardfloat with glibc-2.16.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: ARM Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-12-12 22:17 UTC by Markus Meier
Modified: 2013-06-25 21:01 UTC (History)
2 users (show)

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


Attachments
libvpx-1.1.0-arm-hardfp.patch (libvpx-1.1.0-arm-hardfp.patch,702 bytes, patch)
2012-12-12 22:17 UTC, Markus Meier
Details | Diff
libcpx-1.1.0-arm-hardfp.patch (libvpx-1.1.0-hardfp.patch,988 bytes, patch)
2013-01-30 21:46 UTC, Vladimir Smirnov (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Meier gentoo-dev 2012-12-12 22:17:23 UTC
Created attachment 332172 [details, diff]
libvpx-1.1.0-arm-hardfp.patch

this is kind of related to bug #323815.

problem is that softfp flags are appended to ${CFLAGS}, which causes failure in pthread detection as /usr/include/gnu/stubs.h is included, which tries to include stubs-soft.h which does not exist on hardfloat (it's called gnu/stubs-hard.h).
Comment 1 Yixun Lan archtester gentoo-dev 2013-01-10 07:31:25 UTC
I could confirm that this patch works fine
On my pandaboard, with armv7a-hardfloat-linux-gnueabi- profile
my make.conf settings as follow:
PANDA_TUNE="-march=armv7-a -mtune=cortex-a9 -mfloat-abi=hard"
CFLAGS="-O2 -pipe ${FPU_TUNE} ${PANDA_TUNE} ${DEBUG}"
CXXFLAGS="${CFLAGS}"

without this patch, it will force to softfloat by default, thus come to cflags as follow which is wrong: armv7a-hardfloat-linux-gnueabi-as --defsym ARCHITECTURE=7 -mfpu=neon -mcpu=cortex-a8 -mfloat-abi=softfp

it overwrite the one from /etc/portage/make.conf

thus got following wired error:

armv7a-hardfloat-linux-gnueabi-as --defsym ARCHITECTURE=7 -mfpu=neon -mcpu=cortex-a8 -mfloat-abi=softfp -I./ -I"/var/tmp/portage/media-libs/libvpx-1.1.0/work/libvpx-v1.1.0"/ -o vp8/encoder/arm/neon/vp8_shortwalsh4x4_neon.asm.s.o vp8/encoder/arm/neon/vp8_shortwalsh4x4_neon.asm.s
armv7a-hardfloat-linux-gnueabi-gcc -shared -Wl,-O1 -Wl,--as-needed -Wl,--no-undefined -Wl,-soname,libvpx.so.1 -Wl,--version-script,libvpx.ver -o libvpx.so.1.1.0 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/vpxscale.c.o vpx_scale/generic/yv12config.c.o vpx_scale/generic/yv12extend.c.o vpx_scale/generic/gen_scalers.c.o vpx_scale/arm/neon/yv12extend_arm.c.o vp8/common/alloccommon.c.o vp8/common/asm_com_offsets.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/arm/filter_arm.c.o vp8/common/arm/loopfilter_arm.c.o vp8/common/arm/reconintra_arm.c.o vp8/common/arm/dequantize_arm.c.o vp8/common/arm/variance_arm.c.o vp8/common/arm/bilinearfilter_arm.c.o vp8/common/arm/armv6/idct_blk_v6.c.o vp8/common/arm/neon/idct_blk_neon.c.o vp8/encoder/arm/dct_arm.c.o vp8/encoder/arm/quantize_arm.c.o vp8/encoder/arm/boolhuff_arm.c.o vp8/encoder/arm/neon/picklpf_arm.c.o vp8/vp8_cx_iface.c.o vp8/encoder/asm_enc_offsets.c.o vp8/encoder/bitstream.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/vp8_dx_iface.c.o vp8/decoder/asm_dec_offsets.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 vpx_config.c.o vpx_ports/arm_cpudetect.c.o vpx_scale/arm/neon/vp8_vpxyv12_copyframe_func_neon.asm.s.o vpx_scale/arm/neon/vp8_vpxyv12_copy_y_neon.asm.s.o vpx_scale/arm/neon/vp8_vpxyv12_copysrcframe_func_neon.asm.s.o vpx_scale/arm/neon/vp8_vpxyv12_extendframeborders_neon.asm.s.o vp8/common/arm/armv6/bilinearfilter_v6.asm.s.o vp8/common/arm/armv6/copymem8x4_v6.asm.s.o vp8/common/arm/armv6/copymem8x8_v6.asm.s.o vp8/common/arm/armv6/copymem16x16_v6.asm.s.o vp8/common/arm/armv6/dc_only_idct_add_v6.asm.s.o vp8/common/arm/armv6/iwalsh_v6.asm.s.o vp8/common/arm/armv6/filter_v6.asm.s.o vp8/common/arm/armv6/idct_v6.asm.s.o vp8/common/arm/armv6/loopfilter_v6.asm.s.o vp8/common/arm/armv6/simpleloopfilter_v6.asm.s.o vp8/common/arm/armv6/sixtappredict8x4_v6.asm.s.o vp8/common/arm/armv6/intra4x4_predict_v6.asm.s.o vp8/common/arm/armv6/dequant_idct_v6.asm.s.o vp8/common/arm/armv6/dequantize_v6.asm.s.o vp8/common/arm/armv6/vp8_sad16x16_armv6.asm.s.o vp8/common/arm/armv6/vp8_variance8x8_armv6.asm.s.o vp8/common/arm/armv6/vp8_variance16x16_armv6.asm.s.o vp8/common/arm/armv6/vp8_variance_halfpixvar16x16_h_armv6.asm.s.o vp8/common/arm/armv6/vp8_variance_halfpixvar16x16_v_armv6.asm.s.o vp8/common/arm/armv6/vp8_variance_halfpixvar16x16_hv_armv6.asm.s.o vp8/common/arm/neon/bilinearpredict4x4_neon.asm.s.o vp8/common/arm/neon/bilinearpredict8x4_neon.asm.s.o vp8/common/arm/neon/bilinearpredict8x8_neon.asm.s.o vp8/common/arm/neon/bilinearpredict16x16_neon.asm.s.o vp8/common/arm/neon/copymem8x4_neon.asm.s.o vp8/common/arm/neon/copymem8x8_neon.asm.s.o vp8/common/arm/neon/copymem16x16_neon.asm.s.o vp8/common/arm/neon/dc_only_idct_add_neon.asm.s.o vp8/common/arm/neon/iwalsh_neon.asm.s.o vp8/common/arm/neon/loopfilter_neon.asm.s.o vp8/common/arm/neon/loopfiltersimplehorizontaledge_neon.asm.s.o vp8/common/arm/neon/loopfiltersimpleverticaledge_neon.asm.s.o vp8/common/arm/neon/mbloopfilter_neon.asm.s.o vp8/common/arm/neon/shortidct4x4llm_neon.asm.s.o vp8/common/arm/neon/sad8_neon.asm.s.o vp8/common/arm/neon/sad16_neon.asm.s.o vp8/common/arm/neon/sixtappredict4x4_neon.asm.s.o vp8/common/arm/neon/sixtappredict8x4_neon.asm.s.o vp8/common/arm/neon/sixtappredict8x8_neon.asm.s.o vp8/common/arm/neon/sixtappredict16x16_neon.asm.s.o vp8/common/arm/neon/buildintrapredictorsmby_neon.asm.s.o vp8/common/arm/neon/save_reg_neon.asm.s.o vp8/common/arm/neon/dequant_idct_neon.asm.s.o vp8/common/arm/neon/idct_dequant_full_2x_neon.asm.s.o vp8/common/arm/neon/idct_dequant_0_2x_neon.asm.s.o vp8/common/arm/neon/dequantizeb_neon.asm.s.o vp8/common/arm/neon/variance_neon.asm.s.o vp8/common/arm/neon/vp8_subpixelvariance8x8_neon.asm.s.o vp8/common/arm/neon/vp8_subpixelvariance16x16_neon.asm.s.o vp8/common/arm/neon/vp8_subpixelvariance16x16s_neon.asm.s.o vp8/encoder/arm/armv5te/boolhuff_armv5te.asm.s.o vp8/encoder/arm/armv5te/vp8_packtokens_armv5.asm.s.o vp8/encoder/arm/armv5te/vp8_packtokens_mbrow_armv5.asm.s.o vp8/encoder/arm/armv5te/vp8_packtokens_partitions_armv5.asm.s.o vp8/encoder/arm/armv6/vp8_subtract_armv6.asm.s.o vp8/encoder/arm/armv6/vp8_short_fdct4x4_armv6.asm.s.o vp8/encoder/arm/armv6/vp8_fast_quantize_b_armv6.asm.s.o vp8/encoder/arm/armv6/vp8_mse16x16_armv6.asm.s.o vp8/encoder/arm/armv6/walsh_v6.asm.s.o vp8/encoder/arm/neon/fastquantizeb_neon.asm.s.o vp8/encoder/arm/neon/shortfdct_neon.asm.s.o vp8/encoder/arm/neon/subtract_neon.asm.s.o vp8/encoder/arm/neon/vp8_mse16x16_neon.asm.s.o vp8/encoder/arm/neon/vp8_memcpy_neon.asm.s.o vp8/encoder/arm/neon/vp8_shortwalsh4x4_neon.asm.s.o -lm
vp8/common/generic/systemdependent.c.o: In function `vp8_machine_specific_config':
systemdependent.c:(.text+0x3c): undefined reference to `pthread_once'
vp8/encoder/encodeframe.c.o: In function `vp8_encode_frame':
encodeframe.c:(.text+0x1908): undefined reference to `sem_post'
encodeframe.c:(.text+0x1b30): undefined reference to `sem_post'
encodeframe.c:(.text+0x1b60): undefined reference to `sem_wait'
vp8/encoder/ethreading.c.o: In function `thread_loopfilter':
ethreading.c:(.text+0x28): undefined reference to `sem_wait'
ethreading.c:(.text+0x68): undefined reference to `sem_post'
vp8/encoder/ethreading.c.o: In function `thread_encoding_proc':
ethreading.c:(.text+0x124): undefined reference to `sem_wait'
ethreading.c:(.text+0x914): undefined reference to `sem_post'
vp8/encoder/ethreading.c.o: In function `vp8cx_create_encoder_threads':
ethreading.c:(.text+0x12bc): undefined reference to `sem_init'
ethreading.c:(.text+0x134c): undefined reference to `sem_init'
ethreading.c:(.text+0x137c): undefined reference to `pthread_create'
ethreading.c:(.text+0x13a8): undefined reference to `sem_init'
ethreading.c:(.text+0x13bc): undefined reference to `sem_init'
ethreading.c:(.text+0x13e8): undefined reference to `pthread_create'
vp8/encoder/ethreading.c.o: In function `vp8cx_remove_encoder_threads':
ethreading.c:(.text+0x14e8): undefined reference to `sem_post'
ethreading.c:(.text+0x14fc): undefined reference to `pthread_join'
ethreading.c:(.text+0x1508): undefined reference to `sem_destroy'
ethreading.c:(.text+0x1524): undefined reference to `sem_post'
ethreading.c:(.text+0x1538): undefined reference to `pthread_join'
ethreading.c:(.text+0x1540): undefined reference to `sem_destroy'
ethreading.c:(.text+0x1548): undefined reference to `sem_destroy'
ethreading.c:(.text+0x1550): undefined reference to `sem_destroy'
vp8/encoder/onyx_if.c.o: In function `vp8_change_config':
onyx_if.c:(.text+0x1ce4): undefined reference to `sem_wait'
vp8/encoder/onyx_if.c.o: In function `vp8_loopfilter_frame':
onyx_if.c:(.text+0x3828): undefined reference to `sem_post'
vp8/encoder/onyx_if.c.o: In function `vp8_get_preview_raw_frame':
onyx_if.c:(.text+0x3b00): undefined reference to `sem_wait'
vp8/encoder/onyx_if.c.o: In function `encode_frame_to_data_rate':
onyx_if.c:(.text+0x4790): undefined reference to `sem_post'
onyx_if.c:(.text+0x4ce8): undefined reference to `sem_wait'
onyx_if.c:(.text+0x6108): undefined reference to `sem_wait'
onyx_if.c:(.text+0x647c): undefined reference to `sem_wait'
vp8/decoder/threading.c.o: In function `thread_decoding_proc':
threading.c:(.text+0xf00): undefined reference to `sem_wait'
threading.c:(.text+0xf70): undefined reference to `sem_post'
vp8/decoder/threading.c.o: In function `vp8_decoder_create_threads':
threading.c:(.text+0x114c): undefined reference to `sem_init'
threading.c:(.text+0x1184): undefined reference to `pthread_create'
threading.c:(.text+0x11a8): undefined reference to `sem_init'
vp8/decoder/threading.c.o: In function `vp8_decoder_remove_threads':
threading.c:(.text+0x1998): undefined reference to `sem_post'
threading.c:(.text+0x19ac): undefined reference to `pthread_join'
threading.c:(.text+0x19dc): undefined reference to `sem_destroy'
threading.c:(.text+0x19fc): undefined reference to `sem_destroy'
vp8/decoder/threading.c.o: In function `vp8mt_decode_mb_rows':
threading.c:(.text+0x1e30): undefined reference to `sem_post'
threading.c:(.text+0x1e68): undefined reference to `sem_wait'
collect2: error: ld returned 1 exit status
make[1]: *** [libvpx.so.1.1.0] Error 1
make: *** [.DEFAULT] Error 2
 * ERROR: media-libs/libvpx-1.1.0 failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=media-libs/libvpx-1.1.0'`,
 * the complete build log and the output of `emerge -pqv '=media-libs/libvpx-1.1.0'`.
 * The complete build log is located at '/var/tmp/portage/media-libs/libvpx-1.1.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-libs/libvpx-1.1.0/temp/environment'.
 * Working directory: '/var/tmp/portage/media-libs/libvpx-1.1.0/work/libvpx-v1.1.0'
 * S: '/var/tmp/portage/media-libs/libvpx-1.1.0/work/libvpx-v1.1.0'
!!! <libvpx-1.1.0> Compile Fail: store temp directory
Comment 2 Rick Farina (Zero_Chaos) gentoo-dev 2013-01-12 20:30:40 UTC
this patch doesn't seem to apply and looking at the configure.sh it is completely different than this patch for version 1.1.0, not sure how this patch was made.

Looking at the libvpx configure.sh it looks like upstream makes a lot of assumptions and forces wierd cflags and we should get this fixed upstream.
Comment 3 Vladimir Smirnov (RETIRED) gentoo-dev 2013-01-30 21:46:42 UTC
Created attachment 337348 [details, diff]
libcpx-1.1.0-arm-hardfp.patch

Works for me. But I've made some improvments to patch, to make it more sane, but it uses grep now...

It makes build/make/configure.sh to check if some of cflags are already specified, and only if not it adds something from itself.
Comment 4 Alexis Ballier gentoo-dev 2013-06-25 21:01:05 UTC
+  25 Jun 2013; Alexis Ballier <aballier@gentoo.org>
+  libvpx-1.2.0_pre20130625.ebuild, +files/libvpx-1.2.0_pre20130625-armv7.patch:
+  Backport upstream fix for armv7 hardfloat support. Bug #447046.
+