[vlc-devel] [PATCH] chromaprint: pass -Bsymbolic to fix static link on Linux.

Rémi Denis-Courmont remi at remlab.net
Tue May 15 12:02:45 CEST 2018


Err, isn't Bsymbolic already enabled for all VLC binaries? And why is this problem only affecting chromaprint?

Le 15 mai 2018 12:38:56 GMT+03:00, Konstantin Pavlov <thresh at videolan.org> a écrit :
>When using contribs, chromaprint links to static ffmpeg, which results
>in the following linking error:
>
>CXXLD    libstream_out_chromaprint_plugin.la
>/usr/bin/ld: /vlc/contrib/x86_64-linux-gnu/lib/libavcodec.a(fft.o):
>relocation R_X86_64_PC32 against symbol `ff_cos_32' can not be used
>when
>making a shared object; recompile with -fPIC
>/usr/bin/ld: final link failed: Bad value
>
>Even though ffmpeg is compiled as PIC. The solution to the problem is
>documented in [1].
>
>[1] https://ffmpeg.org/platform.html#Advanced-linking-configuration
>---
> configure.ac                   | 5 ++++-
> modules/stream_out/Makefile.am | 2 +-
> 2 files changed, 5 insertions(+), 2 deletions(-)
>
>diff --git a/configure.ac b/configure.ac
>index 4a53c2ea2c..f75e696604 100644
>--- a/configure.ac
>+++ b/configure.ac
>@@ -3622,7 +3622,10 @@ dnl  chromaprint audio track fingerprinter
> dnl
> m4_pushdef([libchromaprint_version], 0.6.0)
>PKG_WITH_MODULES([CHROMAPRINT],[libchromaprint >=
>libchromaprint_version],
>-    VLC_ADD_PLUGIN([stream_out_chromaprint]),
>+    VLC_ADD_PLUGIN([stream_out_chromaprint])
>+    AS_IF([test -n "${ac_cv_ld_bsymbolic}"], [
>+      VLC_ADD_LDFLAGS([chromaprint],[${ac_cv_ld_bsymbolic}])
>+    ]),
>     AS_IF([test "${enable_chromaprint}" = "yes"],
>[AC_MSG_ERROR(Library [libchromaprint >= libchromaprint_version] needed
>for [chromaprint] was not found)],
>[AC_MSG_WARN(Library [libchromaprint >= libchromaprint_version] needed
>for [chromaprint] was not found)]
>diff --git a/modules/stream_out/Makefile.am
>b/modules/stream_out/Makefile.am
>index 8a1b42d34d..02aa672c42 100644
>--- a/modules/stream_out/Makefile.am
>+++ b/modules/stream_out/Makefile.am
>@@ -62,7 +62,7 @@ endif
> # Chromaprint plugin
>libstream_out_chromaprint_plugin_la_SOURCES = stream_out/chromaprint.c
>stream_out/chromaprint_data.h dummy.cpp
>libstream_out_chromaprint_plugin_la_CPPFLAGS = $(AM_CPPFLAGS)
>$(CHROMAPRINT_CFLAGS)
>-libstream_out_chromaprint_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath
>'$(soutdir)'
>+libstream_out_chromaprint_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath
>'$(soutdir)' $(LDFLAGS_chromaprint)
> libstream_out_chromaprint_plugin_la_LIBADD = $(CHROMAPRINT_LIBS)
> EXTRA_LTLIBRARIES += libstream_out_chromaprint_plugin.la
> sout_LTLIBRARIES += $(LTLIBstream_out_chromaprint)
>-- 
>2.17.0
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20180515/849fd7c3/attachment.html>


More information about the vlc-devel mailing list