GNOME Bugzilla – Bug 739885
gtk3-3.14.5 - fail to link - undefined reference to `GTK_IS_PLUG'
Last modified: 2014-11-28 04:24:04 UTC
Created attachment 290344 [details] Relevant part of the build log Trying to build gtk3-3.14.5 fails to link with the following error message: ./.libs/libgtk-3.so: undefined reference to `GTK_IS_PLUG' This problem doesn't happen with gtk3-3.14.4. I have attached a file with the relevant parts of the build log. The part where the libgtk.so library is linked, and the part where the build fails. Although that build log was done when building gtk+ for MIPS architecture, I have found the same problem in others, like x86 for instance. Here is how gtk+ is configured: ./configure --target=i586-buildroot-linux-gnu --host=i586-buildroot-linux-gnu --build=x86_64-unknown-linux-gnu --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --localstatedir=/var --program-prefix="" --disable-gtk-doc --disable-dependency-tracking --disable-debug --enable-static --enable-shared --disable-glibtest --enable-explicit-deps=no --enable-gtk2-dependency --disable-x11-backend --disable-wayland-backend --enable-broadway-backend --disable-xinerama --disable-xrandr --disable-xfixes --disable-xcomposite --disable-xdamage --disable-xkb --disable-cups --disable-installed-tests
Created attachment 290345 [details] [review] window: GtkPlug is conditionally supported on X11 only We cannot do a type check on it if we don't have the X11 backend compiled in.
(In reply to comment #1) > Created an attachment (id=290345) [details] [review] > window: GtkPlug is conditionally supported on X11 only > > We cannot do a type check on it if we don't have the X11 backend > compiled in. Thank you very much for the patch. I have tested it and it works like a charm. Will you apply this upstream?
(In reply to comment #2) > Will you apply this upstream? If so, in which release will be included? 3.14.6?
Attachment 290345 [details] pushed as 36fedb0 - window: GtkPlug is conditionally supported on X11 only
(In reply to comment #3) > (In reply to comment #2) > > Will you apply this upstream? > > If so, in which release will be included? 3.14.6? I cherry-picked the commit to the gtk-3-14 branch, so it'll be in 3.14.6.
(In reply to comment #5) > (In reply to comment #3) > > (In reply to comment #2) > > > Will you apply this upstream? > > > > If so, in which release will be included? 3.14.6? > > I cherry-picked the commit to the gtk-3-14 branch, so it'll be in 3.14.6. Thank you very much! :-)
*** Bug 739903 has been marked as a duplicate of this bug. ***
The patch works, but is not every elegant. If some other part of the code starts using GTK_IS_PLUG, we will have to redo the expansion in those other places too. Instead, I suggest we modify gtkplug.h to define the macro on all platforms, as in: diff --git a/gtk/gtkplug.h b/gtk/gtkplug.h index 1a2c165..c3f934a 100644 --- a/gtk/gtkplug.h +++ b/gtk/gtkplug.h @@ -98,6 +98,8 @@ GdkWindow *gtk_plug_get_socket_window (GtkPlug *plug); G_END_DECLS +#else +#define GTK_IS_PLUG(obj) (0) #endif /* GDK_WINDOWING_X11 */ #endif /* __GTK_PLUG_H__ */ This will ensure that GTK_IS_PLUG can be used anywhere
Reopening to make sure the concern is addressed, and I share the concern.
The applied version also spews warning of course: gtk/gtkwindow.c: In function 'gtk_window_supports_csd': gtk/gtkwindow.c:3877:14: warning: unused variable 'widget' [-Wunused-variable] GtkWidget *widget = GTK_WIDGET (window); ^
oops, sorry for the spam. that's unrelated location and warning of course; got some line numbers mixed up
I don't share the concern