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 703765 - Build of wayland backend fails when not building X11 backend
Build of wayland backend fails when not building X11 backend
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Wayland
3.9.x
Other Linux
: Normal major
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-07-08 06:29 UTC by Jürg Billeter
Modified: 2013-07-09 05:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (2.35 KB, patch)
2013-07-08 07:45 UTC, Jürg Billeter
committed Details | Review

Description Jürg Billeter 2013-07-08 06:29:38 UTC
Trying to build master (3.9.6-175-g8137b28) with --enable-wayland-backend but without X11 backend fails here:

/bin/sh ../libtool  --tag=CC   --mode=link gcc  -g1 -O2 -Wall   -o gtk-query-immodules-3.0 queryimmodules.o libgtk-3.la ../gdk/libgdk-3.la -lpangocairo-1.0 -lpango-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -latk-1.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lm -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0  -lm  
libtool: link: gcc -g1 -O2 -Wall -o .libs/gtk-query-immodules-3.0 queryimmodules.o -Wl,--export-dynamic -pthread  ./.libs/libgtk-3.so /src/gtk+-3/gdk/.libs/libgdk-3.so ../gdk/.libs/libgdk-3.so -lwayland-client -lxkbcommon -lwayland-cursor -lpangocairo-1.0 -lpango-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -latk-1.0 -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lm -pthread
./.libs/libgtk-3.so: error: undefined reference to 'gdk_wayland_device_clear_selection_content_libgtk_only'
./.libs/libgtk-3.so: error: undefined reference to 'gdk_wayland_device_offer_selection_content_libgtk_only'
./.libs/libgtk-3.so: error: undefined reference to 'gdk_wayland_device_request_selection_content_libgtk_only'
./.libs/libgtk-3.so: error: undefined reference to 'gdk_wayland_device_get_selection_type_atoms_libgtk_only'
collect2: error: ld returned 1 exit status
make[4]: *** [gtk-query-immodules-3.0] Error 1
make[4]: Leaving directory `/src/gtk+-3/gtk'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/src/gtk+-3/gtk'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/src/gtk+-3/gtk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/src/gtk+-3'
make: *** [all] Error 2

This is on Linux x86-64 with wayland master.

If configured with X11 backend in addition to wayland backend, it builds fine.
Comment 1 Jürg Billeter 2013-07-08 07:45:11 UTC
Created attachment 248576 [details] [review]
Proposed patch

Adding GDK_AVAILABLE_IN_ALL to those function declarations fixes the build. I'm not familiar with the details of export handling in GTK+, so I'm not sure whether this is the right approach for libgtk_only functions.
Comment 2 Matthias Clasen 2013-07-09 03:34:04 UTC
Review of attachment 248576 [details] [review]:

ok
Comment 3 Jürg Billeter 2013-07-09 05:13:23 UTC
commit 7f9f3aad5acef48eedb26b77f705f9e01405d070
Author: Jürg Billeter <j@bitron.ch>
Date:   Mon Jul 8 09:41:03 2013 +0200

    wayland: Fix build due to missing symbol export
    
    https://bugzilla.gnome.org/show_bug.cgi?id=703765