GNOME Bugzilla – Bug 791783
Fail to build on FreeBSD because of missing -Wl,-Bsymbolic
Last modified: 2018-01-22 12:05:06 UTC
Both ffmpeg and libav say that -Wl,-Bsymbolic should be used when linking a static ffmpeg or libav library into a shared library. https://libav.org/documentation/platform.html However, gst-libav doesn't pass -Wl,-Bsymbolic to linker, and it causes linking failure on FreeBSD. CCLD libgstlibav.la /usr/bin/ld: /home/lantw44/gnome/build/gst-libav/gst-libs/ext/.libs/libavcodec.a(simple_idct10.o): relocation R_X86_64_PC32 against `ff_pw_1023' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Bad value cc: error: linker command failed with exit code 1 (use -v to see invocation) If I put -Wl,-Bsymbolic in LDFLAGS, gst-libav can be successfully built.
Could you make (and test) a patch then please?
Created attachment 367133 [details] [review] configure: Replace -Bsymbolic-functions with -Bsymbolic The documentation of libav says -Bsymbolic may be needed when building a shared library which links statically to libav.
Thanks. Works for me. Let's see what the build bots say: commit 27d8c8c456a14f7d2d79031ad5fea110d3f695d8 (HEAD -> master) Author: Ting-Wei Lan <lantw@src.gnome.org> Date: Sat Jan 20 15:45:45 2018 +0800 configure: Replace -Bsymbolic-functions with -Bsymbolic The documentation of libav says -Bsymbolic may be needed when building a shared library which links statically to libav. Fixes linking error on FreeBSD: gst-libav/gst-libs/ext/.libs/libavcodec.a(simple_idct10.o): relocation R_X86_64_PC32 against `ff_pw_1023' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Bad value https://bugzilla.gnome.org/show_bug.cgi?id=791783