mplayer fails to build on non-sse2 x86 cpu
Hello, mplayer-r35150 fails to link on non-sse2 x86 cpu (Athlon-XP): ffmpeg/libavcodec/libavcodec.a(ac3dsp_init.o): In function `ff_ac3dsp_init_x86': ac3dsp_init.c:(.text.unlikely+0x6c): undefined reference to `ff_ac3_exponent_min_sse2' ac3dsp_init.c:(.text.unlikely +0x88): undefined reference to `ff_ac3_extract_exponents_sse2' collect2: ld returned 1 exit status The same stand-alone version of ffmpeg (as fetched by configure script in mplayer) builds fine. The problem is in different definition of HAVE_${INSTRUCTION_SET}_EXTERNAL flags in ffmpeg and mplayer: ffmpeg defines them unconditionally (for a whole target architecture), while mplayer defines them conditionally — only in an appropriate instruction set is present in the target cpu. For the issue I encountered libavcodec/x86/ac3dsp.asm contains: %if HAVE_SSE2_EXTERNAL INIT_XMM AC3_EXPONENT_MIN sse2 %endif This code is compiled by ffmpeg, used during linking, but not during runtime, because of the following check in ac3dsp_init.c: if (mm_flags & AV_CPU_FLAG_SSE2 && HAVE_SSE) As a solution mplayer should mimic ffmpeg's behaviour for defining HAVE_*_EXTERNAL cpu flags. Best regards, Andrew Savchenko
--- On Thu, 9/6/12, Andrew Savchenko <bircoph@gmail.com> wrote:
From: Andrew Savchenko <bircoph@gmail.com> Subject: [MPlayer-advusers] mplayer fails to build on non-sse2 x86 cpu To: mplayer-advusers@mplayerhq.hu Date: Thursday, September 6, 2012, 3:14 PM Hello,
mplayer-r35150 fails to link on non-sse2 x86 cpu (Athlon-XP):
ffmpeg/libavcodec/libavcodec.a(ac3dsp_init.o): In function `ff_ac3dsp_init_x86': ac3dsp_init.c:(.text.unlikely+0x6c): undefined reference to `ff_ac3_exponent_min_sse2' ac3dsp_init.c:(.text.unlikely +0x88): undefined reference to `ff_ac3_extract_exponents_sse2' collect2: ld returned 1 exit status
The same stand-alone version of ffmpeg (as fetched by configure script in mplayer) builds fine.
The problem is in different definition of HAVE_${INSTRUCTION_SET}_EXTERNAL flags in ffmpeg and mplayer: ffmpeg defines them unconditionally (for a whole target architecture), while mplayer defines them conditionally — only in an appropriate instruction set is present in the target cpu.
For the issue I encountered libavcodec/x86/ac3dsp.asm contains: %if HAVE_SSE2_EXTERNAL INIT_XMM AC3_EXPONENT_MIN sse2 %endif
This code is compiled by ffmpeg, used during linking, but not during runtime, because of the following check in ac3dsp_init.c: if (mm_flags & AV_CPU_FLAG_SSE2 && HAVE_SSE)
As a solution mplayer should mimic ffmpeg's behaviour for defining HAVE_*_EXTERNAL cpu flags.
Is this still an issue? The current ffmpeg git have explicit checks for the HAVE_SSE2_EXTERNAL, through the EXTERNAL_SSE2() macro.
Hello, On Mon, 10 Sep 2012 07:22:29 -0700 (PDT) Ivan Kalvatchev wrote:
Is this still an issue?
The current ffmpeg git have explicit checks for the HAVE_SSE2_EXTERNAL, through the EXTERNAL_SSE2() macro.
Sorry for a late reply, I was without a connectivity for a while. This issue is fixed now with current ffmpeg and mplayer snapshots. Best regards, Andrew Savchenko
participants (2)
-
Andrew Savchenko -
Ivan Kalvatchev