Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 889008

Summary: gnome-base/gnome-control-center-45.2 fails to compile (lto): ../gnome-control-center-43.2/panels/color/cc-color-panel.c:1877:20: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
Product: Gentoo Linux Reporter: Kostadin Shishmanov <kocelfc>
Component: Current packagesAssignee: Gentoo Linux Gnome Desktop Team <gnome>
Status: RESOLVED FIXED    
Severity: normal CC: anthonyryan1, ceamac, jstein
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
See Also: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2563
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 618550    
Attachments: emerge --info and build log

Description Kostadin Shishmanov 2022-12-30 17:41:52 UTC
Created attachment 845946 [details]
emerge --info and build log

gnome-base/gnome-control-center-43.2 fails to compile with CFLAGS=-flto -Werror=odr -Werror=lto-type-mismatch -Werror-strict-aliasing


../gnome-control-center-43.2/panels/color/cc-color-panel.c:1877:20: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
 1877 |   g_clear_pointer ((GtkWindow **)&prefs->dialog_assign, gtk_window_destroy);
/usr/include/glib-2.0/glib/gmacros.h:824:47: note: in definition of macro ‘G_STATIC_ASSERT’
  824 | #define G_STATIC_ASSERT(expr) _Static_assert (expr, "Expression evaluates to false")
      |                                               ^~~~
../gnome-control-center-43.2/panels/color/cc-color-panel.c:1877:3: note: in expansion of macro ‘g_clear_pointer’
 1877 |   g_clear_pointer ((GtkWindow **)&prefs->dialog_assign, gtk_window_destroy);
      |   ^~~~~~~~~~~~~~~
In file included from /usr/include/glib-2.0/glib/gatomic.h:30,
                 from /usr/include/glib-2.0/glib/gthread.h:34,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:34,
                 from /usr/include/glib-2.0/glib.h:34:
../gnome-control-center-43.2/panels/color/cc-color-panel.c:1877:20: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
 1877 |   g_clear_pointer ((GtkWindow **)&prefs->dialog_assign, gtk_window_destroy);
/usr/include/glib-2.0/glib/glib-typeof.h:39:36: note: in definition of macro ‘glib_typeof’
   39 | #define glib_typeof(t) __typeof__ (t)
      |                                    ^
../gnome-control-center-43.2/panels/color/cc-color-panel.c:1877:3: note: in expansion of macro ‘g_clear_pointer’
 1877 |   g_clear_pointer ((GtkWindow **)&prefs->dialog_assign, gtk_window_destroy);
      |   ^~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
Comment 1 Pacho Ramos gentoo-dev 2023-10-26 15:50:48 UTC
Can you retry with latest version? If still valid, I would try to report it to upstream, otherwise I don't think it will be fixed in the near future. Thanks
https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues
Comment 2 Anthony Ryan 2023-10-31 15:42:55 UTC
Confirmed it's still broke in 45.1, filing a bug report upstream.
Comment 3 Anthony Ryan 2023-10-31 15:44:46 UTC
Looks like someone already reported this upstream.

https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2563
Comment 4 Agostino Sarubbo gentoo-dev 2024-03-05 11:26:48 UTC
lto_tinderbox has reproduced this issue with version 45.2 - Updating summary.
Comment 5 Larry the Git Cow gentoo-dev 2024-03-11 21:33:04 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=29ebff42ad3f27fca5015f1c2e5b1c2f7ae4e0a7

commit 29ebff42ad3f27fca5015f1c2e5b1c2f7ae4e0a7
Author:     Eli Schwartz <eschwartz93@gmail.com>
AuthorDate: 2024-03-11 19:55:05 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-03-11 21:31:42 +0000

    gnome-base/gnome-control-center: mark as LTO-unsafe, strict-aliasing unsafe
    
    Closes: https://bugs.gentoo.org/889008
    Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 .../gnome-control-center/gnome-control-center-45.2.ebuild      | 10 +++++++++-
 .../gnome-control-center/gnome-control-center-45.3.ebuild      | 10 +++++++++-
 2 files changed, 18 insertions(+), 2 deletions(-)