I wanted to use `GD::Barcode::QRcode` but it would not work. Was `GD` not installed? I tried to install it using `cpanm GD` but it wouldn’t work. Tests kept failing.
I had something installed via Homebrew. OK, so `brew unlink gd` and see whether that helps. Now try installing `cpanm GD` and I get a different problem. Apparently my `libgd` is borked. I see unmet recommended dependencies when looking at `brew info libgd`. One strikes me as particularly odd: no `libpng` installed. Trying `brew reinstall libgd` now. Regenerating the font cache seems to take a while.
I am already regretting this.
And indeed, it doesn’t help. `cpanm GD` still fails.
alex@Megabombus:~/.cpanm/work/1480171923.14458/GD-2.56$ prove -v -b -l t/GD.t t/GD.t .. 1..11 ok 1 - use GD; ok 2 - use GD::Simple; 1. Testing using gd2 support. ok 3 - image comparison test 1 ok 4 - image comparison test 2 ok 5 - image comparison test 3 ok 6 - image comparison test 4 ok 7 - image comparison test 5 ok 8 - image comparison test 6 not ok 9 - image comparison test 7 ok 10 - round trip gd ok 11 - round trip gd2 1. Failed test 'image comparison test 7' 1. at t/GD.t line 249. 1. Looks like you failed 1 test of 11. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/11 subtests Test Summary Report ------------------- t/GD.t (Wstat: 256 Tests: 11 Failed: 1) Failed test: 9 Non-zero exit status: 1 Files=1, Tests=11, 1 wallclock secs ( 0.04 usr 0.01 sys + 0.16 cusr 0.03 csys = 0.24 CPU) Result: FAIL
Looking at the test code, it seems that the essential bits are related to fonts:
# Some TTFs $im->stringFT($black,FONT,12.0,0.0,20,20,"Hello world!") || warn $@; $im->stringFT($red,FONT,14.0,0.0,20,80,"Hello world!") || warn $@; $im->stringFT($blue,FONT,30.0,-0.5,60,100,"Goodbye cruel world!") || warn $@;
Time to `cpanm -f GD`...
#Perl #Homebrew
(Please contact me if you want to remove your comment.)
⁂
And once again, `cpanm -f GD`. This makes me think I should switch to ImageMagick one of these days.
– Alex Schroeder 2017-03-18 18:43 UTC