Trouble with glib2, pkg-config and cmake under Debian

Hans Meine hans_meine at
Tue Aug 21 16:43:41 BST 2007

Am Dienstag, 21. August 2007 17:27:03 schrieb Andreas Pakulat:
> > The current libglib2.0-dev package contains nearly all header files
> > under /usr/include/glib-2.0/ but the file glibconfig.h is located under
> > /usr/lib/glib-2.0/include. Unfortunately, some header files from
> > /usr/include/glib-2.0/ include the glibconfig.h by '#include
> > <glibconfig.h>'.
> >
> > So when you want to compile your software you have to add both path
> > /usr/include/glib-2.0 _and_ /usr/lib/glib-2.0/include to the -I flag.
> Thats a glib-packaging bug in Debian, they obviously don't move that
> header but they should as headers don't belong under /usr/lib.

There are probably good reasons to put glibconfig.h there - hint: 
platform-dependent vs. platform-independent header files.  This is the same 
with qmodules.h and qconfig.h - those should *not* be in $PREFIX/include.
Otherwise, it becomes impossible to use --exec-prefix properly for installing 
software in a multi-platform NFS setup.

> > 'includedir'? Shall we ask the Debian maintainer to place the
> > glibconfig.h to /usr/include?
> The last thing is the right thing to do.

I doubt that.

I don't know what the "proper" solution is, but AFAICS, you *do* need two -I 
paths in CPPFLAGS.  The only alternative solution I see is a platform-depend 
include directory with *all* files duplicated (possibly symlinked).

Ciao, /  /
    /  / ANS

More information about the kde-core-devel mailing list