Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 175020 - SVG support in media-gfx/imagemagick requires gnome-base/librsvg
Summary: SVG support in media-gfx/imagemagick requires gnome-base/librsvg
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Karol Wojtaszek (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-18 04:30 UTC by Tim Cera
Modified: 2007-10-17 03:38 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Cera 2007-04-18 04:30:54 UTC
ImageMagick has preliminary support for SVG, but only if gnome-base/librsvg is installed. Suggest adding 'svg' to IUSE and gnome-base/librsvg as a RDEPEND.



Reproducible: Always

Steps to Reproduce:
Comment 1 Andrej Kacian (RETIRED) gentoo-dev 2007-04-18 05:50:11 UTC
Bryan, you might want to take this one, since sekretarz is MIA... If not, I can do it.
Comment 2 Petteri Räty (RETIRED) gentoo-dev 2007-04-18 08:34:29 UTC
It's converting svg files already without librsvg:

betelgeuse@pena ~/harri/pics $ checkdeps.rb imagemagic | grep librsvg
betelgeuse@pena ~/harri/pics $ convert ellipse.svg ellipse.jpg
betelgeuse@pena ~/harri/pics $
Comment 3 Tim Cera 2007-04-19 01:48:05 UTC
(In reply to comment #2)
> It's converting svg files already without librsvg:
> 
> betelgeuse@pena ~/harri/pics $ checkdeps.rb imagemagic | grep librsvg
> betelgeuse@pena ~/harri/pics $ convert ellipse.svg ellipse.jpg
> betelgeuse@pena ~/harri/pics $

I don't know what checkdeps.rb does, but librsvg seems to be a dynamic library loaded (on my machine) by `/usr/lib64/ImageMagick-6.3.0/modules-Q16/coders/svg.la'

Petteri Räty: could you have librsvg installed for some other reason, yet it doesn't show up in whatever checkdeps.rb is reporting?

Here is the error:

convert: unable to load module `/usr/lib64/ImageMagick-6.3.0/modules-Q16/coders/svg.la': librsvg-2.so.2: cannot open shared object file: No such file or directory.

Just installing gnome-base/librsvg fixed it.  I didn't have to re-emerge imagemagick.
Comment 4 ytiruceslaicos 2007-04-19 03:22:39 UTC
In http://redux.imagemagick.org/discussion-server/viewtopic.php?f=3&t=6305, it is  stated that the librsvg conversion causes segfaults, and that without librsvg "SVG will still convert but it will use the internal ImageMagick SVG render engine."
Comment 5 Tim Cera 2007-04-19 04:08:11 UTC
Excellent link. Thanks.

The same poster that you quoted also says, "You can fix the problem by adding --without-rsvg to your configure script command line." 

If the above is true, and I haven't tested this yet, the best solution is to add the above compiler option, instead of my earlier suggestion to add librsvg as a RDEPEND.

Right now, imagemagick is compiled to look for librsvg.
Comment 6 Bryan Østergaard (RETIRED) gentoo-dev 2007-04-19 13:12:07 UTC
(In reply to comment #5)
> Excellent link. Thanks.
> 
> The same poster that you quoted also says, "You can fix the problem by adding
> --without-rsvg to your configure script command line." 
> 
> If the above is true, and I haven't tested this yet, the best solution is to
> add the above compiler option, instead of my earlier suggestion to add librsvg
> as a RDEPEND.
> 
> Right now, imagemagick is compiled to look for librsvg.
> 

Could you test using imagemagick 6.3.3? It seems to work fine on my laptop with or without librsvg installed.
Comment 7 ytiruceslaicos 2007-04-19 19:08:41 UTC
(In reply to comment #6)
> Could you test using imagemagick 6.3.3? It seems to work fine on my laptop with
> or without librsvg installed.
> 
I built it with that flag today, and I haven't had any problems so far (SVG displays and converts normally, comparing the results of display to the results of eog).
Comment 8 Bryan Østergaard (RETIRED) gentoo-dev 2007-04-19 20:42:22 UTC
Ok, marking this fixed then. We also had another test case (devmanual.gentoo.org) where SVG files weren't converted properly but that's also fixed in 6.3.3. All in all 6.3.3 seems to have fixed quite a few SVG issues.
Comment 9 Sebastian 2007-10-17 03:38:41 UTC
How about adding --rsvg=no to the ebuild? That way in case a user who has librsvg installed while installing imagemagick won't have to recompile imagemagick after he uninstalls librsvg.

On the other hand (and in case imagemagick works fine with librsvg) it would probably be a good idea to put librsvg into imagemagick's RDEPEND and add --rsvg=yes to avoid code duplication. Say a buffer overflow is to be found in svg and both imagemagick's and librsvg's implementation suffer from it one would have to bump both instead of only librsvg.