Tim, All,
Upsteam glib changes have resulted in build failures giving the message:
#error "Only <glib.h> can be included directly."
The simply changes required mean exactly what the error says "Only <glib.h> can be included directly". What that means to us is that all header files that include reference to old glib headers in the form
#include <glib/_whatever_.h>
must simply be rewritten as:
#include <glib.h>
Here is the first patch for gtk-qt-engine. I opened bug http://bugs.pearsoncomputing.net/show_bug.cgi?id=1063 to track and collect patches for the apps that Darrell or Tim can then push after they are signed off on.
gtk-qt-engine:
--- gtk-qt-engine/src/qt_theme_draw.c +++ gtk-qt-engine/src/qt_theme_draw.c 2012-06-22 14:02:18.691510787 -0500 @@ -3,7 +3,7 @@ #include <gtk/gtkprogressbar.h> #include <gdk/gdk.h> #include <gtk/gtk.h> -#include <glib/glist.h> +#include <glib.h>
#ifdef HAVE_BONOBO #include <libbonobo.h>
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?
On 06/22/2012 02:24 PM, David C. Rankin wrote:
Upsteam glib changes have resulted in build failures giving the message:
#error "Only <glib.h> can be included directly."
This effects not only TDE packages, but packages required to build TDE. So when you run across this error, you may need to file a bug or contact the package maintainer for your distro. Example, koffice fails to build do to:
In file included from /usr/include/wv2/olestream.h:26:0, from graphicshandler.cpp:23: /usr/include/glib-2.0/glib/giochannel.h:28:2: error: #error "Only <glib.h> can be included directly."
The broken package here is wv2, not koffice. So you may also have to fix and rebuild dependencies before building TDE.
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.
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/xcf-load.cc:24://#include <glib-object.h> applications/koffice/filters/chalk/xcf/xcf/xcf-save.cc:24: #include <glib-object.h> applications/koffice/filters/chalk/xcf/xcf/xcf-read.cc:23: #include <glib-object.h> applications/koffice/filters/chalk/xcf/xcf/xcf-seek.cc:24: #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
With previous versions of glib, looks like glib-object.h is installed in the same parent directory as glib.h (for example, /usr/include/glib-2.0). Unless that header file was absorbed into glib.h, I'm guessing that file is installed in the same location for this newer version of glib. Therefore those includes likely do not need patching.
Although there are quite a few header files in the older glib subdirectory, the only sources we have that seem affected reduce to this list:
applications/kmplayer/src/npplayer.c:33: #include <glib/gprintf.h> applications/gtk-qt-engine/src/qt_theme_draw.c:6: #include <glib/glist.h>
An even shorter list. :-)
Darrell
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 -> 2.32.3-1).
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/xcf-load.cc:24://#include <glib-object.h> applications/koffice/filters/chalk/xcf/xcf/xcf-save.cc:24: #include <glib-object.h> applications/koffice/filters/chalk/xcf/xcf/xcf-read.cc:23: #include <glib-object.h> applications/koffice/filters/chalk/xcf/xcf/xcf-seek.cc:24: #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.