79571174

Date: 2025-04-13 03:37:01
Score: 0.5
Natty:
Report link

More back and forth about this annoyance in these closed issues https://github.com/StrawberryPerl/Perl-Dist-Strawberry/issues/140#issuecomment-2542495018
and https://github.com/ImageMagick/ImageMagick/issues/7077

Seems to me that the ImageMagick installer needs some attention (by someone more clever than me).

"C:\Program Files\ImageMagick-7.1.1-Q16-HDRI\PerlMagick\README.txt" that comes with ImageMagick-7.1.1-47 (2025-03-29) gives instruction about ppm install Image-Magick.ppd

This barfs when using latest Strawberry Perl (5.40)

PS C:\Program Files\ImageMagick-7.1.1-Q16-HDRI\PerlMagick>  ppm install Image-Magick.ppd
Installing package 'Image-Magick.ppd'...
Error installing package 'Image-Magick.ppd': Read a PPD for 'Image-Magick.ppd', but it is not intended for this build of Perl (MSWin32-x64-multi-thread-5.40)

My guess is that when "Install PerlMagick for Strawberry Perl" is checked during the MSI installation that particular error is not being handled. I see something flash up about Strawberry Perl, but it is too quick for me to read.

My workaround

The comment at https://github.com/StrawberryPerl/Perl-Dist-Strawberry/issues/140#issuecomment-1756627785 includes this little gem:

I'm now getting essentially the same with ImageMagick-7.1.1-19-Q16-HDRI-x64-dll.exe. The only hack I've done is to comment out the line 279 in MagickCore/magick-baseconfig.h that was there for no other purpose than to unnecessarily throw an error.

I commented out line 267 in "C:\Program Files\ImageMagick-7.1.1-Q16-HDRI\include\MagickCore\magick-baseconfig.h"

Line number differs to the original comment because I am using 7.1.1-47, but it was easy to spot the line

#    error ImageMagick was build with a 64 channel bit mask and that requires a C++ compiler

then change it to

/*
#    error ImageMagick was build with a 64 channel bit mask and that requires a C++ compiler
*/

Lo and behold, cpan Image::Magick works now!

I now have "C:\strawberry\perl\site\lib\Image\Magick.pm" where I expect it to be. My older .bat and .pl scripts using PerlMagick are working again.

Comparing the new Image\Magick.pm to an old backup verion (when I was using Strawberry Perl 5.30), I see that there are no code changes. The version number, copyright date and description text have changed.

That's good enough for me. Your mileage may vary.

Reasons:
  • Blacklisted phrase (1): to comment
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: rixtech