Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Error trying to install Image::Magick on Strawberry Perl

by jdporter (Canon)
on Aug 06, 2012 at 02:45 UTC ( #985591=perlquestion: print w/ replies, xml ) Need Help??
jdporter has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to install Image::Magick on Strawberry Perl, and getting an error.

% path PATH=C:\Program Files\ImageMagick-6.7.8-Q16;c:\strawberry\c\bin;C:\str +awberry\perl\bin; . . .
% perl -v This is perl 5, version 16, subversion 0 (v5.16.0) built for MSWin32-x +64-multi-thread
% convert -version Version: ImageMagick 6.7.8-7 2012-07-29 Q16 http://www.imagemagick.org Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC Features: OpenMP

So here we go:

% cpan install Image::Magick . . . Note (probably harmless): No library found for -lMagickCore Writing Makefile for Image::Magick Writing MYMETA.yml and MYMETA.json CPAN: Module::CoreList loaded ok (v2.66) cp Magick.pm blib\lib\Image\Magick.pm AutoSplitting blib\lib\Image\Magick.pm (blib\lib\auto\Image\Magick) C:\strawberry\perl\bin\perl.exe C:\strawberry\perl\lib\ExtUtils\xsubpp + -typemap C:\strawberry\perl\lib\ExtUtils\typemap -typemap typemap +Magick.xs > Magick.xsc && C:\strawberry\perl\bin\perl.exe -ME xtUtils::Command -e mv -- Magick.xsc Magick.c gcc -c -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE +_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-alia +sing -mms-bitfields -s -O2 -DVERSION=\"6.77\" -DXS_VER SION=\"6.77\" "-IC:\strawberry\perl\lib\CORE" -D_LARGE_FILES=1 -DHAV +E_CONFIG_H Magick.c Magick.xs:60:31: fatal error: magick/MagickCore.h: No such file or dir +ectory compilation terminated. dmake.exe: Error code 129, while making 'Magick.o' JCRISTY/PerlMagick-6.77.tar.gz C:\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'.
% dir /s /b "c:\Program Files\ImageMagick-6.7.8-Q16\MagickCore.h" c:\Program Files\ImageMagick-6.7.8-Q16\include\magick\MagickCore.h

So my first thought is, How do I pass the hint to gcc about where to find MagickCore.h?
But I suspect there's something more fundamentally wrong with my setup.

In case it helps:

% gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=c:/strawberry/c/bin/../libexec/gcc/x86_64-w64-ming +w32/4.6.3/lto-wrapper.exe Target: x86_64-w64-mingw32 Configured with: ../../../src/gcc-4.6.3/configure --build=x86_64-w64-m +ingw32 --target=x86_64-w64-mingw32 --enable-languages=c,c++,fortran,o +bjc,obj-c++ --enable-libgomp --enable-lto --enable-bootstrap --enable-checking=release --enable-version-specific-runtime-libs --dis +able-multilib --disable-nls --disable-win32-registry --disable-werror + --with-pkgversion='gcc-4.6.3 release with patches [build 201 20411 by perlmingw.sf.net]' --with-sysroot=/gccbuild/prefix/mingw64 -- +with-gmp=/gccbuild/prefix/mingw64 --with-mpfr=/gccbuild/prefix/mingw6 +4 --with-mpc=/gccbuild/prefix/mingw64 --with-ppl=/gccbuild/pr efix/mingw64 --with-cloog=/gccbuild/prefix/mingw64 --with-bugurl=http: +//mingwfp.znix.com --with-gnu-ld --prefix=/gccbuild/prefix/mingw64 -- +with-local-prefix=/gccbuild/prefix/mingw64 --with-libiconv-pr efix=/gccbuild/prefix/mingw64 Thread model: win32 gcc version 4.6.3 (gcc-4.6.3 release with patches [build 20120411 by p +erlmingw.sf.net])
I reckon we are the only monastery ever to have a dungeon stuffed with 16,000 zombies.

Comment on Error trying to install Image::Magick on Strawberry Perl
Select or Download Code
Re: Error trying to install Image::Magick on Strawberry Perl
by Anonymous Monk on Aug 06, 2012 at 03:08 UTC

    How do I pass the hint to gcc about where to find MagickCore.h?

    Add to %PATH% so the .dll's can be found

    cpanp -z Image::Magick

    perl Makefile.PL LIBS="-Lpath\to\directory -llibname -libname... " INC="-Ipath/to/includes -Ipath/to/other/includes"

    If your Makefile.PL is being too clever, you should edit Makefile.PL and prefix :nosearch

    For microsoft you could set (like PATH) env vars INCLUDE= for .h-headers and LIB= for .lib's -- I can't remember if mingw/gcc also respects this, so if it doesn't, you'd set C_INCLUDE_PATH/LIBRARY_PATH, see http://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://985591]
Approved by marto
Front-paged by bulk88
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2014-07-24 23:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (167 votes), past polls