Page 1 of 1

installing imagemagick in stawberry win7 64bit

Posted: 2014-06-17T13:36:07-07:00
by josey
I have win7 64bit. I installed Strawberry Perl (64-bit) 5.18.2.2-64bit, and ImageMagick-6.8.9-Q16 with headers. Now I need to get image magick running under strawberry perl. I'm not sure how to do this. I installed cpan and ran 'install image::magick' but it had a lot of errors. Could someone help me get them working together?

Here is what happened when I ran install in cpan.

Code: Select all

cpan> install Image::Magick
Database was generated on Tue, 17 Jun 2014 20:08:52 GMT

Running install for module 'Image::Magick'
Running make for J/JC/JCRISTY/PerlMagick-6.87.tar.gz
Checksum for D:\Programs\strawberry\cpan\sources\authors\id\J\JC\JCRISTY\PerlMag
ick-6.87.tar.gz ok
Scanning cache D:\Programs\strawberry\cpan\build for sizes
............................................................................DONE


  CPAN.pm: Building J/JC/JCRISTY/PerlMagick-6.87.tar.gz

Gonna create 'libMagickCore.a' from 'D:\Programs\ImageMagick-6.8.9-Q16\CORE_RL_m
agick_.dll'
Checking if your kit is complete...
Looks good
Warning (mostly harmless): No library found for -lMagickCore-6.Q16
Generating a dmake-style Makefile
Writing Makefile for Image::Magick
Writing MYMETA.yml and MYMETA.json

Magick.o:Magick.c:(.text+0x28e7a): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x28f69): undefined reference to `__imp_LocaleCompare'
Magick.o:Magick.c:(.text+0x28fd0): undefined reference to `__imp_MorphImages'
Magick.o:Magick.c:(.text+0x28ffa): undefined reference to `__imp_AddValueToSplay
Tree'
Magick.o:Magick.c:(.text+0x290af): undefined reference to `__imp_DestroyExceptio
nInfo'
Magick.o:Magick.c:(.text+0x2914f): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x291b9): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x29282): undefined reference to `__imp_AcquireExceptio
nInfo'
Magick.o:Magick.c:(.text+0x2930e): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x29335): undefined reference to `__imp_GetLocaleExcept
ionMessage'
Magick.o:Magick.c:(.text+0x29370): undefined reference to `__imp_GetLocaleExcept
ionMessage'
Magick.o:Magick.c:(.text+0x293a2): undefined reference to `__imp_FormatLocaleStr
ing'
Magick.o:Magick.c:(.text+0x293d5): undefined reference to `__imp_DestroyExceptio
nInfo'
Magick.o:Magick.c:(.text+0x294db): undefined reference to `__imp_CoalesceImages'

Magick.o:Magick.c:(.text+0x2953d): undefined reference to `__imp_AddValueToSplay
Tree'
Magick.o:Magick.c:(.text+0x295ba): undefined reference to `__imp_DestroyExceptio
nInfo'
Magick.o:Magick.c:(.text+0x29655): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x296fe): undefined reference to `__imp_AcquireExceptio
nInfo'
Magick.o:Magick.c:(.text+0x2978d): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x297b7): undefined reference to `__imp_GetLocaleExcept
ionMessage'
Magick.o:Magick.c:(.text+0x297f0): undefined reference to `__imp_GetLocaleExcept
ionMessage'
Magick.o:Magick.c:(.text+0x29822): undefined reference to `__imp_FormatLocaleStr
ing'
Magick.o:Magick.c:(.text+0x29856): undefined reference to `__imp_DestroyExceptio
nInfo'
Magick.o:Magick.c:(.text+0x29a00): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x29aed): undefined reference to `__imp_LocaleCompare'
Magick.o:Magick.c:(.text+0x29b3c): undefined reference to `__imp_ParseCommandOpt
ion'
Magick.o:Magick.c:(.text+0x29bbd): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x29bdc): undefined reference to `__imp_LocaleCompare'
Magick.o:Magick.c:(.text+0x29c63): undefined reference to `__imp_SmushImages'
Magick.o:Magick.c:(.text+0x29c8d): undefined reference to `__imp_AddValueToSplay
Tree'
Magick.o:Magick.c:(.text+0x29d43): undefined reference to `__imp_DestroyExceptio
nInfo'
Magick.o:Magick.c:(.text+0x29e00): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x29e4e): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x29eb9): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x29f8e): undefined reference to `__imp_AcquireExceptio
nInfo'
Magick.o:Magick.c:(.text+0x2a01d): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x2a046): undefined reference to `__imp_GetLocaleExcept
ionMessage'
Magick.o:Magick.c:(.text+0x2a07e): undefined reference to `__imp_GetLocaleExcept
ionMessage'
Magick.o:Magick.c:(.text+0x2a0af): undefined reference to `__imp_FormatLocaleStr
ing'
Magick.o:Magick.c:(.text+0x2a0e3): undefined reference to `__imp_DestroyExceptio
nInfo'
Magick.o:Magick.c:(.text+0x2a22c): undefined reference to `__imp_CopyMagickStrin
g'
Magick.o:Magick.c:(.text+0x2a28a): undefined reference to `__imp_LocaleCompare'
Magick.o:Magick.c:(.text+0x2a2b0): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x2a39d): undefined reference to `__imp_LocaleCompare'
Magick.o:Magick.c:(.text+0x2a42b): undefined reference to `__imp_FxImageChannel'

Magick.o:Magick.c:(.text+0x2a455): undefined reference to `__imp_AddValueToSplay
Tree'
Magick.o:Magick.c:(.text+0x2a50f): undefined reference to `__imp_DestroyExceptio
nInfo'
Magick.o:Magick.c:(.text+0x2a595): undefined reference to `__imp_ParseChannelOpt
ion'
Magick.o:Magick.c:(.text+0x2a62f): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x2a67e): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x2a6e9): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x2a7ea): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x2a89f): undefined reference to `__imp_AcquireExceptio
nInfo'
Magick.o:Magick.c:(.text+0x2a925): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x2a942): undefined reference to `__imp_GetLocaleExcept
ionMessage'
Magick.o:Magick.c:(.text+0x2a97a): undefined reference to `__imp_GetLocaleExcept
ionMessage'
Magick.o:Magick.c:(.text+0x2a9a8): undefined reference to `__imp_FormatLocaleStr
ing'
Magick.o:Magick.c:(.text+0x2a9d9): undefined reference to `__imp_DestroyExceptio
nInfo'
Magick.o:Magick.c:(.text+0x2aa6d): undefined reference to `__imp_MergeImageLayer
s'
Magick.o:Magick.c:(.text+0x2ab0b): undefined reference to `__imp_AddValueToSplay
Tree'
Magick.o:Magick.c:(.text+0x2abc7): undefined reference to `__imp_FormatLocaleStr
ing'
Magick.o:Magick.c:(.text+0x2abe5): undefined reference to `__imp_CopyMagickStrin
g'
Magick.o:Magick.c:(.text+0x2abf8): undefined reference to `__imp_SetImageInfo'
Magick.o:Magick.c:(.text+0x2ac01): undefined reference to `__imp_DestroyExceptio
nInfo'
Magick.o:Magick.c:(.text+0x2ad05): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x2ad6f): undefined reference to `__imp_AcquireExceptio
nInfo'
Magick.o:Magick.c:(.text+0x2aded): undefined reference to `__imp_EvaluateImages'

Magick.o:Magick.c:(.text+0x2ae8b): undefined reference to `__imp_AddValueToSplay
Tree'
Magick.o:Magick.c:(.text+0x2af47): undefined reference to `__imp_FormatLocaleStr
ing'
Magick.o:Magick.c:(.text+0x2af65): undefined reference to `__imp_CopyMagickStrin
g'
Magick.o:Magick.c:(.text+0x2af78): undefined reference to `__imp_SetImageInfo'
Magick.o:Magick.c:(.text+0x2af81): undefined reference to `__imp_DestroyExceptio
nInfo'
Magick.o:Magick.c:(.text+0x2b005): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x2b022): undefined reference to `__imp_GetLocaleExcept
ionMessage'
Magick.o:Magick.c:(.text+0x2b05a): undefined reference to `__imp_GetLocaleExcept
ionMessage'
Magick.o:Magick.c:(.text+0x2b088): undefined reference to `__imp_FormatLocaleStr
ing'
Magick.o:Magick.c:(.text+0x2b0b9): undefined reference to `__imp_DestroyExceptio
nInfo'
Magick.o:Magick.c:(.text+0x2b18a): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x2b250): undefined reference to `__imp_AcquireExceptio
nInfo'
Magick.o:Magick.c:(.text+0x2b2dc): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x2b306): undefined reference to `__imp_GetLocaleExcept
ionMessage'
Magick.o:Magick.c:(.text+0x2b33f): undefined reference to `__imp_GetLocaleExcept
ionMessage'
Magick.o:Magick.c:(.text+0x2b371): undefined reference to `__imp_FormatLocaleStr
ing'
Magick.o:Magick.c:(.text+0x2b3a5): undefined reference to `__imp_DestroyExceptio
nInfo'
Magick.o:Magick.c:(.text+0x2b531): undefined reference to `__imp_ParseCommandOpt
ion'
Magick.o:Magick.c:(.text+0x2b567): undefined reference to `__imp_PreviewImage'
Magick.o:Magick.c:(.text+0x2b58f): undefined reference to `__imp_AddValueToSplay
Tree'
Magick.o:Magick.c:(.text+0x2b61a): undefined reference to `__imp_DestroyExceptio
nInfo'
Magick.o:Magick.c:(.text+0x2b6c5): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x2b77e): undefined reference to `__imp_AcquireExceptio
nInfo'
Magick.o:Magick.c:(.text+0x2b80d): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x2b837): undefined reference to `__imp_GetLocaleExcept
ionMessage'
Magick.o:Magick.c:(.text+0x2b870): undefined reference to `__imp_GetLocaleExcept
ionMessage'
Magick.o:Magick.c:(.text+0x2b8a2): undefined reference to `__imp_FormatLocaleStr
ing'
Magick.o:Magick.c:(.text+0x2b8d6): undefined reference to `__imp_DestroyExceptio
nInfo'
Magick.o:Magick.c:(.text+0x2ba69): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x2bb3d): undefined reference to `__imp_LocaleCompare'
Magick.o:Magick.c:(.text+0x2bb8c): undefined reference to `__imp_ParseCommandOpt
ion'
Magick.o:Magick.c:(.text+0x2bc0c): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x2bc78): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x2bcaa): undefined reference to `__imp_AppendImages'
Magick.o:Magick.c:(.text+0x2bcd4): undefined reference to `__imp_AddValueToSplay
Tree'
Magick.o:Magick.c:(.text+0x2bd84): undefined reference to `__imp_DestroyExceptio
nInfo'
Magick.o:Magick.c:(.text+0x2be1a): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x2beef): undefined reference to `__imp_AcquireExceptio
nInfo'
Magick.o:Magick.c:(.text+0x2bf75): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x2bf92): undefined reference to `__imp_GetLocaleExcept
ionMessage'
Magick.o:Magick.c:(.text+0x2bfca): undefined reference to `__imp_GetLocaleExcept
ionMessage'
Magick.o:Magick.c:(.text+0x2bff8): undefined reference to `__imp_FormatLocaleStr
ing'
Magick.o:Magick.c:(.text+0x2c029): undefined reference to `__imp_DestroyExceptio
nInfo'
Magick.o:Magick.c:(.text+0x2c0bd): undefined reference to `__imp_EvaluateImages'

Magick.o:Magick.c:(.text+0x2c15b): undefined reference to `__imp_AddValueToSplay
Tree'
Magick.o:Magick.c:(.text+0x2c217): undefined reference to `__imp_FormatLocaleStr
ing'
Magick.o:Magick.c:(.text+0x2c235): undefined reference to `__imp_CopyMagickStrin
g'
Magick.o:Magick.c:(.text+0x2c248): undefined reference to `__imp_SetImageInfo'
Magick.o:Magick.c:(.text+0x2c251): undefined reference to `__imp_DestroyExceptio
nInfo'
Magick.o:Magick.c:(.text+0x2c31a): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x2c3be): undefined reference to `__imp_AcquireExceptio
nInfo'
Magick.o:Magick.c:(.text+0x2c453): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x2c481): undefined reference to `__imp_GetLocaleExcept
ionMessage'
Magick.o:Magick.c:(.text+0x2c4c8): undefined reference to `__imp_GetLocaleExcept
ionMessage'
Magick.o:Magick.c:(.text+0x2c4fe): undefined reference to `__imp_FormatLocaleStr
ing'
Magick.o:Magick.c:(.text+0x2c53d): undefined reference to `__imp_DestroyExceptio
nInfo'
Magick.o:Magick.c:(.text+0x2c695): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x2c6f3): undefined reference to `__imp_LocaleCompare'
Magick.o:Magick.c:(.text+0x2c7dd): undefined reference to `__imp_LocaleCompare'
Magick.o:Magick.c:(.text+0x2c85e): undefined reference to `__imp_AddValueToSplay
Tree'
Magick.o:Magick.c:(.text+0x2c87d): undefined reference to `__imp_CloneImage'
Magick.o:Magick.c:(.text+0x2c8af): undefined reference to `__imp_TransformImage'

Magick.o:Magick.c:(.text+0x2ca44): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x2ca8e): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x2cac1): undefined reference to `__imp_DestroyExceptio
nInfo'
Magick.o:Magick.c:(.text+0x2cb4d): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x2cc2f): undefined reference to `__imp_AcquireExceptio
nInfo'
Magick.o:Magick.c:(.text+0x2ccb5): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x2ccd2): undefined reference to `__imp_GetLocaleExcept
ionMessage'
Magick.o:Magick.c:(.text+0x2cd0a): undefined reference to `__imp_GetLocaleExcept
ionMessage'
Magick.o:Magick.c:(.text+0x2cd38): undefined reference to `__imp_FormatLocaleStr
ing'
Magick.o:Magick.c:(.text+0x2cd69): undefined reference to `__imp_DestroyExceptio
nInfo'
Magick.o:Magick.c:(.text+0x2cdfa): undefined reference to `__imp_ComplexImages'
Magick.o:Magick.c:(.text+0x2ce98): undefined reference to `__imp_AddValueToSplay
Tree'
Magick.o:Magick.c:(.text+0x2cf54): undefined reference to `__imp_FormatLocaleStr
ing'
Magick.o:Magick.c:(.text+0x2cf72): undefined reference to `__imp_CopyMagickStrin
g'
Magick.o:Magick.c:(.text+0x2cf85): undefined reference to `__imp_SetImageInfo'
Magick.o:Magick.c:(.text+0x2cf8e): undefined reference to `__imp_DestroyExceptio
nInfo'
Magick.o:Magick.c:(.text+0x2d05a): undefined reference to `__imp_ThrowMagickExce
ption'
Magick.o:Magick.c:(.text+0x33384): undefined reference to `__imp_MagickCoreGenes
is'
Magick.o:Magick.c:(.text+0x3338c): undefined reference to `__imp_SetWarningHandl
er'
Magick.o:Magick.c:(.text+0x33394): undefined reference to `__imp_SetErrorHandler
'
Magick.o:Magick.c:(.text+0x333a1): undefined reference to `__imp_NewSplayTree'
d:/programs/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.7.3/../../../../x86
_64-w64-mingw32/bin/ld.exe: Magick.o: bad reloc address 0x0 in section `.data'
d:/programs/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.7.3/../../../../x86
_64-w64-mingw32/bin/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
dmake.exe:  Error code 129, while making 'blib\arch\auto\Image\Magick\Magick.dll
'
  JCRISTY/PerlMagick-6.87.tar.gz
  D:\Programs\strawberry\c\bin\dmake.exe -- NOT OK
Running make test
  Can't test without successful make
Running make install
  Make had returned bad status, install seems impossible
Stopping: 'install' failed for 'Image::Magick'.
Failed during this command:
 JCRISTY/PerlMagick-6.87.tar.gz               : make NO


cpan>

Re: installing imagemagick in stawberry win7 64bit

Posted: 2014-06-24T03:34:06-07:00
by tbraber
The library is called: MagickCore not MagickCore-6.Q16.
When you rename the lines with -lMagickCore-6.Q16 to -lMagickCore in the file MakeFile.PL then it used to work for me.
Butt in the latest version It had a new error during compiling (RadialBlurImageChannel missing). De version on CPAN was outdated.
I took the Magick.xs file from the perlMagick that came with the windows version of the latest ImageMagick and replaced it in the strawbery Build directory.

The build directory (here you also find the Makefile.pl) is located in the strawberry\cpan\build\PerlMagick-6.87-xxxxx directory (where xxxxx is a random string).

After replacing and fixing the makefile.pl you have to run the following commands inside the build directory:

perl makefile.pl
dmake
dmake test
dmake install

When doing the test, the JP2 test will fail because that is replaced by openjp2 in the new version. Just ignore it

Of course this is not a definitive fix, the maintainer of the Image::Magick module on CPAN has to update the magick.xs, makefile.pl and tests to get it to work as it should.

--
Thomas den Braber

Re: installing imagemagick in stawberry win7 64bit

Posted: 2014-07-27T01:44:10-07:00
by denishowe
I fixed Makefile.PL as suggested but I couldn't find a Magick.xs that would compile so I just commented out the case referring to RadialBlurImageChannel:

Code: Select all

	/*DBH
        case 82:  /* RadialBlur
        . . .
          image=RadialBlurImageChannel(image,channel,geometry_info.rho,
	DBH*/
        case 83:  /* Thumbnail */
and it compiled and ran OK. Who wants radial blur anyway :-).