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 622550 - Don't link against a particular version of GTK+
Don't link against a particular version of GTK+
Status: RESOLVED FIXED
Product: libnotify
Classification: Platform
Component: general
git master
Other All
: Normal normal
: ---
Assigned To: William Jon McCann
Depends on:
Blocks:
 
 
Reported: 2010-06-24 00:47 UTC by Bastien Nocera
Modified: 2010-06-30 19:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Don't link against a particular version of GTK+ (5.92 KB, patch)
2010-06-24 00:47 UTC, Bastien Nocera
none Details | Review
Use g_object_get() to get pixbuf properties (2.53 KB, patch)
2010-06-24 00:48 UTC, Bastien Nocera
committed Details | Review
Don't link against a particular version of GTK+ (9.64 KB, patch)
2010-06-24 09:30 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2010-06-24 00:47:56 UTC
As per patch
Comment 1 Bastien Nocera 2010-06-24 00:47:58 UTC
Created attachment 164461 [details] [review]
Don't link against a particular version of GTK+

Instead, open ourselves through GModule, and check whether
we have all the GTK+ and GDK functions required for us to
work correctly.

This means that the front-end application cannot rely on
libnotify linking against GTK+, which would only be a problem
for edge-cases.
Comment 2 Bastien Nocera 2010-06-24 00:48:36 UTC
Created attachment 164462 [details] [review]
Use g_object_get() to get pixbuf properties

Instead of 7 separate gdk_pixbuf function calls.
Comment 3 Bastien Nocera 2010-06-24 00:51:00 UTC
Comment on attachment 164462 [details] [review]
Use g_object_get() to get pixbuf properties

Attachment 164462 [details] pushed as 1f85092 - Use g_object_get() to get pixbuf properties
Comment 4 Bastien Nocera 2010-06-24 09:30:54 UTC
Created attachment 164479 [details] [review]
Don't link against a particular version of GTK+

Instead, open ourselves through GModule, and check whether
we have all the GTK+ and GDK functions required for us to
work correctly.

This means that the front-end application cannot rely on
libnotify linking against GTK+, which would only be a problem
for edge-cases.
Comment 5 Bastien Nocera 2010-06-28 22:35:11 UTC
Attachment 164479 [details] pushed as 0eb56b2 - Don't link against a particular version of GTK+
Comment 6 Yaakov Selkowitz 2010-06-30 00:54:31 UTC
This is not portable.  libnotify explicitly depends on symbols from libgdk/libgtk.  On PE platforms (Cygwin/MinGW), as well as on Linux when linked with -Wl,z,defs, all symbols must be resolved at link time, so the build fails:

.libs/notify.o:notify.c:(.data+0x4): undefined reference to `_gdk_screen_make_display_name'
.libs/notify.o:notify.c:(.data+0xc): undefined reference to `_gdk_window_get_origin'
.libs/notify.o:notify.c:(.data+0x14): undefined reference to `_gtk_status_icon_get_geometry'
.libs/notify.o:notify.c:(.data+0x1c): undefined reference to `_gtk_status_icon_get_x11_window_id'
.libs/notify.o:notify.c:(.data+0x24): undefined reference to `_gtk_widget_get_allocation'
.libs/notify.o:notify.c:(.data+0x2c): undefined reference to `_gtk_widget_get_has_window'
.libs/notify.o:notify.c:(.data+0x34): undefined reference to `_gtk_widget_get_screen'
.libs/notify.o:notify.c:(.data+0x3c): undefined reference to `_gtk_widget_get_window'
.libs/notification.o:notification.c:(.text+0x14a9): undefined reference to `_gdk_screen_get_type'
.libs/notification.o:notification.c:(.text+0x14ff): undefined reference to `_gdk_screen_make_display_name'
.libs/notification.o:notification.c:(.text+0x1657): undefined reference to `_gtk_status_icon_get_x11_window_id'
.libs/notification.o:notification.c:(.text+0x1680): undefined reference to `_gtk_status_icon_get_geometry'
.libs/notification.o:notification.c:(.text+0x18ef): undefined reference to `_gtk_widget_get_screen'
.libs/notification.o:notification.c:(.text+0x18fa): undefined reference to `_gtk_widget_get_window'
.libs/notification.o:notification.c:(.text+0x1910): undefined reference to `_gdk_window_get_origin'
.libs/notification.o:notification.c:(.text+0x191f): undefined reference to `_gtk_widget_get_allocation'
.libs/notification.o:notification.c:(.text+0x1927): undefined reference to `_gtk_widget_get_has_window'
.libs/notification.o:notification.c:(.text+0x1a0b): undefined reference to `_gtk_status_icon_get_type'
.libs/notification.o:notification.c:(.text+0x1d73): undefined reference to `_gtk_status_icon_get_type'
.libs/notification.o:notification.c:(.text+0x1e4f): undefined reference to `_gtk_widget_get_type'
.libs/notification.o:notification.c:(.text+0x20a3): undefined reference to `_gtk_widget_get_type'
.libs/notification.o:notification.c:(.text+0x20e4): undefined reference to `_gtk_status_icon_get_type'

Please revert and reopen.
Comment 7 Bastien Nocera 2010-06-30 11:07:37 UTC
(In reply to comment #6)
> This is not portable.  libnotify explicitly depends on symbols from
> libgdk/libgtk.  On PE platforms (Cygwin/MinGW), as well as on Linux when linked
> with -Wl,z,defs, all symbols must be resolved at link time, so the build fails:

What's the use of libnotify on Windows?
Comment 8 Yaakov Selkowitz 2010-06-30 19:11:39 UTC
Cygwin != Windows.  Cygwin is a *NIX/X11 platform and libnotify/notification-daemon work just like on other *NIX platforms.