#1150262 gtkmm: Compile error: conflicting declaration `using GdkCursorClass = struct _GdkCursorClass`

Package:
libgtkmm-4.0-dev
Source:
libgtkmm-4.0-dev
Description:
C++ wrappers for GTK4 (development files)
Submitter:
Andre Offringa
Date:
2026-10-07 19:09:02 UTC
Severity:
normal
#1150262#5
Date:
2026-10-07 18:53:58 UTC
From:
To:
Dear Maintainer,

When compiling software that includes a gtkmm header file, using g++, the
software fails to compile due to this error:

/usr/include/gtkmm-4.0/gdkmm/cursor.h:30:7: error: conflicting declaration
‘using GdkCursorClass = struct _GdkCursorClass’

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/glibmm-2.68/glibmm/class.h:21,
                 from /usr/include/glibmm-2.68/glibmm/objectbase.h:21,
                 from /usr/include/glibmm-2.68/glibmm/object.h:29,
                 from /usr/include/gtkmm-4.0/gdkmm/clipboard.h:25,
                 from /usr/include/gtkmm-4.0/gtkmm/widget.h:32:
/usr/include/gtk-4.0/gdk/gdkcursor.h:38:1: note: previous declaration as
‘typedef struct GdkCursorClass GdkCursorClass’

This seems to hold for including most of the header files, in this case e.g.
the widget.h file:

[..]
In file included from /usr/include/gtkmm-4.0/gtkmm/widget.h:33,
                 from /usr/include/gtkmm-4.0/gtkmm/box.h:26,
[..]

This affects e.g. the build of the aoflagger package (and probably many
others), which no longer builds against the current version of
libgtkmm-4.0-dev.

Regards,
André

#1150262#10
Date:
2026-10-07 19:05:10 UTC
From:
To:
Version: 4.24.0-1

I believe this issue is fixed in gtkmm4.0 4.24.0-2 which is in
Unstable and should migrate to Testing in the next day or so. Sorry
for the inconvenience.

Thank you,
Jeremy Bícha

#1150262#15
Date:
2026-10-07 19:07:42 UTC
From:
To:
...

This looks like an incompatibility between older gtkmm4.0 and newer
GTK4. Please try upgrading libgtkmm-4.0-dev to the version from
unstable.

     smcv