From 5d97ea298672880ee80964c07b9cf31d604c3df9 Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Tue, 17 Nov 2009 20:41:48 -0600 Subject: [PATCH] =?UTF-8?q?Bug=C2=A0600141=20-=20Add=20-pthread=20to=20gmo?= =?UTF-8?q?dule=20pkg-config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is not generally permissible to dlopen() libpthread into a program that is not already linked with threading support. The most common case of this happening is when GIO opens Gvfs (which includes DBus, which links against libpthread). Since gmodule is the way that most users cause this problem for themselves and since the easiest workaround is to link the program with -pthread, the best fix for the issue is to add -pthread to the gmodule pkg-config. --- gmodule-2.0-uninstalled.pc.in | 4 ++-- gmodule-2.0.pc.in | 4 ++-- gmodule-export-2.0.pc.in | 4 ++-- gmodule-no-export-2.0-uninstalled.pc.in | 4 ++-- gmodule-no-export-2.0.pc.in | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/gmodule-2.0-uninstalled.pc.in b/gmodule-2.0-uninstalled.pc.in index 9a0d8aacd..68f309161 100644 --- a/gmodule-2.0-uninstalled.pc.in +++ b/gmodule-2.0-uninstalled.pc.in @@ -4,5 +4,5 @@ Name: GModule Uninstalled Description: Dynamic module loader for GLib, Not Installed Requires: glib-2.0-uninstalled Version: @VERSION@ -Libs: @G_MODULE_LDFLAGS@ ${pc_top_builddir}/${pcfiledir}/gmodule/libgmodule-2.0.la -Cflags: -I${pc_top_builddir}/${pcfiledir}/@srcdir@/gmodule +Libs: @G_MODULE_LDFLAGS@ ${pc_top_builddir}/${pcfiledir}/gmodule/libgmodule-2.0.la @G_THREAD_LIBS@ +Cflags: -I${pc_top_builddir}/${pcfiledir}/@srcdir@/gmodule @G_THREAD_CFLAGS@ diff --git a/gmodule-2.0.pc.in b/gmodule-2.0.pc.in index 7117b31e0..c9cd04c58 100644 --- a/gmodule-2.0.pc.in +++ b/gmodule-2.0.pc.in @@ -9,6 +9,6 @@ Name: GModule Description: Dynamic module loader for GLib Requires: glib-2.0 Version: @VERSION@ -Libs: -L${libdir} @G_MODULE_LDFLAGS@ -lgmodule-2.0 +Libs: -L${libdir} @G_MODULE_LDFLAGS@ -lgmodule-2.0 @G_THREAD_LIBS@ Libs.private: @G_MODULE_LIBS@ -Cflags: +Cflags: @G_THREAD_CFLAGS@ diff --git a/gmodule-export-2.0.pc.in b/gmodule-export-2.0.pc.in index 4bf55973d..c9cd04c58 100644 --- a/gmodule-export-2.0.pc.in +++ b/gmodule-export-2.0.pc.in @@ -9,6 +9,6 @@ Name: GModule Description: Dynamic module loader for GLib Requires: glib-2.0 Version: @VERSION@ -Libs: -L${libdir} @G_MODULE_LDFLAGS@ -lgmodule-2.0 +Libs: -L${libdir} @G_MODULE_LDFLAGS@ -lgmodule-2.0 @G_THREAD_LIBS@ Libs.private: @G_MODULE_LIBS@ -Cflags: +Cflags: @G_THREAD_CFLAGS@ diff --git a/gmodule-no-export-2.0-uninstalled.pc.in b/gmodule-no-export-2.0-uninstalled.pc.in index bd49e9dc9..115820db4 100644 --- a/gmodule-no-export-2.0-uninstalled.pc.in +++ b/gmodule-no-export-2.0-uninstalled.pc.in @@ -9,6 +9,6 @@ Name: GModule Description: Dynamic module loader for GLib Requires: glib-2.0 Version: @VERSION@ -Libs: ${pc_top_builddir}/${pcfiledir}/gmodule/libgmodule-2.0.la -Cflags: -I${pc_top_builddir}/${pcfiledir}/@srcdir@/gmodule +Libs: ${pc_top_builddir}/${pcfiledir}/gmodule/libgmodule-2.0.la @G_THREAD_LIBS@ +Cflags: -I${pc_top_builddir}/${pcfiledir}/@srcdir@/gmodule @G_THREAD_CFLAGS@ diff --git a/gmodule-no-export-2.0.pc.in b/gmodule-no-export-2.0.pc.in index 6c4c2318f..3edd98b6d 100644 --- a/gmodule-no-export-2.0.pc.in +++ b/gmodule-no-export-2.0.pc.in @@ -9,6 +9,6 @@ Name: GModule Description: Dynamic module loader for GLib Requires: glib-2.0 Version: @VERSION@ -Libs: -L${libdir} -lgmodule-2.0 +Libs: -L${libdir} -lgmodule-2.0 @G_THREAD_LIBS@ Libs.private: @G_MODULE_LIBS@ -Cflags: +Cflags: @G_THREAD_CFLAGS@