error: expected declaration specifiers or ‘…’ before ‘G_CONST_RETURN’

After upgrading a few packages on one of my Gentoo machines, I was greeted with repeated errors like this one, whilst trying to emerge Avahi:

/usr/include/pango-1.0/pango/pango-script.h:132: error: expected declaration specifiers or '...' before 'G_CONST_RETURN'
/usr/include/pango-1.0/pango/pango-script.h:133: error: expected declaration specifiers or '...' before 'G_CONST_RETURN'
In file included from /usr/include/pango-1.0/pango/pango-script.h:138,
                 from /usr/include/pango-1.0/pango/pango-gravity.h:98,
                 from /usr/include/pango-1.0/pango/pango-types.h:91,
                 from /usr/include/pango-1.0/pango/pango-font.h:26,
                 from /usr/include/pango-1.0/pango/pango-attributes.h:25,
                 from /usr/include/pango-1.0/pango/pango.h:25,
                 from /usr/include/gtk-2.0/gdk/gdktypes.h:37,
                 from /usr/include/gtk-2.0/gdk/gdkscreen.h:32,
                 from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:31,
                 from /usr/include/gtk-2.0/gdk/gdk.h:32,
                 from /usr/include/gtk-2.0/gtk/gtk.h:32,
                 from avahi-ui.c:30:

After doing some research, the problem seems to be that I have recently upgraded to version 2.30.0 of dev-libs/glib, which has removed G_CONST_RETURN . I believe packages in the future will remove references to G_CONST_RETURN , but for now, the best solution is to mask ( or remove from keywords ):

=dev-libs/glib-2.30.0

and reinstall the current stable version:

=dev-libs/glib-2.28.8

.

Leave a Reply

Your email address will not be published. Required fields are marked *