Summary: | >=dev-libs/json-glib-0.14.2 should be compiled with -Bsymbolic-functions | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | James Bates <james.h.bates> |
Component: | [OLD] GNOME | Assignee: | Gentoo Linux Gnome Desktop Team <gnome> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | follettoonip |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://bugzilla.gnome.org/show_bug.cgi?id=703734 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 463242, 470200 |
Description
James Bates
2013-07-06 15:10:42 UTC
This is probably the cause of bug 470200 It would seem (see discussion at https://bugzilla.gnome.org/show_bug.cgi?id=703734) that json-lib doesn't actually, in fact shouldn't depend on json-c at all. Only, if both libs get linked to an executable for whatever reason, functions in json-lib which call json_object_get_type(), thinking they are calling a local function, actually end up with the json-c version which has exactly the same name, and this causes the segfault. Therefore the solution would appear not be to adjust dependencies, but to ensure that json-lib gets linked with -Bsymbolic-functions, so that it will always look for json_object_get_type() (and any other symbols) inside itself first. This can be achieved by modifying the build as follows: james@hermes:~$ diff -u /usr/{,local/}portage/dev-libs/json-glib/json-glib-0.16.0.ebuild --- /usr/portage/dev-libs/json-glib/json-glib-0.16.0.ebuild 2013-04-25 21:39:10.000000000 +0200 +++ /usr/local/portage/dev-libs/json-glib/json-glib-0.16.0.ebuild 2013-07-11 17:20:54.000000000 +0200 @@ -5,7 +5,7 @@ EAPI=5 GCONF_DEBUG=yes -inherit gnome2 +inherit gnome2 autotools DESCRIPTION="A library providing GLib serialization and deserialization support for the JSON format" HOMEPAGE="http://live.gnome.org/JsonGlib" @@ -25,6 +25,14 @@ virtual/pkgconfig " +src_prepare() { + + epatch ${FILESDIR}/dynamic-functions.patch + eautoreconf + gnome2_src_prepare + +} + src_configure() { # Coverage support is useless, and causes runtime problems gnome2_src_configure \ and including the following json_glib/Makefile.am patch in ${FILESDIR} james@hermes:~$ cat /usr/local/portage/dev-libs/json-glib/files/dynamic-functions.patch --- json-glib/Makefile.am.old 2013-07-11 16:14:24.000000000 +0200 +++ json-glib/Makefile.am 2013-07-11 16:13:42.000000000 +0200 @@ -78,7 +78,7 @@ libjson_glib_1_0_la_LIBADD = $(JSON_LIBS) libjson_glib_1_0_la_SOURCES = $(source_c) $(source_h) $(source_h_private) $(BUILT_SOURCES) -libjson_glib_1_0_la_LDFLAGS = $(JSON_LT_LDFLAGS) $(JSON_GCOV_LDADD) -no-undefined -export-symbols $(top_srcdir)/json-glib/json-glib.symbols -rpath $(libdir) +libjson_glib_1_0_la_LDFLAGS = $(JSON_LT_LDFLAGS) $(JSON_GCOV_LDADD) -no-undefined -export-symbols $(top_srcdir)/json-glib/json-glib.symbols -rpath $(libdir) -Wl,-Bsymbolic-functions EXTRA_DIST += json-glib.symbols Better patch located here: https://bug703734.bugzilla-attachments.gnome.org/attachment.cgi?id=248943 +*json-glib-0.16.0-r1 (20 Jul 2013) + + 20 Jul 2013; Pacho Ramos <pacho@gentoo.org> + +files/json-glib-0.16.0-bsymbolic.patch, +json-glib-0.16.0-r1.ebuild, + -json-glib-0.16.0.ebuild: + Apply upstream patch to use bsymbolic and prevent problems like bug #475954 + *** Bug 480756 has been marked as a duplicate of this bug. *** |