[MPlayer-dev-eng] Linker error with last svn

Ivan Kalvachev ikalvachev at gmail.com
Sun Mar 10 14:58:36 CET 2013


On 3/10/13, Vicente Sendra <visenri at yahoo.es> wrote:
> --- El jue, 7/3/13, Josh <joshf87 at live.com> escribió:
>
>> De: Josh <joshf87 at live.com>
>> Asunto: Re: [MPlayer-dev-eng] Linker error with last svn
>> Para: mplayer-dev-eng at mplayerhq.hu
>> Fecha: jueves, 7 de marzo, 2013 06:15
>> You aren't supposed to use --enable-*
>> for other than internal mplayer features unless you know
>> what you're doing. If a lib is properly 'installed' then
>> MPlayer's configure script should pick it up. Run
>> './configure --enable-static', and look at config.log for
>> 'Checking for MNG support' and tell us what that says.
>>
>> The link you posted is the mingw I uploaded and as of
>> current svn/ffmpeg git am not getting the error and able to
>> successfully link with libmng.
>
> I just used these options the first time i compiled mplayer, picked them
> from http://oss.netfarm.it/mplayer-win32.php.
>
> Until now, it compiled fine, i didn't pay much attention to the configure
> script, it just worked.
>
> I solved it yesterday, and i think you should apply a patch to retain old
> behavior when using --enable-mng:
>
> In r35196 configure:
> -----------------------------------------------------
> echocheck "MNG support"
> if test "$_mng" = auto ; then
>   _mng=no
>   return_statement_check libmng.h 'const char * p_ver = mng_version_text()'
> '!p_ver || p_ver[0] == 0' -lmng -lz && _mng=yes
> fi
> echores "$_mng"
> if test "$_mng" = yes ; then
>   def_mng='#define CONFIG_MNG 1'
>   extra_ldflags="$extra_ldflags -lmng -lz"
>   vomodules="mng $vomodules"
> else
>   def_mng='#undef CONFIG_MNG'
>   novomodules="mng $novomodules"
> fi
> -----------------------------------------------------
>
> Current configure
> -----------------------------------------------------
> echocheck "MNG support"
> if test "$_mng" = auto ; then
>   _mng=no
>   for mnglibs in '-lmng -lz' '-lmng -ljpeg -lz' ; do
>     return_statement_check libmng.h 'const char * p_ver =
> mng_version_text()' '!p_ver || p_ver[0] == 0' $mnglibs && _mng=yes
>   done
> fi
> echores "$_mng"
> if test "$_mng" = yes ; then
>   def_mng='#define CONFIG_MNG 1'
>   extra_ldflags="$extra_ldflags $mnglibs"
>   vomodules="mng $vomodules"
> else
>   def_mng='#undef CONFIG_MNG'
>   novomodules="mng $novomodules"
> fi
> -----------------------------------------------------
>
> With the new script, when "$_mng" == yes (forced by --enable-mng), $mnglibs
> is not initialized and results in a linker error because "-lmng -lz" is not
> added to extra_ldflags, an small patch solves the problem retaining old
> behavior in this case.
>

You were already told to don't use --enable- for stuff that is autodetected.
It is equivalent of  --force-  and it would skip the library detection.

Remove the --enable-mng and see if it detects it properly.


More information about the MPlayer-dev-eng mailing list