From 7b0a5ad30981d28dba7a7415ee7e9e2d384780e2 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Sat, 20 May 2017 15:27:52 +0200 Subject: [PATCH] plugin: Explicitly link to BZ2, LZMA and LZ While all this information is in the .la files, libtool seems to get confused with ordering in presence of static system libraries. This could cause missing symbol error at link time. Adding these depenencies explicitly workaround the issue. --- configure.ac | 8 ++++++++ ext/libav/Makefile.am | 2 +- gst-libs/ext/Makefile.am | 13 ------------- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/configure.ac b/configure.ac index 6039592..1ee3c27 100644 --- a/configure.ac +++ b/configure.ac @@ -280,6 +280,9 @@ else LIBS=$save_LIBS if test "x$HAVE_BZ2" = "xno"; then AC_WARN([libbz2 not found, matroska demuxer will not be able to read bz2 tracks]) + BZ2_LIBS= + else + BZ2_LIBS="-lbz2" fi dnl *** Check for lzma @@ -291,6 +294,9 @@ else LIBS=$save_LIBS if test "x$HAVE_LZMA" = "xno"; then AC_WARN([lzma not found, tiff reader will not be able to read lzma files]) + LZMA_LIBS= + else + LZMA_LIBS="-llzma" fi dnl libgstlibav.la: include dirs @@ -465,6 +471,8 @@ AC_SUBST(SWSCALE_CFLAGS) AC_SUBST(SWSCALE_DEPS) AC_SUBST(SWSCALE_LIBS) AC_SUBST(WIN32_LIBS) +AC_SUBST(BZ2_LIBS) +AC_SUBST(LZMA_LIBS) if test x$HAVE_LIBAV_UNINSTALLED = x1; then AC_DEFINE(HAVE_LIBAV_UNINSTALLED, [], [Defined if building against uninstalled Libav source]) diff --git a/ext/libav/Makefile.am b/ext/libav/Makefile.am index ea09836..b4a8bef 100644 --- a/ext/libav/Makefile.am +++ b/ext/libav/Makefile.am @@ -21,7 +21,7 @@ libgstlibav_la_CFLAGS = $(LIBAV_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) libgstlibav_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \ -lgstaudio-$(GST_API_VERSION) -lgstvideo-$(GST_API_VERSION) \ -lgstpbutils-$(GST_API_VERSION) $(GST_BASE_LIBS) \ - $(LIBAV_LIBS) $(WIN32_LIBS) + $(LIBAV_LIBS) $(WIN32_LIBS) -lz $(BZ2_LIBS) $(LZMA_LIBS) libgstlibav_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(DARWIN_LDFLAGS) if HAVE_LIBAV_UNINSTALLED diff --git a/gst-libs/ext/Makefile.am b/gst-libs/ext/Makefile.am index dbf719c..9d5e53c 100644 --- a/gst-libs/ext/Makefile.am +++ b/gst-libs/ext/Makefile.am @@ -16,19 +16,6 @@ EXTRA_DIST=Makefile.am MAINTAINERCLEANDIRS = $(DIST_SUBDIRS) LIB_LIST=libavutil libswresample libavcodec libavformat libavfilter -if HAVE_BZ2 - BZ2_LIBS = -lbz2 -else - BZ2_LIBS = -endif - -if HAVE_LZMA - LZMA_LIBS = -llzma -else - LZMA_LIBS = -endif - - define create_la echo " GEN $1.la" && \ (echo "# $1.la - a libtool library file" && \ -- 2.7.4