tags 430805 + patch
thanks

...Or so I guess ;-) According to the build log:

Failed Test Stat Wstat Total Fail  Failed  List of Failed
-------------------------------------------------------------------------------
t/1.t          0    11    27   10  37.04%  23-27

Now, tests 23 and 24 are only run when we have compression support -
>From t/1.t, starting at line 60:

## if we use z-lib let's give it a try
if( Image::LibRSVG->isGzCompressionSupported() ) {
    ok( $rsvg->loadImage( "examples/artscontrol.svg.gz" ) );
    ok( $rsvg->saveAs( "examples/test.png" ) );
} else {
    ok(1);
    ok(1);
}

...I reproduced it - the problem is that $rsvg->loadImage with a
svg.gz triggers a segfault, and all the tests from that point on don't
get executed at all. Just to illustrate, from the source tree, just
after the build died (hence with the compiled module in blib/):

$ perl -Iblib/lib -Iblib/arch -e 'use Image::LibRSVG; 
$rsvg=Image::LibRSVG->new; print 
$rsvg->loadImage("examples/artscontrol.svg.gz")'

triggers basically the same message as the one reported in the
bug. Now, the faulty function seems to be
Image::LibRSVG->isGzCompressionSupported - In fact, it is not even
documented, and the build does not depend on (nor ever mention)
Perl's Compress::Zlib or C's zlib. This function is not even
documented in the POD or used anywhere else in the code:

$ grep -r isGzCompr .|grep -v svn
./t/1.t:if( Image::LibRSVG->isGzCompressionSupported() ) {
./LibRSVG.xs:SVGLibRSVG::isGzCompressionSupported()
./Changes:       - added new function "isGzCompressionSupported" to check if 
gzipped files can be passed

And anyway, in the XS, line 454, it is hardcoded to answer "yes":

static bool
SVGLibRSVG::isGzCompressionSupported()
        CODE:
            RETVAL = 1;
        OUTPUT:
            RETVAL

In fact, changing the 1 to a 0 makes the build work. So, the diff is a
baffling: 

Index: LibRSVG.xs
===================================================================
--- LibRSVG.xs  (revision 5662)
+++ LibRSVG.xs  (working copy)
@@ -455,7 +455,7 @@
 static bool
 SVGLibRSVG::isGzCompressionSupported()
         CODE:
-            RETVAL = 1;
+            RETVAL = 0;
         OUTPUT:
             RETVAL

I'm not uploading this, as I'm unfamiliar with the code and I might be
just breaking it. Please, if you use this package, test it and tell
me if it should be uploaded (or upload yourself if you prefer, of
course ;-) ) 

Greetings

-- 
Gunnar Wolf - [EMAIL PROTECTED] - (+52-55)5623-0154 / 1451-2244
PGP key 1024D/8BB527AF 2001-10-23
Fingerprint: 0C79 D2D1 2C4E 9CE4 5973  F800 D80E F35A 8BB5 27AF


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to