ocamlc.opt -ccopt "-g -I/usr/include/cairo " ml_cairo_png.c In file included from /usr/include/cairo/cairo-ft.h:47, from ml_cairo_ft.c:13: /usr/include/ft2build.h:56:38: freetype/config/ftheader.h: No such file or directory In file included from ml_cairo_ft.c:13: /usr/include/cairo/cairo-ft.h:48:10: #include expects "FILENAME" or <FILENAME> In file included from ml_cairo_ft.c:13: /usr/include/cairo/cairo-ft.h:60: error: syntax error before "face" /usr/include/cairo/cairo-ft.h:64: error: syntax error before "cairo_ft_scaled_font_lock_face" /usr/include/cairo/cairo-ft.h:64: warning: type defaults to `int' in declaration of `cairo_ft_scaled_font_lock_face' /usr/include/cairo/cairo-ft.h:64: warning: data definition has no type or storage class ml_cairo_ft.c:17: error: syntax error before "err" ml_cairo_ft.c: In function `ml_raise_FT_Error': ml_cairo_ft.c:20: error: `err' undeclared (first use in this function) ml_cairo_ft.c:20: error: (Each undeclared identifier is reported only once ml_cairo_ft.c:20: error: for each function it appears in.) etcetera. If I understand https://bugs.freedesktop.org/show_bug.cgi?id=4262#c4 correctly, cairo-ocaml should do a pkgconfig on freetype in configure.
Using PKG_CHECK_MODULES(CAIRO, cairo >= 0.6.0 freetype2) works, though I don't know if it is correct.
Created attachment 3494 [details] [review] proposed fix This seems to happen with pkg-config versions 0.10..0.17.x; the check for Requires.private support is broken. (note that [] are M4 quote characters)
Closing this bug, Carl fixed the pkgconfig invocation as suggested.
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.