installing imagick with the latest version of ImageMagick

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
jjbaranowski
Posts: 11
Joined: 2013-01-18T08:56:57-07:00
Authentication code: 6789

installing imagick with the latest version of ImageMagick

Post by jjbaranowski »

Hello,

I ran into something and I thought I might share it here. I installed the latest version of ImageMagick-6.8.3-6 on my Centos 6.3 server from an RPM I made from source. I also installed the ImageMagick-devel-6.8.3-6 as well because this is needed for imagick to install.

Next, I run the command "pecl install imagick" (as I always do) and this time I get an error: checking for MagickWand h header file configure error Cannot locate header file MagickWand h imagick

I thought that was strange so I searched for the file:
find / -name MagickWand.h
/usr/include/ImageMagick-6.8/wand/MagickWand.h

I dug a bit more into the installation files of imagick and found a check to see if it could find the MagickWand.h file and if it doesn't it's instructed to fail the installation. The check is looking for: $WAND_DIR/include/ImageMagick/wand/

My $WAND_DIR is /usr in my case but I noticed that the installation name of the newer version of ImageMagick now contain the version number in it (starting somewhere with version 6.8.0). imagick has it hard coded in their installation as $WAND_DIR/include/ImageMagick/wand/.

Does anyone know what the best way to fix this problem? I know someone else manages the installation of imagick but is there away to install ImageMagick into a folder without the version number on it so the pecl install imagick will find it properly?

Let me know your thoughts.

-John Baranowski
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: installing imagick with the latest version of ImageMagic

Post by magick »

jjbaranowski
Posts: 11
Joined: 2013-01-18T08:56:57-07:00
Authentication code: 6789

Re: installing imagick with the latest version of ImageMagic

Post by jjbaranowski »

Hello,

Ok, great post to let me know that you are aware of what I found but I still don't know what to do with it. That post doesn't guide me in anyway. Can you give me some more guidance to how to get the imagick to install? How do I use the *-config files to help me get this done?

Thanks in advance!

Sincerely,

John Baranowski
nikita
Posts: 1
Joined: 2013-03-03T05:54:34-07:00
Authentication code: 6789

Re: installing imagick with the latest version of ImageMagic

Post by nikita »

Hello, jjbaranowski. I solved this, installing older imagemagick release. http://sourceforge.net/projects/imagema ... es/6.x/6.7. and installing pecl imagick from source http://pecl.php.net/get/imagick-2.3.0.tgz (old release)
jjbaranowski
Posts: 11
Joined: 2013-01-18T08:56:57-07:00
Authentication code: 6789

Re: installing imagick with the latest version of ImageMagic

Post by jjbaranowski »

Thanks for your help. I guess I could choose to go backwards installing the old version but the point of this post was to help me and anyone else who wants to move forward and get the newest version of ImageMagick-6.8.3 installed on centos 6.3 with Imagick as well. Any help would be greatly appreciated to accomplish this.

Thanks,

John Baranowski
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: installing imagick with the latest version of ImageMagic

Post by fmw42 »

Did you try the latest version of Imagick? See http://pecl.php.net/package/imagick/3.1.0RC2
jjbaranowski
Posts: 11
Joined: 2013-01-18T08:56:57-07:00
Authentication code: 6789

Re: installing imagick with the latest version of ImageMagic

Post by jjbaranowski »

Hello,

Thanks for the reply. I downloaded the latest version from your link up above and extracted it. I type phpize in the extracted folder. I checked the file "config.m4" which it created and found the hard coded folder as well.

if test -r $WAND_DIR/include/ImageMagick/wand/MagickWand.h; then
AC_MSG_RESULT(found in $WAND_DIR/include/ImageMagick/wand/MagickWand.h)
else
AC_MSG_ERROR(Cannot locate header file MagickWand.h)

with the latest version of ImageMagick, the folders look like this:

$WAND_DIR/include/ImageMagick-6.8/wand/

Do you think I could just edit this file and change it? Where is it picking this folder up from when I type phpize? That's when the file (config.m4) gets created. It must be picking that up from somewhere.

Let me know your thoughts.

-John
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: installing imagick with the latest version of ImageMagic

Post by fmw42 »

Sorry I know little about Imagick or how to install it.
jjbaranowski
Posts: 11
Joined: 2013-01-18T08:56:57-07:00
Authentication code: 6789

Re: installing imagick with the latest version of ImageMagic

Post by jjbaranowski »

Hello,

I got the latest version of Imagick installed with the latest version of ImageMagick-6.8.3-7. Here is what I did:

Downloaded the latest version of Imagick (http://pecl.php.net/package/imagick/3.1.0RC2).
tar xvf imagick-3.1.0RC2.tgz
cd imagick-3.1.0RC2
next edit the file config.m4. On line 55 you will find the line:

"if test -r $WAND_DIR/include/ImageMagick/wand/MagickWand.h; then"

You will notice that the /ImageMagick/ is hard coded in the path. If you have installed a newer version of ImageMagick-6.8.X you will notice that the directory now is /ImageMagick-6.8/. I had to modify this line as follows:

"if test -r $WAND_DIR/include/ImageMagick-6.8/wand/MagickWand.h; then"

Next, I ran the command "phpize". Note if you already ran this command before fixing the file above, make sure you run "phpize --clean" first. Then re-run "phpize".

./configure
make
make install
service httpd restart


I hope this helps someone!

Sincerely,

John Baranowski
jjbaranowski
Posts: 11
Joined: 2013-01-18T08:56:57-07:00
Authentication code: 6789

Re: installing imagick with the latest version of ImageMagic

Post by jjbaranowski »

Hello,

Don't forget to add the line below to your /etc/php.ini file

extension=imagick.so

Then reload the httpd service
service httpd restart
broucaries
Posts: 467
Joined: 2008-12-21T11:51:10-07:00

Re: installing imagick with the latest version of ImageMagic

Post by broucaries »

Please report upstream to use pkgconfig instead of hard coding path

Thanks

PS: we will made a patch in a few week on the debian side if not
Post Reply