Opened 13 years ago
Closed 12 years ago
#1241 closed defect (fixed)
ffmpeg build is trying to compile 'neon' although this instruction set is disabled @ ./configure ( '--disable-neon' )
Reported by: | nadavrub | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | build system |
Version: | git-master | Keywords: | arm neon build |
Cc: | Mike Z | Blocked By: | |
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
Environment
OS | Ubuntu 11.10 |
RELEASE | 0.10.2.git |
Platform | Android |
neon | --disable-neon |
optimizations | --disable-optimizations |
Problem
Problem | ffmpeg build is trying to compile 'neon' although this instruction set is disabled @ ./configure ( '--disable-neon' ) |
Symptom | libavcodec/libavcodec.so: undefined reference to `ff_pred16x16_vert_neon' ... |
Analysis | The problem is in affect ONLY when compiling with '--disable-optimizations', going though the code, at multiple places the line 'if (HAVE_NEON)' is used, my assumption is that when the optimizer is on, the 'if (HAVE_NEON)' phrases are omitted from compilation, and, when the optimization is disabled, they ( neon phrases ) are not, and thus, the import table for neon instructions @ 'if (false)' phrases is added the neon instructions ( although they are not used by the code ), and this, leads to the undefined reference linker error. |
Attachments (3)
Change History (17)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Component: | avcodec → build system |
---|---|
Keywords: | arm added |
Which compiler and version are you using?
The error message you provide does not match the configure options you mentioned.
Please provide your configure line and please run make, run make again, then run "make V=1" and post the complete output (please do not post the complete output of the first make run).
comment:3 by , 13 years ago
compiler
The one provided with NDK7B ( arm-linux-androideabi-4.4.3 )
configure
../../Multimedia/ffmpeg/configure \
--logfile="configure.log" \
--cross-prefix=arm-linux-androideabi- \
--arch=arm \
--target-os=linux \
--disable-everything \
--disable-pthreads \
--disable-stripping \
--enable-debug=3 \
--enable-version3 \
--enable-libx264 \
--enable-demuxer=mov \
--enable-demuxer=rtsp \
--enable-muxer=asf \
--enable-muxer=asf_stream \
--enable-muxer=mov \
--enable-muxer=mp4 \
--enable-muxer=ffm \
--enable-encoder=h264 \
--enable-decoder=h264 \
--enable-demuxer=ffm \
--enable-parser=h264 \
--enable-protocol=file \
--enable-protocol=rtp \
--enable-nonfree \
--enable-gpl \
--enable-postproc \
--extra-cflags="-I/home/nadav/workspace/Android/x264 -I/home/nadav/workspace/Multimedia/x264 -gstabs+" \
--extra-ldflags="-L/home/nadav/workspace/Android/x264" \
--enable-static \
--enable-shared \
--disable-neon \
--disable-optimizations
make V=1
arm-linux-androideabi-gcc -Llibavcodec -Llibavdevice -Llibavfilter -Llibavformat -Llibavutil -Llibpostproc -Llibswscale -Llibswresample -L/home/nadav/workspace/Android/x264 -Wl,--as-needed -Wl,--warn-common -Wl,-rpath-link=libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil -o ffmpeg_g ffmpeg.o cmdutils.o -lavdevice -lavfilter -lavformat -lavcodec -lpostproc -lswresample -lswscale -lavutil -lx264 -lm -lz
undefined reference
libavcodec/libavcodec.so: undefined reference to `ff_pred16x16_vert_neon'
libavcodec/libavcodec.so: undefined reference to `ff_pred8x8_l0t_dc_neon'
libavcodec/libavcodec.so: undefined reference to `ff_biweight_h264_pixels_4_neon'
libavcodec/libavcodec.so: undefined reference to `ff_pred16x16_left_dc_neon'
libavcodec/libavcodec.so: undefined reference to `ff_h264_idct_add16_neon'
libavcodec/libavcodec.so: undefined reference to `ff_h264_idct8_add4_neon'
libavcodec/libavcodec.so: undefined reference to `ff_pred8x8_dc_neon'
libavcodec/libavcodec.so: undefined reference to `ff_pred8x8_0l0_dc_neon'
libavcodec/libavcodec.so: undefined reference to `ff_h264_v_loop_filter_luma_neon'
libavcodec/libavcodec.so: undefined reference to `ff_pred8x8_top_dc_neon'
libavcodec/libavcodec.so: undefined reference to `ff_biweight_h264_pixels_16_neon'
libavcodec/libavcodec.so: undefined reference to `ff_pred8x8_0lt_dc_neon'
libavcodec/libavcodec.so: undefined reference to `ff_pred8x8_hor_neon'
libavcodec/libavcodec.so: undefined reference to `ff_pred8x8_128_dc_neon'
libavcodec/libavcodec.so: undefined reference to `ff_pred8x8_plane_neon'
libavcodec/libavcodec.so: undefined reference to `ff_pred16x16_hor_neon'
libavcodec/libavcodec.so: undefined reference to `ff_weight_h264_pixels_8_neon'
libavcodec/libavcodec.so: undefined reference to `ff_biweight_h264_pixels_8_neon'
libavcodec/libavcodec.so: undefined reference to `ff_h264_v_loop_filter_chroma_neon'
libavcodec/libavcodec.so: undefined reference to `ff_pred16x16_top_dc_neon'
libavcodec/libavcodec.so: undefined reference to `ff_pred16x16_dc_neon'
libavcodec/libavcodec.so: undefined reference to `ff_weight_h264_pixels_4_neon'
libavcodec/libavcodec.so: undefined reference to `ff_pred8x8_left_dc_neon'
libavcodec/libavcodec.so: undefined reference to `ff_pred16x16_128_dc_neon'
libavcodec/libavcodec.so: undefined reference to `ff_h264_h_loop_filter_luma_neon'
libavcodec/libavcodec.so: undefined reference to `ff_pred8x8_vert_neon'
libavcodec/libavcodec.so: undefined reference to `ff_h264_idct_add8_neon'
libavcodec/libavcodec.so: undefined reference to `ff_pred8x8_l00_dc_neon'
libavcodec/libavcodec.so: undefined reference to `ff_h264_idct8_add_neon'
libavcodec/libavcodec.so: undefined reference to `ff_h264_idct_add16intra_neon'
libavcodec/libavcodec.so: undefined reference to `ff_h264_idct_dc_add_neon'
libavcodec/libavcodec.so: undefined reference to `ff_pred16x16_plane_neon'
libavcodec/libavcodec.so: undefined reference to `ff_h264_idct_add_neon'
libavcodec/libavcodec.so: undefined reference to `ff_weight_h264_pixels_16_neon'
libavcodec/libavcodec.so: undefined reference to `ff_h264_h_loop_filter_chroma_neon'
libavcodec/libavcodec.so: undefined reference to `ff_h264_idct8_dc_add_neon'
by , 13 years ago
Attachment: | patchneondsp.diff added |
---|
comment:5 by , 13 years ago
~/workspace/Multimedia/ffmpeg$ patch -p1 -i patchneondsp.diff
patching file libavcodec/arm/h264dsp_init_arm.c
Hunk #1 succeeded at 68 (offset 1 line).
Hunk #2 FAILED at 96.
1 out of 2 hunks FAILED -- saving rejects to file libavcodec/arm/h264dsp_init_arm.c.rej
patching file libavcodec/arm/h264pred_init_arm.c
Hunk #1 succeeded at 43 (offset 1 line).
Hunk #2 FAILED at 74.
1 out of 2 hunks FAILED -- saving rejects to file libavcodec/arm/h264pred_init_arm.c.rej
Also, attached, 'h264dsp_init_arm.c.rej' and 'h264pred_init_arm.c.rej'
comment:7 by , 13 years ago
Could you test if this problem is still reproducible?
Build problems can be important, but this is unlikely to get fixed without some help (I don't have an arm environment).
follow-up: 9 comment:8 by , 12 years ago
with this patch applied, --enable-optimize works, --enable-optimise --disable-neon also works.
This is the config line, which is about the simplest I could manage and have it build:
--prefix=/home/notzed/svn/ffmpeg-build/build/armeabi-v7a --cross-prefix=/usr/local/android-ndk-r7c/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- --enable-cross-compile --target-os=linux --sysroot=/usr/local/android-ndk-r7c/platforms/android-8/arch-arm/ --arch=arm --disable-optimizations
by , 12 years ago
Attachment: | patchneondsp2.diff added |
---|
comment:9 by , 12 years ago
Cc: | added |
---|
Replying to notzed:
with this patch applied, --enable-optimize works, --enable-optimise --disable-neon also works.
--enable-optimize ?
Your patch adds an externally visible symbol, does my new patch work for you?
comment:10 by , 12 years ago
Sure it does - it was copying the patch you provided: https://ffmpeg.org/trac/ffmpeg/attachment/ticket/1241/patchneondsp.diff
The new patch also works.
comment:11 by , 12 years ago
Which patch fixes what ?
ive tested several patches and configurations on NDK and none fixed anything.
comment:12 by , 12 years ago
Summary: | ffmpeg → ffmpeg build is trying to compile 'neon' although this instruction set is disabled @ ./configure ( '--disable-neon' ) |
---|
update summary based on dscription of the original report
follow-up: 14 comment:13 by , 12 years ago
Sorry I mean to update this a while ago but I couldn't find the bug number.
Without the patchneondsp2 diff, the command line i gave fails to build, with those neon_* symbols missing. With the patch it succeeds.
But I actually wanted neon turned on, so my case was slightly different, sorry if i just confused the matter by trying to help.
comment:14 by , 12 years ago
Keywords: | neon build added |
---|---|
Reproduced by developer: | set |
Resolution: | → fixed |
Status: | new → closed |
Version: | unspecified → git-master |
Replying to notzed:
Without the patchneondsp2 diff, the command line i gave fails to build, with those neon_* symbols missing. With the patch it succeeds.
thanks, ive been able to reproduce and fix the issue
One additional comment, using '--disable-optimizations' with ffmpeg@Android is mandatory so I'll B able to step through ffmpeg code while debugging on the device.