[Bug 763940] New: 'configure' with using system libav always fails with "Uncompatible libavcodec found"
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Sun Mar 20 13:43:25 UTC 2016
https://bugzilla.gnome.org/show_bug.cgi?id=763940
Bug ID: 763940
Summary: 'configure' with using system libav always fails with
"Uncompatible libavcodec found"
Classification: Platform
Product: GStreamer
Version: 1.7.91
OS: Linux
Status: NEW
Severity: normal
Priority: Normal
Component: gst-libav
Assignee: gstreamer-bugs at lists.freedesktop.org
Reporter: nexfwall at yandex.ru
QA Contact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
Created attachment 324361
--> https://bugzilla.gnome.org/attachment.cgi?id=324361&action=edit
Patch
Output from configure:
checking for LIBAV... yes
checking for SWSCALE... yes
checking avi.h usability... no
checking avi.h presence... no
checking for avi.h... no
configure: Using system-installed libav code
checking whether libav is provided by FFmpeg... no
configure: error: Uncompatible libavcodec found
Checked configure.ac and found what it checks version based on
<libavcodec/avcodec.h>, and checking LIBAVCODEC_VERSION_MICRO >= 100.
But this is ffmpeg 3.0:
[nexfwall at VPCYB1S1R-OS00 RPMBuild]$ grep "LIBAVCODEC_VERSION_MICRO"
/usr/include/ffmpeg/libavcodec/version.h
#define LIBAVCODEC_VERSION_MICRO 102
Also found, what it saves CPPFLAGS to a var, and then appends libav pkg-config
flags. But restore them before checking libavcodec version:
...
PKG_CHECK_MODULES(SWSCALE, libswscale libavutil)
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $LIBAV_CFLAGS"
AC_CHECK_HEADERS([avi.h])
CPPFLAGS="$saved_CPPFLAGS"
AC_DEFINE([LIBAV_SOURCE], ["system install"], [Describes where the Libav
libraries come from.])
...
But it should restore it only after checking libav provider version. After
this:
...
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <libavcodec/avcodec.h>
]],[[
#if LIBAVCODEC_VERSION_MICRO >= 100
/* FFmpeg uses 100+ as its micro version */
#else
#error libav provider should be FFmpeg
#endif
]])], [is_ffmpeg=yes], [is_ffmpeg=no])
AC_MSG_RESULT([$is_ffmpeg])
...
So here is the patch. Now configure runs properly.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list