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 620868 - Fix build of Gtk-3.0.gir when libgdk-x11-3.0.so is not installed.
Fix build of Gtk-3.0.gir when libgdk-x11-3.0.so is not installed.
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
2.90.x
Other All
: Normal major
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2010-06-07 17:34 UTC by Steve Frécinaux
Modified: 2011-02-06 16:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix build of Gtk-3.0.gir when libgdk-x11-3.0.so is not installed. (1009 bytes, patch)
2010-06-07 17:34 UTC, Steve Frécinaux
none Details | Review
Fix build of Gtk-3.0.gir when libgdk-x11-3.0.so is not installed. (1.04 KB, patch)
2010-06-07 18:26 UTC, Steve Frécinaux
none Details | Review

Description Steve Frécinaux 2010-06-07 17:34:50 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):
  • File "/opt/gnome2/bin/g-ir-scanner", line 38 in <module>
    sys.exit(scanner_main(sys.argv))
  • File "/opt/gnome2/lib/gobject-introspection/giscanner/scannermain.py", line 317 in scanner_main
    glibtransformer.get_get_type_functions())
  • File "/opt/gnome2/lib/gobject-introspection/giscanner/dumper.py", line 231 in compile_introspection_binary
    return dc.run()
  • File "/opt/gnome2/lib/gobject-introspection/giscanner/dumper.py", line 132 in run
    self._link(bin_path, o_path)
  • File "/opt/gnome2/lib/gobject-introspection/giscanner/dumper.py", line 226 in _link
    subprocess.check_call(args)
  • File "/usr/lib/python2.6/subprocess.py", line 498 in check_call
    raise CalledProcessError(retcode, cmd)
ubprocess.CalledProcessError: Command '['/bin/sh', '../libtool', '--mode=link', '--tag=CC', '--silent', 'gcc', '-o', '/home/sf/src/gnome2/gtk+-3/gtk/tmp-introspect833A3n/Gtk-3.0', '-L.', 'libgtk-x11-3.0.la', '-pthread', '-Wl,--export-dynamic', '-L/opt/gnome2/lib', '-lgio-2.0', '-lgirepository-1.0', '-lgobject-2.0', '-lgmodule-2.0', '-lffi', '-lgthread-2.0', '-lrt', '-lglib-2.0', '/home/sf/src/gnome2/gtk+-3/gtk/tmp-introspect833A3n/Gtk-3.0.o']' returned non-zero exit status 1
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
Comment 1 Steve Frécinaux 2010-06-07 17:34:54 UTC
Created attachment 162955 [details] [review]
Fix build of Gtk-3.0.gir when libgdk-x11-3.0.so is not installed.
Comment 2 Steve Frécinaux 2010-06-07 18:26:27 UTC
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.
Comment 3 Theppitak Karoonboonyanan 2010-07-04 11:52:50 UTC
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.
Comment 4 Alban Browaeys 2010-09-22 14:37:14 UTC
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.
Comment 5 Javier Jardón (IRC: jjardon) 2011-02-05 23:19:40 UTC
I can't reproduce this bug anymore, could you try with a recent GTK+ checkout?
Comment 6 Theppitak Karoonboonyanan 2011-02-06 05:59:06 UTC
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.
Comment 7 Javier Jardón (IRC: jjardon) 2011-02-06 16:35:20 UTC
(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