#18386 closed enhancement (fixed)

gtk4-4.12.0

Reported by: Bruce Dubbs Owned by: Bruce Dubbs
Priority: normal Milestone: 12.0
Component: BOOK Version: git
Severity: normal Keywords:
Cc:

Description

New minor version.

Change History (8)

comment:2 by Douglas R. Reno, 20 months ago

That could definitely be a problem. Should we wait until 4.12.1?

Last edited 20 months ago by Douglas R. Reno (previous) (diff)

in reply to:  2 comment:3 by Xi Ruoyao, 20 months ago

Replying to Douglas R. Reno:

That could definitely be a problem. Should we wait until 4.12.1?

If 4.12.1 won't be released on our freeze date we can apply https://gitlab.gnome.org/GNOME/gtk/-/commit/4d7277f72c8f4915f237e36982ffd7dfba524b15.patch.

comment:4 by Bruce Dubbs, 20 months ago

Not checked, but:

sed -e '/gtk_printer_option/i GDK_AVAILABLE_IN_ALL' \

-i gtk/print/gtkprinteroptionprivate.h

:)

comment:5 by Douglas R. Reno, 20 months ago

I tried that sed and it didn't work, it came up with:

---

In file included from ../gtk/print/gtkprinteroptionwidgetprivate.h:20,

from ../gtk/gtkatcontext.c:50:

../gtk/print/gtkprinteroptionprivate.h:38:1: error: multiple storage classes in declaration specifiers

38 | typedef struct _GtkPrinterOption GtkPrinterOption;

|

../gtk/print/gtkprinteroptionprivate.h:82:20: error: expected declaration specifiers or ‘...’ before ‘GtkPrinterOption’

82 | void (*changed) (GtkPrinterOption *option);

| ~

../gtk/print/gtkprinteroptionprivate.h:95:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘*’ token

95 | GtkPrinterOption *gtk_printer_option_new (const char *name,

|

../gtk/print/gtkprinteroptionprivate.h:99:62: error: expected declaration specifiers or ‘...’ before ‘GtkPrinterOption’

99 | void gtk_printer_option_set (GtkPrinterOption *option,

| ~

../gtk/print/gtkprinteroptionprivate.h:102:62: error: expected declaration specifiers or ‘...’ before ‘GtkPrinterOption’

102 | void gtk_printer_option_set_has_conflict (GtkPrinterOption *option,

| ~

../gtk/print/gtkprinteroptionprivate.h:105:62: error: expected declaration specifiers or ‘...’ before ‘GtkPrinterOption’

105 | void gtk_printer_option_clear_has_conflict (GtkPrinterOption *option);

| ~

../gtk/print/gtkprinteroptionprivate.h:107:62: error: expected declaration specifiers or ‘...’ before ‘GtkPrinterOption’

107 | void gtk_printer_option_set_boolean (GtkPrinterOption *option,

| ~

../gtk/print/gtkprinteroptionprivate.h:110:62: error: expected declaration specifiers or ‘...’ before ‘GtkPrinterOption’

110 | void gtk_printer_option_allocate_choices (GtkPrinterOption *option,

| ~

../gtk/print/gtkprinteroptionprivate.h:113:62: error: expected declaration specifiers or ‘...’ before ‘GtkPrinterOption’

113 | void gtk_printer_option_choices_from_array (GtkPrinterOption *option,

| ~

../gtk/print/gtkprinteroptionprivate.h:118:62: error: expected declaration specifiers or ‘...’ before ‘GtkPrinterOption’

118 | gboolean gtk_printer_option_has_choice (GtkPrinterOption *option,

| ~

../gtk/print/gtkprinteroptionprivate.h:121:61: error: expected declaration specifiers or ‘...’ before ‘GtkPrinterOption’

121 | void gtk_printer_option_set_activates_default (GtkPrinterOption *option,

| ~

../gtk/print/gtkprinteroptionprivate.h:124:61: error: expected declaration specifiers or ‘...’ before ‘GtkPrinterOption’

124 | gboolean gtk_printer_option_get_activates_default (GtkPrinterOption *option);

| ~

../gtk/print/gtkprinteroptionwidgetprivate.h:60:60: error: expected declaration specifiers or ‘...’ before ‘GtkPrinterOption’

60 | GtkWidget *gtk_printer_option_widget_new (GtkPrinterOption *source);

| ~

../gtk/print/gtkprinteroptionwidgetprivate.h:63:60: error: expected declaration specifiers or ‘...’ before ‘GtkPrinterOption’

63 | GtkPrinterOption *source);

| ~

ninja: build stopped: subcommand failed.

---

Looking at Xi's patch, it includes gdk/gdk.h, but we still get the same error (definitely need that included though!)

Doing a diff between the patched version and the version from the sed, I noticed this:

--- gtk/print/gtkprinteroptionprivate.h 2023-08-08 11:54:07.494692657 -0500
+++ ../gtk-4.12.0.sed/gtk/print/gtkprinteroptionprivate.h       2023-08-08 11:53:45.096552446 -0500
@@ -31,6 +31,7 @@
 
 G_BEGIN_DECLS
 
+GDK_AVAILABLE_IN_ALL
 #define GTK_TYPE_PRINTER_OPTION             (gtk_printer_option_get_type ())
 #define GTK_PRINTER_OPTION(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_PRINTER_OPTION, GtkPrinterOption))
 #define GTK_IS_PRINTER_OPTION(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_PRINTER_OPTION))

After pulling that extra GDK_AVAILABLE_IN_ALL out of there, it seems to build successfully (and running gtk4-demo shows no console output). I'm on an NVIDIA GPU though so running the tests is not a good idea, somebody else will need to do the update

comment:6 by Bruce Dubbs, 20 months ago

This is a good sed:

sed -e '/glib-object.h/a #include <gdk/gdk.h>'        \
    -e '/ gtk_printer_option/i GDK_AVAILABLE_IN_ALL'  \
    -e '/\*gtk_printer_option/i GDK_AVAILABLE_IN_ALL' \
    -i.orig gtk/print/gtkprinteroptionprivate.h

But for tests I got:

Ok:                 1203
Expected Fail:      0   
Fail:               260 
Unexpected Pass:    0   
Skipped:            4   
Timeout:            0   

I've not investigated the failures yet.

comment:7 by Bruce Dubbs, 20 months ago

Owner: changed from blfs-book to Bruce Dubbs
Status: newassigned

comment:8 by Bruce Dubbs, 20 months ago

Resolution: fixed
Status: assignedclosed

The failures came from ~/.config/gtk-4.0/settings.ini waning some modules that did not exist.

After a couple of false starts, fixed at commits:

66ccf399
316e31c6
6df2d33c
Note: See TracTickets for help on using tickets.