[FFmpeg-devel] [PATCH] Fix link errors when HAVE_X86ASM is not defined

Hendrik Leppkes h.leppkes at gmail.com
Wed Nov 21 16:09:01 EET 2018


On Wed, Nov 21, 2018 at 2:21 PM Derek Buitenhuis
<derek.buitenhuis at gmail.com> wrote:
>
> On 21/11/2018 02:47, Haihao Xiang wrote:
> > This fixes the link errors below:
> >
> > LD      ffmpeg_g
> > libavfilter/libavfilter.so: undefined reference to `ff_scene_sad_avx2'
> > libavfilter/libavfilter.so: undefined reference to `ff_scene_sad_sse2'
> > collect2: error: ld returned 1 exit status
> > Makefile:108: recipe for target 'ffmpeg_g' failed
> > make: *** [ffmpeg_g] Error 1
> >
> > Signed-off-by: Haihao Xiang<haihao.xiang at intel.com>
> > ---
> >   libavfilter/x86/scene_sad_init.c | 10 ++++++++++
> >   1 file changed, 10 insertions(+)
>
> We require dead code elimination to build FFmpeg, so this shouldn't be needed.
>

This does not apply here, the function is called unconditionally on
x86 (or rather on ARCH_X86)
What we usually do is just put the contents of such functions into the
guard, and not the init function itself - instead of having a second
one.

- Hendrik


More information about the ffmpeg-devel mailing list