GNOME Bugzilla – Bug 633405
introspection: Explicitly include libgdk-x11.la when scanning gtk
Last modified: 2010-11-09 16:37:23 UTC
Debian changed the behavior of libtool to not follow dependencies from .la files. Fortunately, the scanner explicitly looks at the .la files to see if they're really shared; if not it doesn't add them to the .gir, so there's no cost.
Created attachment 173440 [details] [review] introspection: Explicitly include libgdk-x11.la when scanning gtk
Fix below (modified for gtk-2.0) did not help This worked - but it's a really messy way to solve it. diff --git a/gtk/Makefile.am b/gtk/Makefile.am index af494ec..5174c52 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -995,7 +995,7 @@ introspection_files = \ Gtk-2.0.gir: $(INTROSPECTION_SCANNER) $(gtktargetlib) $(top_builddir)/gdk/Gdk-2.0.gir Makefile Gtk_2_0_gir_SCANNERFLAGS = --warn-all --add-include-path=$(top_builddir)/gdk if USE_X11 -Gtk_2_0_gir_SCANNERFLAGS += --add-include-path=$(top_builddir)/gdk/x11 +Gtk_2_0_gir_SCANNERFLAGS += --add-include-path=$(top_builddir)/gdk/x11 -L../gdk/.libs -lgdk-x11-2.0 endif Gtk_2_0_gir_INCLUDES = Atk-1.0 Gdk-2.0 Gtk_2_0_gir_CFLAGS = \ This was with gobject-introspection (HEAD) + gtk-2.24 branch of gtk. Error message (for reference) was: g-ir-scanner: link: /bin/bash ../libtool --mode=link --tag=CC --silent gcc -o /disk2/checkout/gnome2/gtk+/gtk/tmp-introspectSdCBlv/Gtk-2.0 -export-dynamic -L. libgtk-x11-2.0.la -pthread -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 /disk2/checkout/gnome2/gtk+/gtk/tmp-introspectSdCBlv/Gtk-2.0.o ./.libs/libgtk-x11-2.0.so: undefined reference to `gdk_window_get_height' ./.libs/libgtk-x11-2.0.so: undefined reference to `gdk_window_get_width' ./.libs/libgtk-x11-2.0.so: undefined reference to `gdk_window_get_display' ./.libs/libgtk-x11-2.0.so: undefined reference to `gdk_window_get_screen'
Attachment 173440 [details] pushed as 4acf92c - introspection: Explicitly include libgdk-x11.la when scanning gtk