Bug 57812 - Missing cflags for libtoytoolkit
Summary: Missing cflags for libtoytoolkit
Status: RESOLVED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: weston (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-02 17:25 UTC by Carles Pagès
Modified: 2013-01-29 22:13 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
cflags patch for clients/Makefile.am (416 bytes, text/plain)
2012-12-02 17:25 UTC, Carles Pagès
Details
cflags patch for clients/Makefile.am v2 (1.41 KB, patch)
2012-12-07 09:57 UTC, Carles Pagès
Details | Splinter Review
Build log (15.41 KB, text/plain)
2013-01-28 18:19 UTC, Carles Pagès
Details

Description Carles Pagès 2012-12-02 17:25:17 UTC
Created attachment 70936 [details]
cflags patch for clients/Makefile.am

Trying to compile weston clients from 1.0.2 tarball, I got several errors from missing cflags:
 - pixman header was not found
 - cairo header was not found
 - DATADIR was not defined

All of those are used in window.c. The attached patch solves those issues.
Comment 1 Carles Pagès 2012-12-07 09:57:11 UTC
Created attachment 71120 [details] [review]
cflags patch for clients/Makefile.am v2

Updated the patch since several other clients were missing cflags for include paths (cairo and pixman). With this version everything finally builds.

The patch now solves more issues than what the bug subject mentions, but I thought it was better to update the one here rather than open a new one.
Comment 2 Kristian Høgsberg 2012-12-14 16:09:55 UTC
(In reply to comment #1)
> Created attachment 71120 [details] [review] [review]
> cflags patch for clients/Makefile.am v2
> 
> Updated the patch since several other clients were missing cflags for
> include paths (cairo and pixman). With this version everything finally
> builds.
> 
> The patch now solves more issues than what the bug subject mentions, but I
> thought it was better to update the one here rather than open a new one.

I'm not sure what the problem you're seeing is but we have

AM_CPPFLAGS =                                   \
        -DDATADIR='"$(datadir)"'                \
	-DBINDIR='"$(bindir)"'                  \
        $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)

in clients/Makefile.am and that propagates to CPPFLAGS for all clients that don't explicitly set their own (eg like simple_shm_CPPFLAGS).  Can you provide full output of how you configure and build the tarball?
Comment 3 Carles Pagès 2013-01-28 18:19:49 UTC
Created attachment 73785 [details]
Build log

This is with the latest tarball. Let me know if you need anything else.
Comment 4 Kristian Høgsberg 2013-01-28 21:56:03 UTC
(In reply to comment #3)
> Created attachment 73785 [details]
> Build log
> 
> This is with the latest tarball. Let me know if you need anything else.

Thanks, that helps.  This should be fixed in git master.  I don't think we'll release a 1.0.5 release for just this fix, but you should be able to work around it by passing CPPFLAGS="$(pkg-config --cflag pixman-1)" along with the other configure arguments.
Comment 5 Kristian Høgsberg 2013-01-28 21:58:56 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Created attachment 73785 [details]
> > Build log
> > 
> > This is with the latest tarball. Let me know if you need anything else.
> 
> Thanks, that helps.  This should be fixed in git master.  I don't think
> we'll release a 1.0.5 release for just this fix, but you should be able to
> work around it by passing CPPFLAGS="$(pkg-config --cflag pixman-1)" along
> with the other configure arguments.

Btw, the reason it all builds fine for me is that I get:

[krh@tokamak weston]$ pkg-config --cflags cairo
-I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/include/libdrm  

that is, the cairo cflags include the pixman include path.  That doesn't mean that it wasn't a bug in the weston Makefile.am, but I just wonder why you don't have that?
Comment 6 Carles Pagès 2013-01-29 22:13:49 UTC
(In reply to comment #5)
> Btw, the reason it all builds fine for me is that I get:
> 
> [krh@tokamak weston]$ pkg-config --cflags cairo
> -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
> -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15
> -I/usr/include/libdrm  
> 
> that is, the cairo cflags include the pixman include path.  That doesn't
> mean that it wasn't a bug in the weston Makefile.am, but I just wonder why
> you don't have that?

From the crash course I just did on pkg-config, it looks like there is something wrong on my setup. Thanks for your help!


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.