Commit e236d4f7 authored by Stéphane Cerveau's avatar Stéphane Cerveau 🤸🏻
Browse files

gstreamer-full: Fix link with x264

If a static build is requested and x264 plugin has been enabled
the full link fails with:

/usr/bin/ld: subprojects/x264/libx264.a(cabac-a.o): relocation
R_X86_64_PC32 against symbol `x264_cabac_range_lps' can not be used when
making a shared object; recompile with -fPIC

Fixes #108

Part-of: <!169>
parent 9fa22f58
Pipeline #180468 waiting for manual action with stages
in 27 seconds
......@@ -246,6 +246,14 @@ if get_option('default_library') == 'static'
install_headers('gstinitstaticplugins.h', subdir : 'gstreamer-1.0/gst')
# Avoid a x264 link issue described here:
# Similar issue has been found with VLC:
gstfull_link_args = []
if cc.has_link_argument('-Wl,-Bsymbolic')
gstfull_link_args += ['-Wl,-Bsymbolic']
gst_dep = subproject('gstreamer').get_variable('gst_dep')
# Get a list of libraries that needs to be exposed in the ABI.
......@@ -272,6 +280,7 @@ if get_option('default_library') == 'static'
gstfull = both_libraries('gstreamer-full-1.0',
link_with : all_plugins,
link_args: gstfull_link_args,
link_whole : exposed_libs,
dependencies : gst_dep,
install : true,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment