After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 791783 - Fail to build on FreeBSD because of missing -Wl,-Bsymbolic
Fail to build on FreeBSD because of missing -Wl,-Bsymbolic
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-libav
git master
Other FreeBSD
: Normal normal
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-12-19 13:24 UTC by Ting-Wei Lan
Modified: 2018-01-22 12:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
configure: Replace -Bsymbolic-functions with -Bsymbolic (1.41 KB, patch)
2018-01-20 07:56 UTC, Ting-Wei Lan
none Details | Review

Description Ting-Wei Lan 2017-12-19 13:24:19 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.
Comment 1 Tim-Philipp Müller 2018-01-13 11:36:18 UTC
Could you make (and test) a patch then please?
Comment 2 Ting-Wei Lan 2018-01-20 07:56:52 UTC
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.
Comment 3 Tim-Philipp Müller 2018-01-22 12:05:06 UTC
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