Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 948425 - gnome-base/gnome-control-center-46.4-r1 fails to build with USE="gnome-online-accounts"
Summary: gnome-base/gnome-control-center-46.4-r1 fails to build with USE="gnome-online...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2025-01-20 02:48 UTC by Sven E.
Modified: 2025-01-25 15:39 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build fail log with gcc:14 (gnome-base:gnome-control-center-46.4-r1.build-fail.log,466.30 KB, text/plain)
2025-01-20 22:18 UTC, tdr
Details
emerge --info (emerge--info.txt,6.33 KB, text/plain)
2025-01-20 22:19 UTC, tdr
Details
successful build log, added -fpermissive to CFLAGS (gnome-control-center-46.4-r1:20250120-222257-build-sucess-with-permissive.log,701.72 KB, text/plain)
2025-01-20 22:22 UTC, tdr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sven E. 2025-01-20 02:48:51 UTC
gnome-control-center-46 fails to build with gnome-online-accounts enabled due an incompatible cast of pointers.

Reproducible: Always

Steps to Reproduce:
1. build gnome-control-center-46 with gnome-online-accounts enabled

Actual Results:  
Build failure

Expected Results:  
Clean build

x86_64-pc-linux-gnu-gcc -Ipanels/online-accounts/libonline-accounts.a.p -Ipanels/online-accounts -I../gnome-control-center-46.4/panels/online-accounts -I. -I..   /gnome-control-center-46.4 -Ipanels/common -I../gnome-control-center-46.4/panels/common -I/usr/lib64/libffi/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2   .0/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gsettings-desktop-schemas -I/usr/include/libadwaita-1 -I/usr/include/gtk-4.0 -I/usr/incl   ude/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/webp -I/usr/include/cairo -I/usr/include/libpng16 -I/usr/include/freetype2 -   I/usr/include/pixman-1 -I/usr/include/graphene-1.0 -I/usr/lib64/graphene-1.0/include -I/usr/include/fribidi -I/usr/include/appstream -I/usr/include/gio-unix-2.   0 -I/usr/include/goa-1.0 -I/usr/lib64/goa-1.0/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -DHAVE_CONFIG_H -Wno-deprecated-dec   larations -march=znver2 -O2 -pipe -fno-strict-aliasing -fPIC -mfpmath=sse -msse -msse2 -pthread -mfpmath=sse -msse -msse2 -mfpmath=sse -msse -msse2 '-DG_LOG_DO   MAIN="cc-online-accounts-panel"' '-DPANEL_ID="online-accounts"' '-DLIBEXECDIR="/usr/libexec"' -MD -MQ panels/online-accounts/libonline-accounts.a.p/cc-online-a   ccounts-panel.c.o -MF panels/online-accounts/libonline-accounts.a.p/cc-online-accounts-panel.c.o.d -o panels/online-accounts/libonline-accounts.a.p/cc-online-a   ccounts-panel.c.o -c ../gnome-control-center-46.4/panels/online-accounts/cc-online-accounts-panel.c
In file included from /usr/include/glib-2.0/gobject/gobject.h:26,
                 from /usr/include/glib-2.0/gobject/gbinding.h:31,
                 from /usr/include/glib-2.0/glib-object.h:24,
                 from /usr/include/glib-2.0/gio/gioenums.h:30,
                 from /usr/include/glib-2.0/gio/giotypes.h:30,
                 from /usr/include/glib-2.0/gio/gio.h:28,
                 from ../gnome-control-center-46.4/panels/online-accounts/cc-online-accounts-panel.c:23:
../gnome-control-center-46.4/panels/online-accounts/cc-online-accounts-panel.c: In function ‘show_account’:
/usr/include/glib-2.0/gobject/gtype.h:2656:42: error: passing argument 4 of ‘goa_provider_show_account’ from incompatible pointer type [-Wincompatible-pointer-   types]
 2656 | #  define _G_TYPE_CIC(ip, gt, ct)       ((ct*) (void *) ip)
/usr/include/glib-2.0/gobject/gtype.h:528:66: note: in expansion of macro ‘_G_TYPE_CIC’
  528 | #define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type)    (_G_TYPE_CIC ((instance), (g_type), c_type))
      |                                                                  ^~~~~~~~~~~
/usr/include/gtk-4.0/gtk/gtkwindow.h:39:42: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_CAST’
   39 | #define GTK_WINDOW(obj)                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_WINDOW, GtkWindow))
      |                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
../gnome-control-center-46.4/panels/online-accounts/cc-online-accounts-panel.c:146:30: note: in expansion of macro ‘GTK_WINDOW’
  146 |                              GTK_WINDOW (root),
      |                              ^~~~~~~~~~
In file included from /usr/include/goa-1.0/goabackend/goabackend.h:29,
                 from ../gnome-control-center-46.4/panels/online-accounts/cc-online-account-provider-row.h:26,
                 from ../gnome-control-center-46.4/panels/online-accounts/cc-online-accounts-panel.c:31:
/usr/include/goa-1.0/goabackend/goaprovider.h:81:91: note: expected ‘GtkWidget *’ {aka ‘struct _GtkWidget *’} but argument is of type ‘GtkWindow *’ {aka ‘struc   t _GtkWindow *’}
   81 |                                                                   GtkWidget              *parent,
      |                                                                   ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
../gnome-control-center-46.4/panels/online-accounts/cc-online-accounts-panel.c: In function ‘create_account’:
/usr/include/glib-2.0/gobject/gtype.h:2656:42: error: passing argument 3 of ‘goa_provider_add_account’ from incompatible pointer type [-Wincompatible-pointer-t   ypes]
 2656 | #  define _G_TYPE_CIC(ip, gt, ct)       ((ct*) (void *) ip)
/usr/include/glib-2.0/gobject/gtype.h:528:66: note: in expansion of macro ‘_G_TYPE_CIC’
  528 | #define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type)    (_G_TYPE_CIC ((instance), (g_type), c_type))
      |                                                                  ^~~~~~~~~~~
/usr/include/gtk-4.0/gtk/gtkwindow.h:39:42: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_CAST’
   39 | #define GTK_WINDOW(obj)                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_WINDOW, GtkWindow))
      |                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
../gnome-control-center-46.4/panels/online-accounts/cc-online-accounts-panel.c:183:29: note: in expansion of macro ‘GTK_WINDOW’
  183 |                             GTK_WINDOW (parent),
      |                             ^~~~~~~~~~
/usr/include/goa-1.0/goabackend/goaprovider.h:59:91: note: expected ‘GtkWidget *’ {aka ‘struct _GtkWidget *’} but argument is of type ‘GtkWindow *’ {aka ‘struc   t _GtkWindow *’}
   59 |                                                                   GtkWidget              *parent,
      |                                                                   ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-20 22:01:41 UTC
Please always include the full build.log and emerge --info.
Comment 2 tdr 2025-01-20 22:18:18 UTC
Created attachment 917189 [details]
build fail log with gcc:14

build fail with gcc:14 .. gcc:15 fails the same way
Comment 3 tdr 2025-01-20 22:19:38 UTC
Created attachment 917190 [details]
emerge --info

emerge --info
compiler is native set to 15 but build fail log was run set to gcc:15
Comment 4 tdr 2025-01-20 22:22:56 UTC
Created attachment 917191 [details]
successful build log, added -fpermissive to CFLAGS
Comment 5 Sven E. 2025-01-20 22:26:29 UTC
diff '--color=auto' -Naur gnome-control-center-46.4-orig/panels/online-accounts/cc-online-accounts-panel.c gnome-control-center-46.4-new/panels/online-accounts/cc-online-accounts-panel.c
--- gnome-control-center-46.4-orig/panels/online-accounts/cc-online-accounts-panel.c    2024-08-05 11:33:47.000000000 +0200
+++ gnome-control-center-46.4-new/panels/online-accounts/cc-online-accounts-panel.c     2025-01-20 03:38:04.562858815 +0100
@@ -143,7 +143,7 @@
   goa_provider_show_account (provider,
                              self->client,
                              object,
-                             GTK_WINDOW (root),
+                             GTK_WIDGET (root),
                              cc_panel_get_cancellable (CC_PANEL (self)),
                              (GAsyncReadyCallback) show_account_cb,
                              self);
@@ -180,7 +180,7 @@
   parent = gtk_widget_get_root (GTK_WIDGET (self));
   goa_provider_add_account (provider,
                             self->client,
-                            GTK_WINDOW (parent),
+                            GTK_WIDGET (parent),
                             cc_panel_get_cancellable (CC_PANEL (self)),
                             (GAsyncReadyCallback) create_account_cb,
                             self);

-------
Attaching via pybugz does nto work. This simply casts to GTK_WIDGET instead of GTK_WINDOW. Seems to build and displays the online accounts in CC, however, looking at the functions interface, it seems to expect a vbox, which in turn is a derivation of widget. Maybe someone mor familiar with GTK can elaborate on this.
Comment 6 Aisha Tammy 2025-01-24 05:51:36 UTC
(In reply to Sven E. from comment #5)

That does seem to be the solution, upstream patch for reference - https://gitlab.gnome.org/GNOME/gnome-control-center/-/commit/efe17b54f2e3e487cb25787522aba07094337b00