On Mon, 07 May 2012 11:34:23 +0100 Pierre Labastie <pierre.labas...@neuf.fr> wrote:
> Hi, > > A few packages in the gnome chapter fail to build when issuing > g-ir-scanner commands. The reason is they have #include <cairo.h> > directives in header files, and cairo.h is in /usr/include/cairo. > > While it is not a problem with compilation commands, which use > -I/usr/include/cairo, that switch is not used with the g-ir-scanner > command, thus giving an error. > > The affected packages I have found so far are librsvg, > metacity, and libgxps. Thanks for the heads up. I was unaware of the problem as I only install librsvg out of those packages and I was still using librsvg-2.32.0 which compiled fine as it doesn't seem to use gobject-introspection. With librsvg-2.36.1 I get: GISCAN Rsvg-2.0.gir In file included from <stdin>:5:0: /home/andy/librsvg-2.36.1/rsvg-cairo.h:29:19: fatal error: cairo.h: No such file or directory compilation terminated. Error while processing the source. make[2]: *** [Rsvg-2.0.gir] Error 1 make[2]: Leaving directory `/home/andy/librsvg-2.36.1' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/andy/librsvg-2.36.1' make: *** [all] Error 2 > One workaround I have found is : > > sed -i 's@<cairo\.h>@<cairo/cairo.h>@' *.h (or src/*.h > for metacity) > > I do not know much about gobject-introspection, so there could > be better fixes. Anyway, with the current instructions, those > packages do not build. Including cairo/cairo.h in every header seems like quite a large sledgehammer to crack a nut. Perhaps a more delicate solution would be (for librsvg-2.36.1): sed -i '/_gir_CFLAGS/s#$# -I/usr/include/cairo#' Makefile.in Andy -- http://linuxfromscratch.org/mailman/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page