GNOME Bugzilla – Bug 620868
Fix build of Gtk-3.0.gir when libgdk-x11-3.0.so is not installed.
Last modified: 2011-02-06 16:35:20 UTC
Due to an issue during the build, the gi scanner tries to link against the installed gdk instead of using the one it just built. Here is the stacktrace I got while installing a new version with XI2 support (the installed version did not have that): /bin/sh ../libtool --tag=CC --mode=link gcc -std=gnu99 -DGDK_PIXBUF_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED -g -O2 -Wall -L/opt/gnome2/lib -o gtk-query-immodules-3.0 queryimmodules.o libgtk-x11-3.0.la ../gdk-pixbuf/libgdk_pixbuf-3.0.la ../gdk/libgdk-x11-3.0.la -pthread -L/opt/gnome2/lib -lpangocairo-1.0 -lX11 -lXcomposite -lXdamage -lXfixes -latk-1.0 -lcairo -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lm libtool: link: gcc -std=gnu99 -DGDK_PIXBUF_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED -g -O2 -Wall -o .libs/gtk-query-immodules-3.0 queryimmodules.o -pthread -L/opt/gnome2/lib ./.libs/libgtk-x11-3.0.so ../gdk-pixbuf/.libs/libgdk_pixbuf-3.0.so ../gdk/.libs/libgdk-x11-3.0.so /opt/gnome2/lib/libpangocairo-1.0.so -lX11 -lXcomposite -lXdamage -lXfixes /opt/gnome2/lib/libatk-1.0.so /opt/gnome2/lib/libcairo.so /opt/gnome2/lib/libgio-2.0.so /opt/gnome2/lib/libpangoft2-1.0.so /opt/gnome2/lib/libpango-1.0.so /usr/lib/libfreetype.so /opt/gnome2/lib/libfontconfig.so /opt/gnome2/lib/libgobject-2.0.so /opt/gnome2/lib/libgmodule-2.0.so /opt/gnome2/lib/libgthread-2.0.so -lrt /opt/gnome2/lib/libglib-2.0.so -lm -pthread -Wl,-rpath -Wl,/opt/gnome2/lib /home/sf/src/gnome2/gtk+-3/gtk/gtkalias.h:64: unexpected character `'' /home/sf/src/gnome2/gtk+-3/gtk/gtksearchenginequartz.h:10: unexpected character `@' /home/sf/src/gnome2/gtk+-3/gtk/gtksearchenginequartz.h:22: unexpected character `@' /home/sf/src/gnome2/gtk+-3/gtk/gtksearchenginequartz.h:40: unexpected character `@' /home/sf/src/gnome2/gtk+-3/gtk/gtksearchenginequartz.h:61: unexpected character `@' /home/sf/src/gnome2/gtk+-3/gtk/gtksearchenginequartz.h:103: unexpected character `@' /home/sf/src/gnome2/gtk+-3/gtk/gtksearchenginequartz.h:190: unexpected character `@' /home/sf/src/gnome2/gtk+-3/gtk/gtksearchenginequartz.h:227: unexpected character `@' /home/sf/src/gnome2/gtk+-3/gtk/gtksearchenginequartz.h:228: unexpected character `@' /home/sf/src/gnome2/gtk+-3/gtk/gtksearchenginequartz.h:231: unexpected character `@' /home/sf/src/gnome2/gtk+-3/gtk/gtksearchenginequartz.h:232: unexpected character `@' /home/sf/src/gnome2/gtk+-3/gtk/gtksearchenginequartz.h:236: unexpected character `@' /home/sf/src/gnome2/gtk+-3/gtk/gtksearchenginequartz.h:237: unexpected character `@' ./.libs/libgtk-x11-3.0.so: undefined reference to `gdk_device_ungrab' ./.libs/libgtk-x11-3.0.so: undefined reference to `gdk_window_set_device_cursor' ./.libs/libgtk-x11-3.0.so: undefined reference to `gdk_device_manager_list_devices' ./.libs/libgtk-x11-3.0.so: undefined reference to `gdk_event_translator_translate' ./.libs/libgtk-x11-3.0.so: undefined reference to `gdk_drag_context_get_device' ./.libs/libgtk-x11-3.0.so: undefined reference to `gdk_grab_ownership_get_type' ./.libs/libgtk-x11-3.0.so: undefined reference to `gdk_window_set_device_events' ./.libs/libgtk-x11-3.0.so: undefined reference to `gdk_display_get_device_manager' ./.libs/libgtk-x11-3.0.so: undefined reference to `gdk_drag_context_set_device' ./.libs/libgtk-x11-3.0.so: undefined reference to `gdk_window_set_support_multidevice' ./.libs/libgtk-x11-3.0.so: undefined reference to `gdk_display_get_device_state' ./.libs/libgtk-x11-3.0.so: undefined reference to `gdk_event_get_device' ./.libs/libgtk-x11-3.0.so: undefined reference to `gdk_event_set_device' ./.libs/libgtk-x11-3.0.so: undefined reference to `gdk_device_manager_core_get_type' ./.libs/libgtk-x11-3.0.so: undefined reference to `gdk_window_get_support_multidevice' ./.libs/libgtk-x11-3.0.so: undefined reference to `gdk_device_grab_info_libgtk_only' ./.libs/libgtk-x11-3.0.so: undefined reference to `gdk_device_manager_xi2_get_type' ./.libs/libgtk-x11-3.0.so: undefined reference to `gdk_device_get_device_type' ./.libs/libgtk-x11-3.0.so: undefined reference to `gdk_device_manager_get_type' ./.libs/libgtk-x11-3.0.so: undefined reference to `gdk_device_grab' ./.libs/libgtk-x11-3.0.so: undefined reference to `gdk_device_get_associated_device' ./.libs/libgtk-x11-3.0.so: undefined reference to `gdk_display_warp_device' ./.libs/libgtk-x11-3.0.so: undefined reference to `gdk_display_get_window_at_device_position' ./.libs/libgtk-x11-3.0.so: undefined reference to `gdk_window_get_device_position' ./.libs/libgtk-x11-3.0.so: undefined reference to `gdk_window_get_device_events' ./.libs/libgtk-x11-3.0.so: undefined reference to `gdk_device_type_get_type' collect2: ld returned 1 exit status Traceback (most recent call last):
+ Trace 222289
sys.exit(scanner_main(sys.argv))
glibtransformer.get_get_type_functions())
return dc.run()
self._link(bin_path, o_path)
subprocess.check_call(args)
raise CalledProcessError(retcode, cmd)
make[4]: *** [Gtk-3.0.gir] Error 1 make[4]: Leaving directory `/home/sf/src/gnome2/gtk+-3/gtk' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/home/sf/src/gnome2/gtk+-3/gtk' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/sf/src/gnome2/gtk+-3/gtk' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/sf/src/gnome2/gtk+-3' make: *** [all] Error 2
Created attachment 162955 [details] [review] Fix build of Gtk-3.0.gir when libgdk-x11-3.0.so is not installed.
Created attachment 162963 [details] [review] Fix build of Gtk-3.0.gir when libgdk-x11-3.0.so is not installed. This patch is updated with the new gir_LDFLAGS support of gobject-introspection.
I saw a similar bug in my build. I think the correct fix should be adding $(top_builddir)/gdk/$(gdktargetlib) to Gtk_3_0_gir_LIBS, and let libtool resolve it.
This is a duplicate of #610709 and #630106 , #620868, #624304 and probably a few other . Not bad for a bug that was tagged as needinfo and unreproducible. Could someone link them all ? I only had enough rights to link mine as duplicate.
I can't reproduce this bug anymore, could you try with a recent GTK+ checkout?
I can't reproduce it, either. It looks like some commit has changed Gtk_3_0_gir_LIBS to libgtk-3.0.la instead of a direct link with $(gdktargetlib). So, the gdk linkage is now resolved via the gtk libtool file.
(In reply to comment #6) > I can't reproduce it, either. It looks like some commit has changed > Gtk_3_0_gir_LIBS to libgtk-3.0.la instead of a direct link with > $(gdktargetlib). So, the gdk linkage is now resolved via the gtk libtool file. Great!, closing then