Message: previous - next
Month: June 2012

Re: [trinity-devel] Bug 1063: glib upstream changes to header inclusion (with patch)

From: "David C. Rankin" <drankinatty@...>
Date: Sat, 23 Jun 2012 00:05:09 -0500
On 06/22/2012 04:46 PM, Darrell Anderson wrote:
>> Upsteam glib changes have resulted in build failures giving the message:
>> #error "Only <glib.h> can be included directly."
>> We will want to add preprocessor directives on glib
>> version as well to prevent borking builds on older glib. Also, what about a global fix
>> with sed?
> Which glib version started this latest round of silliness? We need to know that to add preprocessor directives.
> \

My best guess is: glibc (2.15-10 -> 2.15-11) maybe also glib2 (2.32.2-2 ->

> I searched the source tree. Quite a few includes to glib.h. No changes necessary there. I did not perform any kind of complete or exhaustive search, but here is short list of what might need attention:
> tdelibs/kglib/TGlibEventLoop.cpp:22: #include <glib-object.h>
> tdebindings/xparts/mozilla/kmozilla.c:1: #include <glib-object.h>
> libraries/kipi-plugins/kipi-plugins/ipodexport/plugin_ipodexport.cpp:15: #include <glib-object.h> //g_type_init
> applications/koffice/filters/chalk/xcf/xcf/ <glib-object.h>
> applications/koffice/filters/chalk/xcf/xcf/ #include <glib-object.h>
> applications/koffice/filters/chalk/xcf/xcf/ #include <glib-object.h>
> applications/koffice/filters/chalk/xcf/xcf/ #include <glib-object.h>
> applications/kmplayer/src/npplayer.c:33: #include <glib/gprintf.h>
> applications/gtk-qt-engine/src/qt_theme_draw.c:6: #include <glib/glist.h>
> applications/kdbusnotification/src/daemon/daemon.cpp:123: #include <glib-object.h>
> applications/kdbusnotification/src/daemon/daemon.h:51: #include <glib-object.h>
> Short list. :-)
> Darrell

Those are all fine. The issue is with headers that include <glib/something.h>
needing to be rewritten to <glib.h>. Presumably, there is a new glib inclusion
scheme where you just include glib.h and the logic determines which pieces you
need. I still need to read up on this.

David C. Rankin, J.D.,P.E.