After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 633405 - introspection: Explicitly include libgdk-x11.la when scanning gtk
introspection: Explicitly include libgdk-x11.la when scanning gtk
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2010-10-28 21:42 UTC by Colin Walters
Modified: 2010-11-09 16:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
introspection: Explicitly include libgdk-x11.la when scanning gtk (1.02 KB, patch)
2010-10-28 21:42 UTC, Colin Walters
committed Details | Review

Description Colin Walters 2010-10-28 21:42:55 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.
Comment 1 Colin Walters 2010-10-28 21:42:56 UTC
Created attachment 173440 [details] [review]
introspection: Explicitly include libgdk-x11.la when scanning gtk
Comment 2 Alan Knowles 2010-11-06 13:30:17 UTC
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'
Comment 3 Colin Walters 2010-11-09 16:37:20 UTC
Attachment 173440 [details] pushed as 4acf92c - introspection: Explicitly include libgdk-x11.la when scanning gtk