GNU bug report logs - #50521
[PATCH core-updates-frozen] gnu: gtk+-2: Fix ‘builder’ test

Previous Next

Package: guix-patches;

Reported by: Thiago Jung Bauermann <bauermann <at> kolabnow.com>

Date: Sat, 11 Sep 2021 17:08:01 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 50521 in the body.
You can then email your comments to 50521 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#50521; Package guix-patches. (Sat, 11 Sep 2021 17:08:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thiago Jung Bauermann <bauermann <at> kolabnow.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 11 Sep 2021 17:08:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Thiago Jung Bauermann <bauermann <at> kolabnow.com>
To: guix-patches <at> gnu.org
Cc: Thiago Jung Bauermann <bauermann <at> kolabnow.com>
Subject: [PATCH core-updates-frozen] gnu: gtk+-2: Fix ‘builder’ test
Date: Sat, 11 Sep 2021 14:07:32 -0300
The signal callbacks in the ‘builder’ testcase have wrong prototypes.
This causes it to fail the “/Builder/Signal Autoconnect” test on
powerpc64le-linux.

Solve the problem by backporting the upstream fix that was applied to
GTK+ 3.0.

* gnu/packages/patches/gtk2-fix-builder-test.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/gtk.scm (gtk+-2): Use it.
---

Hello,

This fixes the build of gtk+-2 on powerpc64le-linux.

Thanks,
Thiago

 gnu/local.mk                                  |  1 +
 gnu/packages/gtk.scm                          |  3 +-
 .../patches/gtk2-fix-builder-test.patch       | 94 +++++++++++++++++++
 3 files changed, 97 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/gtk2-fix-builder-test.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 07e6787642e9..6d19a6332ba0 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1205,6 +1205,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/guile-emacs-fix-configure.patch		\
   %D%/packages/patches/guile-ssh-fix-test-suite.patch		\
   %D%/packages/patches/guile-ssh-read-error.patch		\
+  %D%/packages/patches/gtk2-fix-builder-test.patch		\
   %D%/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch	\
   %D%/packages/patches/gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch \
   %D%/packages/patches/gtk2-theme-paths.patch			\
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 24c24d56530f..c7a682b37548 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -847,7 +847,8 @@ is part of the GNOME accessibility project.")
                 "1nn6kks1zyvb5xikr9y2k7r9bwjy1g4b0m0s66532bclymbwfamc"))
               (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
                                        "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
-                                       "gtk2-theme-paths.patch"))))
+                                       "gtk2-theme-paths.patch"
+                                       "gtk2-fix-builder-test.patch"))))
     (build-system gnu-build-system)
     (outputs '("out" "bin" "doc"))
     (propagated-inputs
diff --git a/gnu/packages/patches/gtk2-fix-builder-test.patch b/gnu/packages/patches/gtk2-fix-builder-test.patch
new file mode 100644
index 000000000000..8c41e596fe95
--- /dev/null
+++ b/gnu/packages/patches/gtk2-fix-builder-test.patch
@@ -0,0 +1,94 @@
+From e45e11238036e06c8fe78bea1691b256ca41837b Mon Sep 17 00:00:00 2001
+From: Steve Langasek <steve.langasek <at> ubuntu.com>
+Date: Tue, 7 Jan 2014 13:55:28 +0100
+Subject: [PATCH] fix prototypes of signal callbacks in the test suite
+
+The signal callbacks are defined to take pointers as their arguments, but the
+callbacks found in testsuite/gtk/builder.c are passing a GParamSpec by value
+as the second argument.  This confuses and angers the compiler on ppc64el,
+resulting in segfaults after return from the function due to stack-smashing
+by the (completely-unused) argument.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=721700
+---
+
+This is a backport to v2.24.33 of upstream commit:
+
+https://gitlab.gnome.org/GNOME/gtk/-/commit/256561db2f0b34e01047f8882b3e0cb8c6d9dbab
+
+ gtk/tests/builder.c | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/gtk/tests/builder.c b/gtk/tests/builder.c
+index 8529dacc2f6e..23d5096062fa 100644
+--- a/gtk/tests/builder.c
++++ b/gtk/tests/builder.c
+@@ -132,7 +132,7 @@ static int object = 0;
+ static int object_after = 0;
+ 
+ void /* exported for GtkBuilder */
+-signal_normal (GtkWindow *window, GParamSpec spec)
++signal_normal (GtkWindow *window, GParamSpec *spec)
+ {
+   g_assert (GTK_IS_WINDOW (window));
+   g_assert (normal == 0);
+@@ -142,7 +142,7 @@ signal_normal (GtkWindow *window, GParamSpec spec)
+ }
+ 
+ void /* exported for GtkBuilder */
+-signal_after (GtkWindow *window, GParamSpec spec)
++signal_after (GtkWindow *window, GParamSpec *spec)
+ {
+   g_assert (GTK_IS_WINDOW (window));
+   g_assert (normal == 1);
+@@ -152,7 +152,7 @@ signal_after (GtkWindow *window, GParamSpec spec)
+ }
+ 
+ void /* exported for GtkBuilder */
+-signal_object (GtkButton *button, GParamSpec spec)
++signal_object (GtkButton *button, GParamSpec *spec)
+ {
+   g_assert (GTK_IS_BUTTON (button));
+   g_assert (object == 0);
+@@ -162,7 +162,7 @@ signal_object (GtkButton *button, GParamSpec spec)
+ }
+ 
+ void /* exported for GtkBuilder */
+-signal_object_after (GtkButton *button, GParamSpec spec)
++signal_object_after (GtkButton *button, GParamSpec *spec)
+ {
+   g_assert (GTK_IS_BUTTON (button));
+   g_assert (object == 1);
+@@ -172,28 +172,28 @@ signal_object_after (GtkButton *button, GParamSpec spec)
+ }
+ 
+ void /* exported for GtkBuilder */
+-signal_first (GtkButton *button, GParamSpec spec)
++signal_first (GtkButton *button, GParamSpec *spec)
+ {
+   g_assert (normal == 0);
+   normal = 10;
+ }
+ 
+ void /* exported for GtkBuilder */
+-signal_second (GtkButton *button, GParamSpec spec)
++signal_second (GtkButton *button, GParamSpec *spec)
+ {
+   g_assert (normal == 10);
+   normal = 20;
+ }
+ 
+ void /* exported for GtkBuilder */
+-signal_extra (GtkButton *button, GParamSpec spec)
++signal_extra (GtkButton *button, GParamSpec *spec)
+ {
+   g_assert (normal == 20);
+   normal = 30;
+ }
+ 
+ void /* exported for GtkBuilder */
+-signal_extra2 (GtkButton *button, GParamSpec spec)
++signal_extra2 (GtkButton *button, GParamSpec *spec)
+ {
+   g_assert (normal == 30);
+   normal = 40;




Information forwarded to guix-patches <at> gnu.org:
bug#50521; Package guix-patches. (Sun, 12 Sep 2021 08:00:02 GMT) Full text and rfc822 format available.

Message #8 received at 50521 <at> debbugs.gnu.org (full text, mbox):

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: Thiago Jung Bauermann <bauermann <at> kolabnow.com>
Cc: 50521 <at> debbugs.gnu.org, Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: Re: [bug#50521] [PATCH core-updates-frozen] gnu: gtk+-2: Fix
 ‘builder’ test
Date: Sun, 12 Sep 2021 07:52:03 +0000
[Message part 1 (text/plain, inline)]
This patch rebuilds over 2900 packages, so maybe it could be pushed at
the same time as #50174 (static gawk), #50239 (diffutils) and #50358
(rust booststrap).
WDYT?
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#50521; Package guix-patches. (Sun, 12 Sep 2021 21:47:02 GMT) Full text and rfc822 format available.

Message #11 received at 50521 <at> debbugs.gnu.org (full text, mbox):

From: Thiago Jung Bauermann <bauermann <at> kolabnow.com>
To: Guillaume Le Vaillant <glv <at> posteo.net>
Cc: 50521 <at> debbugs.gnu.org, Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: Re: [bug#50521] [PATCH core-updates-frozen] gnu: gtk+-2: Fix
 ‘builder’ test
Date: Sun, 12 Sep 2021 18:46:01 -0300
Hello Guillaume,

Em domingo, 12 de setembro de 2021, às 04:52:03 -03, Guillaume Le Vaillant 
escreveu:
> This patch rebuilds over 2900 packages, so maybe it could be pushed at
> the same time as #50174 (static gawk), #50239 (diffutils) and #50358
> (rust booststrap).
> WDYT?

Wow, that is true. I should have checked that, but it hadn’t occured to me 
that this end-of-life toolkit could have so many dependents. Thanks for 
noticing.

-- 
Thanks,
Thiago






Added indication that bug 50521 blocks50358 Request was from Thiago Jung Bauermann <bauermann <at> kolabnow.com> to control <at> debbugs.gnu.org. (Sun, 12 Sep 2021 21:57:02 GMT) Full text and rfc822 format available.

Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Fri, 12 Nov 2021 05:55:02 GMT) Full text and rfc822 format available.

Notification sent to Thiago Jung Bauermann <bauermann <at> kolabnow.com>:
bug acknowledged by developer. (Fri, 12 Nov 2021 05:55:02 GMT) Full text and rfc822 format available.

Message #18 received at 50521-done <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Thiago Jung Bauermann <bauermann <at> kolabnow.com>
Cc: 50521-done <at> debbugs.gnu.org
Subject: Re: bug#50521: [PATCH core-updates-frozen] gnu: gtk+-2: Fix
 ‘builder’ test
Date: Fri, 12 Nov 2021 00:54:06 -0500
Hello,

Thiago Jung Bauermann <bauermann <at> kolabnow.com> writes:

> The signal callbacks in the ‘builder’ testcase have wrong prototypes.
> This causes it to fail the “/Builder/Signal Autoconnect” test on
> powerpc64le-linux.
>
> Solve the problem by backporting the upstream fix that was applied to
> GTK+ 3.0.
>
> * gnu/packages/patches/gtk2-fix-builder-test.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Add it.
> * gnu/packages/gtk.scm (gtk+-2): Use it.
> ---
>
> Hello,
>
> This fixes the build of gtk+-2 on powerpc64le-linux.
>
> Thanks,
> Thiago
>
>  gnu/local.mk                                  |  1 +
>  gnu/packages/gtk.scm                          |  3 +-
>  .../patches/gtk2-fix-builder-test.patch       | 94 +++++++++++++++++++
>  3 files changed, 97 insertions(+), 1 deletion(-)
>  create mode 100644 gnu/packages/patches/gtk2-fix-builder-test.patch
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index 07e6787642e9..6d19a6332ba0 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -1205,6 +1205,7 @@ dist_patch_DATA =						\
>    %D%/packages/patches/guile-emacs-fix-configure.patch		\
>    %D%/packages/patches/guile-ssh-fix-test-suite.patch		\
>    %D%/packages/patches/guile-ssh-read-error.patch		\
> +  %D%/packages/patches/gtk2-fix-builder-test.patch		\
>    %D%/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch	\
>    %D%/packages/patches/gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch \
>    %D%/packages/patches/gtk2-theme-paths.patch			\
> diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
> index 24c24d56530f..c7a682b37548 100644
> --- a/gnu/packages/gtk.scm
> +++ b/gnu/packages/gtk.scm
> @@ -847,7 +847,8 @@ is part of the GNOME accessibility project.")
>                  "1nn6kks1zyvb5xikr9y2k7r9bwjy1g4b0m0s66532bclymbwfamc"))
>                (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
>                                         "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
> -                                       "gtk2-theme-paths.patch"))))
> +                                       "gtk2-theme-paths.patch"
> +                                       "gtk2-fix-builder-test.patch"))))
>      (build-system gnu-build-system)
>      (outputs '("out" "bin" "doc"))
>      (propagated-inputs
> diff --git a/gnu/packages/patches/gtk2-fix-builder-test.patch b/gnu/packages/patches/gtk2-fix-builder-test.patch
> new file mode 100644
> index 000000000000..8c41e596fe95
> --- /dev/null
> +++ b/gnu/packages/patches/gtk2-fix-builder-test.patch
> @@ -0,0 +1,94 @@
> +From e45e11238036e06c8fe78bea1691b256ca41837b Mon Sep 17 00:00:00 2001
> +From: Steve Langasek <steve.langasek <at> ubuntu.com>
> +Date: Tue, 7 Jan 2014 13:55:28 +0100
> +Subject: [PATCH] fix prototypes of signal callbacks in the test suite
> +
> +The signal callbacks are defined to take pointers as their arguments, but the
> +callbacks found in testsuite/gtk/builder.c are passing a GParamSpec by value
> +as the second argument.  This confuses and angers the compiler on ppc64el,
> +resulting in segfaults after return from the function due to stack-smashing
> +by the (completely-unused) argument.
> +
> +https://bugzilla.gnome.org/show_bug.cgi?id=721700
> +---
> +
> +This is a backport to v2.24.33 of upstream commit:
> +
> +https://gitlab.gnome.org/GNOME/gtk/-/commit/256561db2f0b34e01047f8882b3e0cb8c6d9dbab
> +
> + gtk/tests/builder.c | 16 ++++++++--------
> + 1 file changed, 8 insertions(+), 8 deletions(-)
> +
> +diff --git a/gtk/tests/builder.c b/gtk/tests/builder.c
> +index 8529dacc2f6e..23d5096062fa 100644
> +--- a/gtk/tests/builder.c
> ++++ b/gtk/tests/builder.c
> +@@ -132,7 +132,7 @@ static int object = 0;
> + static int object_after = 0;
> + 
> + void /* exported for GtkBuilder */
> +-signal_normal (GtkWindow *window, GParamSpec spec)
> ++signal_normal (GtkWindow *window, GParamSpec *spec)
> + {
> +   g_assert (GTK_IS_WINDOW (window));
> +   g_assert (normal == 0);
> +@@ -142,7 +142,7 @@ signal_normal (GtkWindow *window, GParamSpec spec)
> + }
> + 
> + void /* exported for GtkBuilder */
> +-signal_after (GtkWindow *window, GParamSpec spec)
> ++signal_after (GtkWindow *window, GParamSpec *spec)
> + {
> +   g_assert (GTK_IS_WINDOW (window));
> +   g_assert (normal == 1);
> +@@ -152,7 +152,7 @@ signal_after (GtkWindow *window, GParamSpec spec)
> + }
> + 
> + void /* exported for GtkBuilder */
> +-signal_object (GtkButton *button, GParamSpec spec)
> ++signal_object (GtkButton *button, GParamSpec *spec)
> + {
> +   g_assert (GTK_IS_BUTTON (button));
> +   g_assert (object == 0);
> +@@ -162,7 +162,7 @@ signal_object (GtkButton *button, GParamSpec spec)
> + }
> + 
> + void /* exported for GtkBuilder */
> +-signal_object_after (GtkButton *button, GParamSpec spec)
> ++signal_object_after (GtkButton *button, GParamSpec *spec)
> + {
> +   g_assert (GTK_IS_BUTTON (button));
> +   g_assert (object == 1);
> +@@ -172,28 +172,28 @@ signal_object_after (GtkButton *button, GParamSpec spec)
> + }
> + 
> + void /* exported for GtkBuilder */
> +-signal_first (GtkButton *button, GParamSpec spec)
> ++signal_first (GtkButton *button, GParamSpec *spec)
> + {
> +   g_assert (normal == 0);
> +   normal = 10;
> + }
> + 
> + void /* exported for GtkBuilder */
> +-signal_second (GtkButton *button, GParamSpec spec)
> ++signal_second (GtkButton *button, GParamSpec *spec)
> + {
> +   g_assert (normal == 10);
> +   normal = 20;
> + }
> + 
> + void /* exported for GtkBuilder */
> +-signal_extra (GtkButton *button, GParamSpec spec)
> ++signal_extra (GtkButton *button, GParamSpec *spec)
> + {
> +   g_assert (normal == 20);
> +   normal = 30;
> + }
> + 
> + void /* exported for GtkBuilder */
> +-signal_extra2 (GtkButton *button, GParamSpec spec)
> ++signal_extra2 (GtkButton *button, GParamSpec *spec)
> + {
> +   g_assert (normal == 30);
> +   normal = 40;

Now in core-updates-frozen with commit
4b4e35a771cbcc7b72d28e9a4c6a0d6de2000175.

Thank you!

Closing.

Maxim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 10 Dec 2021 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 99 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.