GNOME Bugzilla – Bug 608217
Missing link against libgthread
Last modified: 2010-01-27 19:21:05 UTC
A Fink user reported the following build failure: attempting to rebuild gnome-settings-daemon 2.26.1 (system 10.6.2, x86_64) gets me: gcc -Os -pipe -o gnome-settings-daemon gnome_settings_daemon-main.o gnome_settings_daemon-gnome-settings-manager.o gnome_settings_daemon-gnome-settings-plugin.o gnome_settings_daemon-gnome-settings-plugin-info.o gnome_settings_daemon-gnome-settings-module.o -Wl,-framework -Wl,CoreServices -Wl,-framework -Wl,ApplicationServices -L/sw/lib/fontconfig2/lib -L/sw/lib ./.libs/libgsd-profile.a /sw/lib/libgtk-x11-2.0.dylib /sw/lib/libgdk-x11-2.0.dylib /sw/lib/libatk-1.0.dylib /sw/lib/libgio-2.0.dylib /sw/lib/pango-ft219/lib/libpangoft2-1.0.dylib /sw/lib/libgdk_pixbuf-2.0.dylib /sw/lib/pango-ft219/lib/libpangocairo-1.0.dylib /sw/lib/libcairo.dylib /sw/lib/pango-ft219/lib/libpango-1.0.dylib /sw/lib/freetype219/lib/libfreetype.dylib -lz /sw/lib/fontconfig2/lib/libfontconfig.dylib /sw/lib/libgconf-2.dylib /sw/lib/libgmodule-2.0.dylib /sw/lib/libdbus-glib-1.dylib /sw/lib/libdbus-1.dylib -lpthread /sw/lib/libgobject-2.0.dylib /sw/lib/libglib-2.0.dylib /sw/lib/libintl.dylib Undefined symbols: "_g_thread_init", referenced from: _main in gnome_settings_daemon-main.o ld: symbol(s) not found collect2: ld returned 1 exit status make[3]: *** [gnome-settings-daemon] Error 1 make[2]: *** [all] Error 2 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 ### execution of make failed, exit code 2 and this situation appears to be the same in git trunk. gnome-settings-daemon/main.c calls g_thread_init() but autoconf doesn't test for or propagate the gthread lib that supplies that symbol. The deficient test is configure.ac in PKG_CHECK_MODULES(SETTINGS_DAEMON,...easy solution is to add gthread-2.0 to the list of packages there. Could either reuse $GLIB_REQUIRED_VERSION or else have a separate $GTHREAD_REQUIRED_VERSION variable. This has probably worked in the past because other libs leak(ed) an -lgthread-2.0 flag in the .la file of some dependent lib, but several vendors seem to be no longer shipping .la files. Alternately, on linux, it probably was okay because some dependent lib had a dyld link against libthread, but on darwin, indirect symbol refs are prohibited...must directly link everything that is used directly.
commit e0921d7fedf411402b15b3b5d29b4e2323ff8927 Author: Jens Granseuer <...> Date: Wed Jan 27 20:20:26 2010 +0100 Add gthread-2.0 to required modules for the daemon Closes bug #608217.