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 759713 - -Bsymbolic configure check doesn't work on FreeBSD.
-Bsymbolic configure check doesn't work on FreeBSD.
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other FreeBSD
: Normal normal
: 1.7.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-12-20 23:57 UTC by Koop Mast (kwm)
Modified: 2018-01-20 13:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Update -Bysymbolic check with the glib version (1.55 KB, patch)
2015-12-20 23:57 UTC, Koop Mast (kwm)
committed Details | Review

Description Koop Mast (kwm) 2015-12-20 23:57:46 UTC
Created attachment 317713 [details] [review]
Update -Bysymbolic check with the glib version

The current test for -Bsymbolic in configure doesn't work on FreeBSD. Our default compiler is clang. I checked that with the patch the check works with both gcc and clang.

A quick check showed that the following projects also use this code, gst-plugins-base, gst-rtsp-server and orc. So this patch should be applied too. I think I check all the gstreamer projects, but a double check would be great.

--------------
checking for -Bsymbolic-functions linker flag... no

configure:26401: checking for -Bsymbolic-functions linker flag
configure:26415: cc -o conftest -O2 -pipe  -O2 -Wno-format -fstack-protector -fno-strict-aliasing -I/usr/local/include -Wl,-Bsymbolic-functions conftest.c  >&5
conftest.c:92:17: error: function definition is not allowed here
int main (void) { return 0; }
                ^
1 error generated.
configure:26415: $? = 1
configure: failed program
--------------
Comment 1 Sebastian Dröge (slomo) 2015-12-21 10:49:46 UTC
Comment on attachment 317713 [details] [review]
Update -Bysymbolic check with the glib version

Makes sense, I'll also apply that to the other modules. Thanks!

(No need to provide new patches, this one should apply cleanly to all modules without modifications)
Comment 2 Sebastian Dröge (slomo) 2015-12-21 11:30:37 UTC
Merged into all modules
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2015-12-27 12:29:13 UTC
Accoding to http://www.gnu.org/software/autoconf/manual/autoconf-2.62/html_node/Quotation-Rule-Of-Thumb.html

AC_TRY_LINK is obsolete and we should keep using AC_LINK_IFELSE. E.g.

AC_ARG_ENABLE(Bsymbolic,
              [AS_HELP_STRING([--disable-Bsymbolic],
                              [avoid linking with -Bsymbolic])],,
              [SAVED_LDFLAGS="${LDFLAGS}" SAVED_LIBS="${LIBS}"
               AC_MSG_CHECKING([for -Bsymbolic-functions linker flag])
               LDFLAGS=-Wl,-Bsymbolic-functions
               LIBS=
               AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[
                           AC_MSG_RESULT(yes)
                           enable_Bsymbolic=yes], [
                           AC_MSG_RESULT(no)
                           enable_Bsymbolic=no])
               LDFLAGS="${SAVED_LDFLAGS}" LIBS="${SAVED_LIBS}"])


Could you show the whole generated conftest.c?

I've tried CC=clang ./autogen.sh ... and I don't see any issue.
Comment 4 Sebastian Dröge (slomo) 2015-12-28 07:23:15 UTC
It probably depends on the version of clang, if you use the clang linker or the GNU ones, etc.

We now have exactly the same check as glib, I think that's a good thing on its own already :) If you want to improve the check, please also provide a patch to the GLib people.
Comment 5 Sebastian Dröge (slomo) 2016-12-09 10:22:41 UTC
What should happen here now?
Comment 6 Tim-Philipp Müller 2018-01-20 13:10:30 UTC
The original issue has been solved, so let's close this bug.

Let's not worry about deprecated autoconf macros and focus on the Meson port ;)