LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Error installing PerlMagick 6.32 (Image::Magick) (https://www.linuxquestions.org/questions/linux-software-2/error-installing-perlmagick-6-32-image-magick-546583/)

Akhran 04-16-2007 05:41 PM

Error installing PerlMagick 6.32 (Image::Magick)
 
#make testdeps (check to see what are the missing dependencies)

Checking Image::Magick ... not installed!


#make fixdeps (download and installing missing dependencies)

CPAN.pm: Going to build J/JC/JCRISTY/PerlMagick-6.32.tar.gz

Checking if your kit is complete...
Looks good
Note (probably harmless): No library found for -lgs
Note (probably harmless): No library found for -lgvc
Writing Makefile for Image::Magick
make[1]: Entering directory `/root/.cpan/build/PerlMagick-6.32'
cp Magick.pm blib/lib/Image/Magick.pm
AutoSplitting blib/lib/Image/Magick.pm (blib/lib/auto/Image/Magick)
/usr/bin/perl /usr/share/perl/5.8/ExtUtils/xsubpp -typemap /usr/share/perl/5.8/ExtUtils/typemap Magick.xs > Magick.xsc && mv Magick.xsc Magick.c
cc -c -I../ -I.. -I/usr/include/librsvg-2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/include/graphviz -I/usr/include/freetype2 -I/usr/include/libxml2 -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -Wall -W -pthread -O2 -DVERSION=\"6.3.2\" -DXS_VERSION=\"6.3.2\" -fPIC "-I/usr/lib/perl/5.8/CORE" -D_LARGE_FILES=1 -DHAVE_CONFIG_H Magick.c

Magick.xs:64:31: error: magick/MagickCore.h: No such file or directory

Read from the ImageMagick forum that newer version of Imagemagick is required for MagicCore.h. So I downloaded the latest binary Imagemagick 6.3.3 into /usr/local/src/.

root@debian:/# locate MagickCore.h
/usr/local/src/ImageMagick-6.3.3/include/magick/MagickCore.h

I have also added the directory (/usr/local/src/ImageMagick-6.3.3/include/magick) that contains MagickCore.h into my PATH:

root@debian:/# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/src:/usr/local/src/ImageMagick-6.3.3/include/magick

But the installation does not seem to be able to locate MagickCore.h. When I tried to build again, I got back the same error of missing MagickCore.h.

Is there a specific directory for MagickCore.h?

Thanks !

j-ray 04-17-2007 02:10 AM

the PATH is not relevant in this case. Maybe it helps to make a symlink from the MagickCore.h

ln -s /path/to/MagickCore.h /usr/include/MagickCore.h

as the compiler will search for header files in the include folder probably im just guessing but maybe it helps... J.

jkobrien 07-20-2009 09:15 AM

More than a year after the OP I know, but in the spirit of "it might help someone else"...

I had similar problems when trying to install Image::Magick to my own ~/dev area.

First I installed ImageMagick itself using ./configure --without-perl but I was still seeing errors for the CPAN module similar to those reported above.

I fixed these (eventually) by editing the Makefile.PL to change all the paths (INC, LDFLAGS, LDDLFLAGS, INSTALLBIN, LIBS) to point to the right places under my ~/dev. Previous attempts to pass these to 'perl Makefile.PL' on the command line hadn't worked.

John

rahmad 08-25-2010 07:20 AM

Hi

I have the same problem. I want to install perl magick interface. I have downloaded the tar file PerlMagick-6.59.tar.gz.

when I run:
Code:

perl Makefile.PL
I get an error as the following:
Quote:

[root@test PerlMagick-6.59]# perl Makefile.PL
Note (probably harmless): No library found for -lMagickCore
Note (probably harmless): No library found for -lperl
Writing Makefile for Image::Magick
I tried to edit INC and LIBS in Makefile.PL as mentioned in this post as the following:

Quote:

# defaults for LIBS & INC & CCFLAGS params that we later pass to Writemakefile
my $INC_magick = '-I../ -I.. -I/usr/include/magick -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -pthread -I/usr/include/librsvg-2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/freetype2 -I/usr/include/libxml2 -I"' . $Config{'usrinc'} . '/ImageMagick"';
# my $LIBS_magick = '-L../magick/.libs -lMagickCore -lperl -lm';
my $LIBS_magick = '-L/usr/include/magick -lMagickCore -lperl -lm';
#my $LIBS_magick = '-L/usr/lib -lMagickCore -lperl -lm';
my $CCFLAGS_magick = "$Config{'ccflags'} -fopenmp -g -O2 -Wall -W -pthread";
my $LDFLAGS_magick = "-L../magick/.libs -lMagickCore $Config{'ldflags'} ";
my $LDDLFLAGS_magick = "-L../magick/.libs -lMagickCore $Config{'lddlflags'} ";
but I get the same error. I am not sure if I edit the correct parameters...

please help..

jack44556677 11-25-2012 12:59 AM

I'm not sure if this applies or not.... but I was having this problem because my version of ImageMagick (and more specifically the dev package that is associated with it) was too old.

My ImageMagick version was 6.0.6, and it did not have magickcore.h. I downloaded the latest ImageMagick source (v6.8.0-5 which does contain magickcore.h) from the website because a pre-compiled binary was not available on my distro. I am compiling it as I type this. I suspect if you have ImageMagick, and the ImageMagick dev packages allready installed, and you are sure the include paths are correct, then you might also need to upgrade your ImageMagick before PerlMagick will compile and function.

After I manually removed ImageMagick once (because it was hideously slow on my ReadyNAS NV), and recompiled it with the options below (best for a single core, lowest quality & highest speed), I DID have to make a symlink for /usr/include/magick connected to the location it was actually in:

./configure --without-magick-plus-plus --without-threads --without-perl --without-x --disable-openmp --with-quantum-depth=8 --build=sparc-linux
______________________________________________________________

By the by, if the original poster had in fact added the path "/usr/local/src/ImageMagick-6.3.3/include/magick" to his include paths, the compile would still fail looking for magickcore.h. This is because the code is not looking for magickcore.h, but rather magick/magickcore.h. It expects it to be in the folder magick. The path added to the include paths should have been "/usr/local/src/ImageMagick-6.3.3/include".


All times are GMT -5. The time now is 01:43 AM.