[Cairo] Freetype seems to mandate different headers on debian/sid (powerpc)

Christof Petig christof at petig-baender.de
Tue Nov 18 02:13:41 PST 2003

The following patch was necessary to compile cairo on my debian/sid machine:

diff -u -r1.29 cairo.h
--- src/cairo.h 7 Nov 2003 02:33:28 -0000       1.29
+++ src/cairo.h 18 Nov 2003 10:05:26 -0000
@@ -425,7 +425,8 @@
  /* Fontconfig/Freetype platform-specific font interface */

  #include <fontconfig/fontconfig.h>
-#include <freetype/freetype.h>
+#include <ft2build.h>
+#include FT_FREETYPE_H

  extern cairo_font_t * __external_linkage
  cairo_ft_font_create (FT_Library ft_library, FcPattern *pattern);

don't ask me why, but it looks like the ft maintainers have spent some 
effort to tell ft users about it:

In file included from cairo.h:428,
                  from cairoint.h:46,
                  from cairo.c:28:
/usr/include/freetype2/freetype/freetype.h:20:2: #error "`ft2build.h' 
hasn't been included yet!"
/usr/include/freetype2/freetype/freetype.h:21:2: #error "Please always 
use macros to include FreeType header files."
/usr/include/freetype2/freetype/freetype.h:22:2: #error "Example:"
/usr/include/freetype2/freetype/freetype.h:23:2: #error "  #include 
/usr/include/freetype2/freetype/freetype.h:24:2: #error "  #include 


ii  libfreetype6   2.1.7-1        FreeType 2 font engine, shared library 
ii  libfreetype6-d 2.1.7-1        FreeType 2 font engine, development files
checking for freetype-config... /usr/bin/freetype-config
checking freetype2 libtool version... 9.5.3 - OK

More information about the cairo mailing list