Project

General

Profile

Bug #850605

S2_5 gtk3-client build failure with glib >= 2.58

Added by Marko Lindqvist 6 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Category:
gui-gtk-3
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Glib-2.58 deprecated g_type_class_add_private() & G_TYPE_INSTANCE_GET_PRIVATE() used by S2_5 gtkpixcomm code. The good alternatives for them were introduced in glib-2.38, but our minimum requirement is lower than that -> need to do some #if'ing based on glib version macros.

Later branches are not affected.

History

#1 Updated by Marko Lindqvist 6 months ago

#2 Updated by Marko Lindqvist 6 months ago

Commit message has a typo that I try to remember to amend before pushing the commit; number of the glib version that introduced replacement functionality was 2.38, not 2.8.

#3 Updated by Jacob Nevins 6 months ago

For the record:

I understand from IRC this was triggered by failure to compile on Debian testing with errors like

../../../../src/client/gui-gtk-3.0/gtkpixcomm.c:93:13: error: G_ADD_PRIVATE [-Werror]
   93 |   GtkPixcommPrivate *priv = GTK_PIXCOMM_GET_PRIVATE(pixcomm);

Testing currently has glib2.0 2.62.x. I'm currently on Debian stable (Buster) which has glib2.0 2.58.3-2+deb10u2, and I don't see any such errors.

I think this is because while this stuff was documented as deprecated in 2.58, that wasn't enforced until around 2.61.x (see this glib commit).

(For completeness, I've tried this patch on Debian Buster and had no obvious trouble.)

#4 Updated by Marko Lindqvist 6 months ago

  • Status changed from Resolved to Closed
  • Assignee set to Marko Lindqvist

Also available in: Atom PDF