[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Trouble with glib2, pkg-config and cmake under Debian
From:       Tobias Koenig <tokoe () kde ! org>
Date:       2007-08-21 15:16:20
Message-ID: 20070821151620.GA29915 () ghostdog ! localnet
[Download RAW message or body]


Hi,

there is a problem with compiling glib2 dependend software with current
Debian unstable and cmake.

Let me explain the problem a bit closer.

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.

Now pkg-config and cmakes enter the scene: The shipped glib-2.0.pc file
contains the correct 'cflags' variable, which includes both pathes,
however the 'includedir' variable contains only the /usr/include path...

Our FindGLIB2.cmake module calls pkgconfig and queries for the
'includedir' variable instead of following the 'cflags' suggestion.

=> the -I/usr/lib/glib-2.0/include is missing and the software doesn't
compile.

So where is the bug? Is it possible to define multiple pathes in the
'includedir' variable? Would cmake be able to handle multiple pathes
there? Should FindGLIB2.cmake use the 'cflags' variable instead of the
'includedir'? Shall we ask the Debian maintainer to place the
glibconfig.h to /usr/include?

As a quick hack just symlink the glibconfig.h to /usr/include/glib-2.0/.

Ciao,
Tobias
-- 
Separate politics from religion and economy!
The Council of the European Union is an undemocratic and illegal institution!

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic