hi all, Skip to #SUMMARY to just see the current status of this. A Cc: sent to LDS.
Running tests with a tweaked t:GD.t for MacOS. It looks like GD is quite happy to draw pictures using the usual primitives, but my build /appeared/ to be broken in respect of: Your vendor has not defined GD macro main::gdTiled, used at Programs:Programmin... and Your vendor has not defined GD macro main::gdBrushed, used at Programs:P... Right, it seems likely that I am missing something important. I looked in GD.pm and adjusted line 68 onwards to: my($constname); $! = 0; ($constname = $AUTOLOAD) =~ s/.*:://; my $val = constant($constname, @_ ? $_[0] : 0); print "AUTOLOAD needs <$constname> got val <$val> and ! is <$!>\n"; #PKENT if ($! != 0) { this proved that constant() returned the correct numbers from gd.h. _However_ it also showed that $! was 'Operation not permitted' - that's why I added the '$! = 0;' line, to make sure it was false before calling constant(). After adding that, AUTOLOAD worked and constants evaluated correctly. However _then_ test 1 died on: # brush is not of type GD::Image. File 'Programs:Programming:Perl5.6.1:src:macperl_src:perl:ext:GD-1.38:t:GD.t'; Line 128 I finally found the problem: newFromPng( FILEHANDLE ) returned undef - I suspect it may be some \n \r confusion?? However, a quick hack, and I showed that newFromPngData( $data ) worked perfectly! #SUMMARY newFromPng returns undef, not a GD::Image object. newFromPngData works OK. (no XPM support is compiled in so... GD::Image->newFromXpm($fn); returns undef ) (I'm sure libgd had JPEG support compiled in... newFromJpeg and newFromJpegData both return undef. ) All other drawing commands tested OK. using t/GD.t as supplied (with tweaks) I get: 1..10 ok 1 TEST 9 Last test had eval err: Can't call method "png" on an undefined value at Programs:Programming:Perl5.6.1:src:macperl_src:perl:ext:GD-1.38:t:GD.t line 287. TEST 10 Last test had eval err: Can't call method "png" on an undefined value at Programs:Programming:Perl5.6.1:src:macperl_src:perl:ext:GD-1.38:t:GD.t line 299. ok 2 ok 3 ok 4 ok 5 ok 6 ok 7 ok 8 # Skip, no TrueType font support ok 9 # Skip, no XPM support ok 10 # Skip, no JPEG support # GD/libgd was not built with TrueType font support # # GD/libgd was not built with TrueType font support The test output matches the supplied test files. Anyway, I thought I'd built libgd with JPEG support. In any case I can't see why newFromPng should fail, but newFromPngData should be OK. I'm going to leave this for today anyway, but I thought you'd all appreciate knowing how I was (sort of) doing. P