GNOME Bugzilla – Bug 703765
Build of wayland backend fails when not building X11 backend
Last modified: 2013-07-09 05:13:23 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.
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.
Review of attachment 248576 [details] [review]: ok
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