On 05/07/2012 12:33 PM, Pierre Labastie 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.
>
> 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.
>
> Regards,
> Pierre

I don't know about your setup but there is definitely something wrong. 
librsvg uses pkg-config to get cflags for cairo. I did not experience 
any problems with that one.

/usr/bin/g-ir-scanner  --add-include-path=. --namespace=Rsvg 
--nsversion=2.0 --libtool="/bin/sh ./libtool" --pkg=pango 
--pkg=libxml-2.0 --include=GLib-2.0 --include=GObject-2.0 
--include=Gio-2.0 --include=cairo-1.0 --include=GdkPixbuf-2.0 
--pkg-export=librsvg-2.0  --library=librsvg-2.la  -I.  rsvg.h 
rsvg-cairo.h librsvg-features.h librsvg-enum-types.h librsvg-features.c 
rsvg-css.c rsvg-defs.c rsvg-image.c rsvg-io.c rsvg-paint-server.c 
rsvg-path.c rsvg-base-file-util.c rsvg-filter.c rsvg-marker.c 
rsvg-mask.c rsvg-shapes.c rsvg-structure.c rsvg-styles.c rsvg-text.c 
rsvg-cond.c rsvg-base.c librsvg-enum-types.c rsvg-cairo-draw.c 
rsvg-cairo-render.c rsvg-cairo-clip.c rsvg.c rsvg-gobject.c 
rsvg-file-util.c rsvg-size-callback.c rsvg-xml.c librsvg-2.la --output 
Rsvg-2.0.gir
g-ir-scanner: compile: gcc -Wall -pthread -I/usr/include/glib-2.0 
-I/usr/lib/glib-2.0/include -I/usr/include/pango-1.0 
-I/usr/include/libxml2 -I. -I/usr/include/glib-2.0 
-I/usr/lib/glib-2.0/include -I/usr/include/gio-unix-2.0/ 
-I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng15 
-I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 
-I/usr/include/pango-1.0 -I/usr/include/libxml2 -c -o 
/home/armin/test/librsvg-2.36.1/tmp-introspect0Upp3P/Rsvg-2.0.o 
/home/armin/test/librsvg-2.36.1/tmp-introspect0Upp3P/Rsvg-2.0.c
g-ir-scanner: link: /bin/sh ./libtool --mode=link --tag=CC gcc -o 
/home/armin/test/librsvg-2.36.1/tmp-introspect0Upp3P/Rsvg-2.0 
-export-dynamic 
/home/armin/test/librsvg-2.36.1/tmp-introspect0Upp3P/Rsvg-2.0.o -L. 
librsvg-2.la -pthread -Wl,--export-dynamic -lgio-2.0 -lgthread-2.0 
-lgmodule-2.0 -lrt -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lxml2
libtool: link: gcc -o 
/home/armin/test/librsvg-2.36.1/tmp-introspect0Upp3P/.libs/Rsvg-2.0 
/home/armin/test/librsvg-2.36.1/tmp-introspect0Upp3P/Rsvg-2.0.o -pthread 
-Wl,--export-dynamic -Wl,--export-dynamic  -L. ./.libs/librsvg-2.so 
-lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpng15 -lcroco-0.6 -lm 
-lgio-2.0 -lgthread-2.0 -lgmodule-2.0 -lrt -lpango-1.0 -lgobject-2.0 
-lglib-2.0 -lxml2 -pthread
g-ir-scanner: Rsvg: warning: 11 warnings suppressed (use --warn-all to 
see them)
/usr/bin/g-ir-compiler --includedir=. --includedir=. Rsvg-2.0.gir -o 
Rsvg-2.0.typelib

As you can see there is -I/usr/include/cairo ...
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to