GNOME Bugzilla – Bug 665326
FTBFS: missing Xi/Pango/Fc for gtk-query-immodules-3.0
Last modified: 2011-12-07 19:52:30 UTC
CCLD gtk-query-immodules-3.0 ./.libs/libgtk-3.so: error: undefined reference to 'pango_fc_font_map_get_type' ./.libs/libgtk-3.so: error: undefined reference to 'FcConfigUptoDate' ./.libs/libgtk-3.so: error: undefined reference to 'pango_fc_font_map_cache_clear' ./.libs/libgtk-3.so: error: undefined reference to 'FcInitReinitialize' ./.libs/libgtk-3.so: error: undefined reference to 'XIUngrabKeycode' ./.libs/libgtk-3.so: error: undefined reference to 'XIGrabKeycode' It seems there's a explicit link missing.
Got it to build with this, but it's obviously just a duct-tape solution: diff --git a/configure.ac b/configure.ac index ffaeb4c..0e309e6 100644 --- a/configure.ac +++ b/configure.ac @@ -327,7 +327,7 @@ GDK_EXTRA_LIBS= GDK_EXTRA_CFLAGS= GDK_WINDOWING= GIO_PACKAGE=gio-2.0 -PANGO_PACKAGES="pango pangocairo" +PANGO_PACKAGES="pango pangocairo pangoft2" if test "$enable_x11_backend" = "yes"; then # GDK calls the xlib backend "x11," cairo calls it "xlib." Other @@ -1314,7 +1314,7 @@ fi GTK_EXTRA_LIBS= GTK_EXTRA_CFLAGS= -GTK_DEP_LIBS="$GDK_EXTRA_LIBS $GTK_DEP_LIBS_FOR_X `$PKG_CONFIG --libs $PANGO_PACKAGES $GTK_PACKAGES_FOR_X $GTK_PACKAGES` $GTK_EXTRA_LIBS $MATH_LIB" +GTK_DEP_LIBS="$GDK_EXTRA_LIBS $GTK_DEP_LIBS_FOR_X `$PKG_CONFIG --libs $PANGO_PACKAGES $GTK_PACKAGES_FOR_X $GTK_PACKAGES` $GTK_EXTRA_LIBS $MATH_LIB -lXi $GMODULE_LIBS" GTK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PACKAGES $GTK_PACKAGES` $GDK_EXTRA_CFLAGS $GTK_EXTRA_CFLAGS" if test x"$os_win32" = xyes; then
Any linker flags involved here, such as --no-add-needed ? Putting pangoft2 into PANGO_PACKAGES will get it back into GDK_PACKAGES and then into the pc file Requires:, which is not what we want. This is also mixed up with enable_explicit_deps. We may need a GDK_PRIVATE_PACKAGES variable here, and sort things out a little further.
The following fix has been pushed: b558885 Try to fix linking
Created attachment 202891 [details] [review] Try to fix linking We need to link against gdk against pangoft2 on X11. Also add Requires.private to gdk-3.0.pc, and try to clean things up some.
Still needs -lXi make[4]: se ingresa al directorio `/home/diego/gnome/gtk+/gtk' CCLD gtk-query-immodules-3.0 ./.libs/libgtk-3.so: error: undefined reference to 'XIUngrabKeycode' ./.libs/libgtk-3.so: error: undefined reference to 'XIGrabKeycode'
And $GMODULE_LIBS CCLD testing CCLD treemodel ../../gtk/.libs/libgtk-3.so: error: undefined reference to 'g_module_symbol' ../../gtk/.libs/libgtk-3.so: error: undefined reference to 'g_module_open' ../../gtk/.libs/libgtk-3.so: error: undefined reference to 'g_module_supported' ../../gtk/.libs/libgtk-3.so: error: undefined reference to 'g_module_close' ../../gtk/.libs/libgtk-3.so: error: undefined reference to 'g_module_error' ../../gtk/.libs/libgtk-3.so: error: undefined reference to 'g_module_name' ../../gtk/.libs/libgtk-3.so: error: undefined reference to 'g_module_build_path' collect2: ld returned 1 exit status make[5]: *** [testing] Error 1 make[5]: *** Se espera a que terminen otras tareas.... ../../gtk/.libs/libgtk-3.so: error: undefined reference to 'g_module_symbol' ../../gtk/.libs/libgtk-3.so: error: undefined reference to 'g_module_open' ../../gtk/.libs/libgtk-3.so: error: undefined reference to 'g_module_supported' ../../gtk/.libs/libgtk-3.so: error: undefined reference to 'g_module_close' ../../gtk/.libs/libgtk-3.so: error: undefined reference to 'g_module_error' ../../gtk/.libs/libgtk-3.so: error: undefined reference to 'g_module_name'