Installation problem: Cannot locate header file MagickWand.h

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
Pacio

Installation problem: Cannot locate header file MagickWand.h

Post by Pacio »

Hi,

I've installed ImageMagick (Version: ImageMagick 6.4.5 2008-11-12 Q16) and after pecl install imagick I get the following error:

Code: Select all

downloading imagick-2.2.1.tgz ...
Starting to download imagick-2.2.1.tgz (75,873 bytes)
.................done: 75,873 bytes
11 source files, building
running: phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20060613
Zend Extension Api No:   220060519
Please provide the prefix of Imagemagick installation [autodetect] :
building in /var/tmp/pear-build-root/imagick-2.2.1
running: /tmp/pear/cache/imagick-2.2.1/configure --with-imagick
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc and cc understand -c and -o together... yes
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib
checking for PHP extension directory... /usr/lib/php5/20060613
checking for PHP installed headers prefix... /usr/include/php5
checking for re2c... no
configure: WARNING: You will need re2c 0.9.11 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable the imagick extension... yes, shared
checking whether to enable the imagick backend... no
checking ImageMagick MagickWand API configuration program... found in /usr/local/bin/MagickWand-config
checking for MagickWand.h header file... configure: error: Cannot locate header file MagickWand.h
ERROR: `/tmp/pear/cache/imagick-2.2.1/configure --with-imagick' failed
Can't work it out for few days already. I tried compiling ImageMagick with various --prefix paths and entering them in pecl install imagick but neither of them worked.
Need your help to get rid of that error.

Thanks
Pacio
mkoppanen
Posts: 309
Joined: 2007-06-09T07:06:32-07:00

Re: Installation problem: Cannot locate header file MagickWand.h

Post by mkoppanen »

echo "`MagickWand-config --prefix`/include/ImageMagick/wand/MagickWand.h"

does that file exist?
Mikko Koppanen
My blog: http://valokuva.org
Pacio

Re: Installation problem: Cannot locate header file MagickWand.h

Post by Pacio »

Problem is solved now, there seemed to be some error caused by PDFlib and Perl.
speciale
Posts: 1
Joined: 2013-03-08T08:26:47-07:00
Authentication code: 6789

Re: Installation problem: Cannot locate header file MagickWa

Post by speciale »

Hello

I have the same problem and I would like to know, if it's possible, how you did to solve it.
I'm on a Mac
imagick-3.1.0RC2 and ImageMagick-x86_64-apple-darwin12.2.0

Shortly, everything goes fine till

Code: Select all

checking for MagickWand.h header file... configure: error: Cannot locate header file MagickWand.h
But the file exists at the desired location, I mean

Code: Select all

AC_MSG_CHECKING(for MagickWand.h header file)
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)
My dir is

/usr/local/ImageMagick

/usr/local/imagick

/usr/local/imagick/config.m4 (20 files)

So in /usr/local/imagick I run

Code: Select all

phpize
./configure --with-imagick=/usr/local/ImageMagick
And boooom, it exploses. No mater what I do I keep getting the same result

Thanks

Luis
Post Reply