error: librsvg/rsvg-cairo.h: No such file or directory

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
randomdan

error: librsvg/rsvg-cairo.h: No such file or directory

Post by randomdan »

Hi,

I'm trying to build ImageMagick on a shared host (dreamhost). I've installed cairo-1.10.0 and librsvg-2.9.5 but I'm getting the error "librsvg/rsvg-cairo.h: No such file or directory" (followed by other errors). Any ideas?

Thanks!
Dan

---

CC coders/magick_libMagickCore_la-svg.lo
coders/svg.c:95:32: error: librsvg/rsvg-cairo.h: No such file or directory
coders/svg.c: In function 'ReadSVGImage':
coders/svg.c:2742: error: 'cairo_surface_t' undeclared (first use in this function)
coders/svg.c:2742: error: (Each undeclared identifier is reported only once
coders/svg.c:2742: error: for each function it appears in.)
coders/svg.c:2743: error: 'cairo_surface' undeclared (first use in this function)
coders/svg.c:2745: error: 'cairo_t' undeclared (first use in this function)
coders/svg.c:2746: error: 'cairo_info' undeclared (first use in this function)
coders/svg.c:2751: error: 'RsvgDimensionData' undeclared (first use in this function)
coders/svg.c:2752: error: expected ';' before 'dimension_info'
coders/svg.c:2804: warning: implicit declaration of function 'rsvg_handle_get_dimensions'
coders/svg.c:2804: error: 'dimension_info' undeclared (first use in this function)
coders/svg.c:2842: warning: implicit declaration of function 'cairo_image_surface_create_for_data'
coders/svg.c:2843: error: 'CAIRO_FORMAT_ARGB32' undeclared (first use in this function)
coders/svg.c:2844: error: expected expression before ')' token
coders/svg.c:2850: warning: implicit declaration of function 'cairo_create'
coders/svg.c:2851: warning: implicit declaration of function 'cairo_set_operator'
coders/svg.c:2851: error: 'CAIRO_OPERATOR_CLEAR' undeclared (first use in this function)
coders/svg.c:2852: warning: implicit declaration of function 'cairo_paint'
coders/svg.c:2853: error: 'CAIRO_OPERATOR_OVER' undeclared (first use in this function)
coders/svg.c:2854: warning: implicit declaration of function 'rsvg_handle_render_cairo'
coders/svg.c:2855: warning: implicit declaration of function 'cairo_destroy'
coders/svg.c:2856: warning: implicit declaration of function 'cairo_surface_destroy'
make[1]: *** [coders/magick_libMagickCore_la-svg.lo] Error 1
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: error: librsvg/rsvg-cairo.h: No such file or directory

Post by magick »

Add --without-rsvg to the configure script command line and rebuild ImageMagick. Alternatively, make sure the RSVG and CAIRO development headers are installed on your system.
randomdan

Re: error: librsvg/rsvg-cairo.h: No such file or directory

Post by randomdan »

Thanks - I'd really like to be able to convert SVG images though. Can you explain a little more about installing the development headers? Where can I get the files and where should I put them on my system?
geep999
Posts: 17
Joined: 2010-12-10T07:33:21-07:00
Authentication code: 8675308

Re: error: librsvg/rsvg-cairo.h: No such file or directory

Post by geep999 »

Hi,
You've got the latest cairo-1.10.0 (Sep 2010) but librsvg-2.9.5 is ancient (Jan 2005) and does not contain rsvg-cairo.h
Suggest you try the latest from here:
http://ftp.gnome.org/pub/GNOME/sources/librsvg/2.32/

On my Slackware 13.0 I have librsvg-2.26.0 + cairo-1.8.8 and on Slackware Current librsvg-2.32.0 + cairo-1.10.0
I note that on Slackware Current there is a patch for Cairo, detailed here
http://bugs.gentoo.org/show_bug.cgi?id=336696
and available here:
http://www.mirrorservice.org/sites/ftp. ... s.patch.gz

Cheers,
Peter
randomdan

Re: error: librsvg/rsvg-cairo.h: No such file or directory

Post by randomdan »

Hi Peter,

I really appreciate your help! I didn't realize that my librsvg was out of date - after installing the latest version, imagemagick built without errors and works!

Regards,
Dan
Post Reply