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 739885 - gtk3-3.14.5 - fail to link - undefined reference to `GTK_IS_PLUG'
gtk3-3.14.5 - fail to link - undefined reference to `GTK_IS_PLUG'
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
3.14.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 739903 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-11-10 14:00 UTC by Vicente Olivert Riera
Modified: 2014-11-28 04:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Relevant part of the build log (20.36 KB, text/x-log)
2014-11-10 14:00 UTC, Vicente Olivert Riera
  Details
window: GtkPlug is conditionally supported on X11 only (1.18 KB, patch)
2014-11-10 14:10 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review

Description Vicente Olivert Riera 2014-11-10 14:00:01 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
Comment 1 Emmanuele Bassi (:ebassi) 2014-11-10 14:10:47 UTC
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.
Comment 2 Vicente Olivert Riera 2014-11-10 14:43:25 UTC
(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?
Comment 3 Vicente Olivert Riera 2014-11-10 14:47:33 UTC
(In reply to comment #2)
> Will you apply this upstream?

If so, in which release will be included? 3.14.6?
Comment 4 Emmanuele Bassi (:ebassi) 2014-11-10 15:09:51 UTC
Attachment 290345 [details] pushed as 36fedb0 - window: GtkPlug is conditionally supported on X11 only
Comment 5 Emmanuele Bassi (:ebassi) 2014-11-10 15:12:07 UTC
(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.
Comment 6 Vicente Olivert Riera 2014-11-10 15:12:44 UTC
(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! :-)
Comment 7 Emmanuele Bassi (:ebassi) 2014-11-10 16:17:23 UTC
*** Bug 739903 has been marked as a duplicate of this bug. ***
Comment 8 Emmanuel Briot 2014-11-20 16:55:45 UTC
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
Comment 9 Mart Raudsepp 2014-11-26 04:37:55 UTC
Reopening to make sure the concern is addressed, and I share the concern.
Comment 10 Mart Raudsepp 2014-11-26 04:42:07 UTC
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);
              ^
Comment 11 Mart Raudsepp 2014-11-26 04:43:57 UTC
oops, sorry for the spam. that's unrelated location and warning of course; got some line numbers mixed up
Comment 12 Matthias Clasen 2014-11-28 04:24:04 UTC
I don't share the concern