Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 530718 - [gnome-overlay] x11-libs/gtk+-3.14.5 fails compilation with GTK_IS_PLUG (wayland backend only enabled)
Summary: [gnome-overlay] x11-libs/gtk+-3.14.5 fails compilation with GTK_IS_PLUG (wayl...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL: https://bugzilla.gnome.org/show_bug.c...
Whiteboard:
Keywords:
Depends on:
Blocks: gnome-3.14
  Show dependency tree
 
Reported: 2014-11-26 04:22 UTC by Mart Raudsepp
Modified: 2015-01-01 21:46 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log.xz,30.93 KB, application/x-xz)
2014-11-26 04:25 UTC, Mart Raudsepp
Details
apply initial fix from upstream (0001-gtk-Fix-wayland-only-build.patch,2.19 KB, patch)
2014-11-26 08:29 UTC, Mart Raudsepp
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mart Raudsepp gentoo-dev 2014-11-26 04:22:10 UTC
libtool: link: armv6j-hardfloat-linux-gnueabi-gcc -O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard -ggdb -fno-omit-frame-pointer -Wall -Wl,-O1 -Wl,--hash-style=gnu -o .libs/gtk-query-immodules-3.0 queryimmodules.o -Wl,--export-dynamic -pthread  -Wl,--as-needed ./.libs/libgtk-3.so /var/tmp/portage/x11-libs/gtk+-3.14.5/work/gtk+-3.14.5-.arm/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
libtool: link: armv6j-hardfloat-linux-gnueabi-gcc -O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard -ggdb -fno-omit-frame-pointer -Wall -Wl,-O1 -Wl,--hash-style=gnu -o .libs/gtk-launch gtk-launch.o  -Wl,--as-needed ./.libs/libgtk-3.so /var/tmp/portage/x11-libs/gtk+-3.14.5/work/gtk+-3.14.5-.arm/gdk/.libs/libgdk-3.so -lgmodule-2.0 ../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 -lglib-2.0 -lm -pthread
./.libs/libgtk-3.so: undefined reference to `GTK_IS_PLUG'
collect2: error: ld returned 1 exit status
distcc[18030] ERROR: compile (null) on localhost failed
Makefile:2471: recipe for target 'gtk-launch' failed
make[4]: *** [gtk-launch] Error 1
make[4]: *** Waiting for unfinished jobs....
./.libs/libgtk-3.so: undefined reference to `GTK_IS_PLUG'
collect2: error: ld returned 1 exit status
distcc[18028] ERROR: compile (null) on localhost failed
Makefile:2475: recipe for target 'gtk-query-immodules-3.0' failed
make[4]: *** [gtk-query-immodules-3.0] Error 1
Comment 1 Mart Raudsepp gentoo-dev 2014-11-26 04:25:28 UTC
Created attachment 390310 [details]
build.log

Changes in ebuild in my overlay (where this failure happens) is only addition of USE=gtk3-only, which makes it build gtk-update-icon-cache instead of relying on gtk+:2 one (I don't have libX11 nor gtk+:2) and satisfying wayland-egl.pc dep from raspberrypi-userland[wayland], in addition to mesa[wayland].
Comment 2 Mart Raudsepp gentoo-dev 2014-11-26 04:34:11 UTC
gtkplug.c is only build with x11 backend enabled (it's listed under gtk_use_x11_c_sources), but undefined references to its symbols end up in libgtk-3.so, so when linking something to it (like the utilities built as part of gtk+ emerge), linking fails. Various places in gtk+ itself (including gtkwindow.c) use the GTK_IS_PLUG macro, which is some GType check from boilerplate code, which ends up as an actual function call, but the definition to that isn't compiled in, because the macros generating those calls are in gtkplug.c (G_DEFINE_TYPE_WITH_PRIVATE I think)
Comment 4 Mart Raudsepp gentoo-dev 2014-11-26 08:29:29 UTC
Created attachment 390316 [details, diff]
apply initial fix from upstream

git format-patch formatted fix as committed to 3-14 branch right now. Might not be the final fix, but works for now.
I didn't really test this in ebuild context, due to heavy times involved on armv6, but in my overlay at least ebuild foo prepare seems to work, and the patch itself separately patched in the failed build and continued with ebuild foo merge also makes it work and I can get gtk+ stuff running on pure wayland with weston-1.6 (gtk 3.12 doesn't work there, different xdg-shell protocol version).
Please do a git am, quick compile test and push out.
Comment 5 Mart Raudsepp gentoo-dev 2014-12-13 02:39:46 UTC
or just bump to 3.14.6 by now, I think..
Comment 6 Gilles Dartiguelongue (RETIRED) gentoo-dev 2014-12-23 23:50:29 UTC
Could you check 3.14.6 since it is in tree masked for now ?
Comment 7 Gilles Dartiguelongue (RETIRED) gentoo-dev 2015-01-01 21:46:03 UTC
# USE="-X -xinerama wayland" emerge -1Bva gtk+:3

Build fine here. Closing.