[MPlayer-dev-eng] [PATCH] Fix linking with libvorbis with --enable-libvorbis

Alexander Strasser eclipse7 at gmx.net
Sat Nov 14 15:41:45 CET 2015


On 2015-11-08 15:36 +0100, Bernd Kuhls wrote:
> when configured with --enable-libvorbis

  Why did you configure with --enable-libvorbis?

  It should just be autodetected by default and you
almost always shouldn't need to specify any extra
options for enabling.

> the test for libvorbis never
> happens because $_libvorbis contains "yes" in this case leading to
> link errors:
> http://autobuild.buildroot.net/results/7f6/7f6e5396e95a3c3b676ca59bedc5317aa88e5f4c/build-end.log
> /home/buildroot/buildroot-test/scripts/instance-0/output/build/mplayer-1.2/libmpcodecs/ad_libvorbis.c:248: undefined reference to `vorbis_synthesis_pcmout'
> /home/buildroot/buildroot-test/scripts/instance-0/output/build/mplayer-1.2/libmpcodecs/ad_libvorbis.c:248: undefined reference to `vorbis_synthesis_pcmout'
> /home/buildroot/buildroot-test/scripts/instance-0/output/build/mplayer-1.2/libmpcodecs/ad_libvorbis.c:254: undefined reference to `vorbis_synthesis'
> [...]

  It is by design and the reason why one of the last output
paragraph of every successful configure run looks like this:

  NOTE: The --enable-* parameters unconditionally force options on, completely
  skipping autodetection. This behavior is unlike what you may be used to from
  autoconf-based configure scripts that can decide to override you. This greater
  level of control comes at a price. You may have to provide the correct compiler
  and linker flags yourself.
  If you used one of these options (except --enable-menu and similar ones that
  turn on internal features) and experience a compilation or linking failure,
  make sure you have passed the necessary compiler/linker flags to configure.

> This patch fixes the problem.

  If that patch fixes your problem, why not just omit --enable-libvorbis ?

  Am I missing something?


> Signed-off-by: Bernd Kuhls <bernd.kuhls at t-online.de>
> diff -uNr MPlayer-1.2.org/configure MPlayer-1.2/configure
> --- MPlayer-1.2.org/configure	2015-10-02 22:29:04.000000000 +0200
> +++ MPlayer-1.2/configure	2015-11-08 15:03:26.382426269 +0100
> @@ -6538,7 +6538,7 @@
>    _tremor=no
>    statement_check tremor/ivorbiscodec.h 'vorbis_synthesis(0, 0)' -logg -lvorbisidec && _tremor=yes && _libvorbis=no
>  fi
> -if test "$_libvorbis" = auto; then
> +if test "$_libvorbis" != no; then
>    _libvorbis=no
>    for vorbislibs in '-lvorbisenc -lvorbis -logg' '-lvorbis -logg' ; do
>      statement_check vorbis/vorbisenc.h 'vorbis_encode_ctl(0, 0, 0); ogg_stream_clear(0)' $vorbislibs && _libvorbis=yes && break

More information about the MPlayer-dev-eng mailing list