Bug 29736

Summary: [pixman 0.19.2] Does not build cleanly
Product: pkg-config Reporter: Bug Reporter <my.somewhat.lengthy.loginname>
Component: srcAssignee: Tollef Fog Heen <tfheen>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: medium CC: soren.sandmann
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Build log for the bug report
Build log from "make V=1" (when pixman is not installed)
pkg-config output (slightly more detailed than requested in comment #2)

Description Bug Reporter 2010-08-22 13:43:56 UTC
PROBLEM DESCRIPTION: For my update to pixman 0.19.2 I completely uninstalled the previous version of pixman, then I ran "./configure --prefix=/usr ; make". The build process stopped in the "make" stage with the following error message:

  CCLD   composite
  CC     clip-test.o
In file included from clip-test.c:4:0:
gtk-utils.h:3:18: fatal error: glib.h: No such file or directory
compilation terminated.
make[2]: *** [clip-test.o] Error 1
make[2]: Leaving directory `/tmp/pixman-0.19.2/test'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/pixman-0.19.2'
make: *** [all] Error 2

That is not right, both GTK+ 2.20.1 and GLIB 2.24.2 are properly installed here. -- The full build log is attached.

WORKAROUND 1: Building with "./configure --prefix=/usr --disable-gtk" succeeded.

WORKAROUND 2: If pixman is already installed, the problem does not occur. I detected this when I compiled pixman 0.19.2 once more, after it had been installed with workaround 1.
Comment 1 Bug Reporter 2010-08-22 13:44:52 UTC
Created attachment 38070 [details]
Build log for the bug report
Comment 2 Søren Sandmann Pedersen 2010-08-23 03:40:30 UTC
Thanks for the bug report.

Please post:

- the log when building with

    make V=1

  when pixman is not installed,

- the output of 

    pkg-config --cflags --libs glib-2.0
    pkg-config --cflags --libs gtk+-2.0

- and finally, the location of glib.h on your system

Thanks,
Comment 3 Bug Reporter 2010-08-23 04:42:48 UTC
Created attachment 38091 [details]
Build log from "make V=1" (when pixman is not installed)
Comment 4 Bug Reporter 2010-08-23 04:47:41 UTC
Created attachment 38092 [details]
pkg-config output (slightly more detailed than requested in comment #2)
Comment 5 Bug Reporter 2010-08-23 04:51:12 UTC
... and finally the location of glib.h:

root [~] find /usr -name glib.h
/usr/include/glib-2.0/glib.h
root [~]
Comment 6 Søren Sandmann Pedersen 2010-08-23 05:35:08 UTC
What does

    pkg-config --version

say?
Comment 7 Bug Reporter 2010-08-23 05:54:50 UTC
(In reply to comment #6)

It says 0.25 .
Comment 8 Søren Sandmann Pedersen 2010-08-23 06:54:39 UTC
So apparently there is a difference in behavior between pkg-config v 0.23 and v 0.25, where in 0.25 PKG_CONFIG_EXISTS will return true for gtk+-2.0 even though the pixman dependency is missing, whereas in 0.23 it won't.

I'll mail a patch shortly that should work around the problem in pixman. 

Moving this bug to pkg-config, although I'm not sure if the change is intentional or not.


Here is the configure.ac code in question:

AC_ARG_ENABLE(gtk,
   [AC_HELP_STRING([--enable-gtk],
                   [enable tests using GTK+ [default=auto]])],
   [enable_gtk=$enableval], [enable_gtk=auto])

PKG_PROG_PKG_CONFIG
if test $enable_gtk = auto ; then
   PKG_CHECK_EXISTS([gtk+-2.0], [enable_gtk=yes], [enable_gtk=no])
fi
if test $enable_gtk = yes ; then
   PKG_CHECK_MODULES(GTK, [gtk+-2.0])
fi

AM_CONDITIONAL(HAVE_GTK, [test "x$enable_gtk" = xyes])
Comment 9 Tollef Fog Heen 2011-04-13 13:07:44 UTC
The pkg-config bit of this is a dupe of #36039.  Please note that this hasn't hit a released version yet, but I hope to release a new version very soon.

*** This bug has been marked as a duplicate of bug 36039 ***

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.