Hi everyone,

I need your help, desperately. I am trying to install the Imagick Pecl extension on my MAMP installation. I have installed Image Magick using MacPort by typing the following into Terminal:

sudo port install ImageMagick

It seemed to install ok. If I type the following:

cd /Applications/MAMP/bin/php5/bin/
.pecl install imagick

I get:

downloading imagick-2.2.2.tgz ...
Starting to download imagick-2.2.2.tgz (77,212 bytes)
..................done: 77,212 bytes
11 source files, building
running: phpize
grep: /Applications/MAMP/bin/php5/include/php/main/php.h: No such file or directory
grep: /Applications/MAMP/bin/php5/include/php/Zend/zend_modules.h: No such file or directory
grep: /Applications/MAMP/bin/php5/include/php/Zend/zend_extensions.h: No such file or directory
Configuring for:
PHP Api Version:
Zend Module Api No:
Zend Extension Api No:
configure.in:77: warning: AC_CACHE_VAL(lt_prog_compiler_static_works, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:1974: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:1994: AC_CACHE_CHECK is expanded from...
aclocal.m4:3526: AC_LIBTOOL_LINKER_OPTION is expanded from...
aclocal.m4:5464: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:5463: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:2943: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:2923: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:2886: AC_PROG_LIBTOOL is expanded from...
configure.in:77: the top level
configure.in:77: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works, ...): suspicious cache-id, must contain _cv_ to be cached
aclocal.m4:3481: AC_LIBTOOL_COMPILER_OPTION is expanded from...
aclocal.m4:7591: AC_LIBTOOL_PROG_COMPILER_PIC is expanded from...
configure.in:77: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works_CXX, ...): suspicious cache-id, must contain _cv_ to be cached
aclocal.m4:5577: _LT_AC_LANG_CXX_CONFIG is expanded from...
aclocal.m4:5576: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from...
aclocal.m4:4612: _LT_AC_TAGCONFIG is expanded from...
configure.in:77: warning: AC_CACHE_VAL(lt_prog_compiler_static_works, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:1974: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:1994: AC_CACHE_CHECK is expanded from...
aclocal.m4:3526: AC_LIBTOOL_LINKER_OPTION is expanded from...
aclocal.m4:5464: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:5463: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:2943: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:2923: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:2886: AC_PROG_LIBTOOL is expanded from...
configure.in:77: the top level
configure.in:77: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works, ...): suspicious cache-id, must contain _cv_ to be cached
aclocal.m4:3481: AC_LIBTOOL_COMPILER_OPTION is expanded from...
aclocal.m4:7591: AC_LIBTOOL_PROG_COMPILER_PIC is expanded from...
configure.in:77: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works_CXX, ...): suspicious cache-id, must contain _cv_ to be cached
aclocal.m4:5577: _LT_AC_LANG_CXX_CONFIG is expanded from...
aclocal.m4:5576: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from...
aclocal.m4:4612: _LT_AC_TAGCONFIG is expanded from...
1. Please provide the prefix of Imagemagick installation : autodetect

1-1, 'all', 'abort', or Enter to continue: 1

--------------------

So I enter "1", press enter, and enter the path to where I have the Image Magick folder, (which is extracted from the following archive: http://www.imagemagick.org/download/binaries/ImageMagick-universal-apple-darwin9.6.0.tar.gz). Then when I hit enter to continue I get:

building in /var/tmp/pear-build-MyUserName/imagick-2.2.2
running: /private/tmp/pear/temp/imagick/configure --with-imagick=/Applications/MAMP/bin/php5/lib/php/extensions/
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/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 for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i686-apple-darwin9.7.0
checking host system type... i686-apple-darwin9.7.0
checking target system type... i686-apple-darwin9.7.0
checking for PHP prefix... /Applications/MAMP/bin/php5
checking for PHP includes... -I/Applications/MAMP/bin/php5/include/php -I/Applications/MAMP/bin/php5/include/php/main -I/Applications/MAMP/bin/php5/include/php/TSRM -I/Applications/MAMP/bin/php5/include/php/Zend -I/Applications/MAMP/bin/php5/include/php/ext -I/Applications/MAMP/bin/php5/include/php/ext/date/lib
checking for PHP extension directory... /Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20060613
checking for PHP installed headers prefix... /Applications/MAMP/bin/php5/include/php
checking for re2c... no
configure: WARNING: You will need re2c 0.12.0 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking whether to enable the imagick extension... yes, shared
checking whether to enable the imagick GraphicsMagick backend... no
checking ImageMagick MagickWand API configuration program... found in /usr/local/bin/Wand-config
checking if ImageMagick version is at least 6.2.4... configure: error: no. You need at least Imagemagick version 6.2.4 to use Imagick.
ERROR: `/private/tmp/pear/temp/imagick/configure --with-imagick=/Applications/MAMP/bin/php5/lib/php/extensions/' failed

---------

By looks of this line:

checking if ImageMagick version is at least 6.2.4... configure: error: no. You need at least Imagemagick version 6.2.4 to use Imagick.

It doesn't think that the Imagemagick version is late enough. The one I installed using MacPorts is the latest, as of today.

What am I missing? I have searched all over google today, nothing has helped much. Can someone please help me?


Thank you!

Thank you for the reply, but unfortunately, those are just instructions for installing MAMP. My issue is with installing imagick, an extension to the php software.

I found my problem, but now I am getting a new problem. After it passes the Imagemagick version test I get the following output. Note: the output starts from the beginning when I entered ./pecl install imagick.
There are much more lines that look like: "/private/tmp/pear/temp/imagick/imagick_class.c:8381: warning: data definition has no type or storage class", but there are too many to post on the forum.

Anyone have a similar problem?

/private/tmp/pear/temp/imagick/imagick_class.c:8381: warning: data definition has no type or storage class
/private/tmp/pear/temp/imagick/imagick_class.c:8381: error: syntax error before '}' token
/private/tmp/pear/temp/imagick/imagick_class.c:8381: error: syntax error before '->' token
/private/tmp/pear/temp/imagick/imagick_class.c:8381: error: conflicting types for 'MagickClearException'
/opt/local/include/ImageMagick/wand/MagickWand.h:178: error: previous declaration of 'MagickClearException' was here
/private/tmp/pear/temp/imagick/imagick_class.c:8381: warning: data definition has no type or storage class
/private/tmp/pear/temp/imagick/imagick_class.c:8381: warning: data definition has no type or storage class
/private/tmp/pear/temp/imagick/imagick_class.c:8381: error: syntax error before '}' token
/private/tmp/pear/temp/imagick/imagick_class.c:8383: warning: data definition has no type or storage class
/private/tmp/pear/temp/imagick/imagick_class.c:8384: error: syntax error before '}' token
/private/tmp/pear/temp/imagick/imagick_class.c:8391: error: redefinition of 'PHP_METHOD'
/private/tmp/pear/temp/imagick/imagick_class.c:327: error: previous definition of 'PHP_METHOD' was here
/private/tmp/pear/temp/imagick/imagick_class.c: In function 'PHP_METHOD':
/private/tmp/pear/temp/imagick/imagick_class.c:8397: error: syntax error before 'TSRMLS_CC'
/private/tmp/pear/temp/imagick/imagick_class.c: At top level:
/private/tmp/pear/temp/imagick/imagick_class.c:8401: error: redefinition of 'intern'
/private/tmp/pear/temp/imagick/imagick_class.c:8376: error: previous definition of 'intern' was here
/private/tmp/pear/temp/imagick/imagick_class.c:8401: error: syntax error before ')' token
/private/tmp/pear/temp/imagick/imagick_class.c:8402: error: redefinition of 'status'
/private/tmp/pear/temp/imagick/imagick_class.c:314: error: previous definition of 'status' was here
/private/tmp/pear/temp/imagick/imagick_class.c:8402: error: invalid type argument of '->'
/private/tmp/pear/temp/imagick/imagick_class.c:8402: error: initializer element is not constant
/private/tmp/pear/temp/imagick/imagick_class.c:8402: warning: data definition has no type or storage class
/private/tmp/pear/temp/imagick/imagick_class.c:8405: error: syntax error before 'if'
/private/tmp/pear/temp/imagick/imagick_class.c:8406: error: conflicting types for 'description'
/private/tmp/pear/temp/imagick/imagick_class.c:1248: error: previous definition of 'description' was here
/private/tmp/pear/temp/imagick/imagick_class.c:8406: error: invalid type argument of '->'
/private/tmp/pear/temp/imagick/imagick_class.c:8406: warning: initialization makes integer from pointer without a cast
/private/tmp/pear/temp/imagick/imagick_class.c:8406: error: initializer element is not constant
/private/tmp/pear/temp/imagick/imagick_class.c:8406: warning: data definition has no type or storage class
/private/tmp/pear/temp/imagick/imagick_class.c:8406: error: syntax error before 'if'
/private/tmp/pear/temp/imagick/imagick_class.c:8406: error: conflicting types for 'description'
/private/tmp/pear/temp/imagick/imagick_class.c:1248: error: previous definition of 'description' was here
/private/tmp/pear/temp/imagick/imagick_class.c:8406: warning: initialization makes integer from pointer without a cast
/private/tmp/pear/temp/imagick/imagick_class.c:8406: warning: data definition has no type or storage class
/private/tmp/pear/temp/imagick/imagick_class.c:8406: error: syntax error before '}' token
/private/tmp/pear/temp/imagick/imagick_class.c:8406: warning: data definition has no type or storage class
/private/tmp/pear/temp/imagick/imagick_class.c:8406: error: syntax error before '}' token
/private/tmp/pear/temp/imagick/imagick_class.c:8406: error: conflicting types for 'description'
/private/tmp/pear/temp/imagick/imagick_class.c:1248: error: previous definition of 'description' was here
/private/tmp/pear/temp/imagick/imagick_class.c:8406: warning: initialization makes integer from pointer without a cast
/private/tmp/pear/temp/imagick/imagick_class.c:8406: warning: data definition has no type or storage class
/private/tmp/pear/temp/imagick/imagick_class.c:8406: error: syntax error before '}' token
/private/tmp/pear/temp/imagick/imagick_class.c:8406: error: syntax error before '->' token
/private/tmp/pear/temp/imagick/imagick_class.c:8406: error: conflicting types for 'MagickClearException'
/opt/local/include/ImageMagick/wand/MagickWand.h:178: error: previous declaration of 'MagickClearException' was here
/private/tmp/pear/temp/imagick/imagick_class.c:8406: warning: data definition has no type or storage class
/private/tmp/pear/temp/imagick/imagick_class.c:8406: warning: data definition has no type or storage class
/private/tmp/pear/temp/imagick/imagick_class.c:8406: error: syntax error before '}' token
/private/tmp/pear/temp/imagick/imagick_class.c:8408: warning: data definition has no type or storage class
/private/tmp/pear/temp/imagick/imagick_class.c:8409: error: syntax error before '}' token
make: *** [imagick_class.lo] Error 1
ERROR: `make' failed

I finally solved the problem after two entire days...

I followed these steps I found on another forum. I still donʻt know why it doesnʻt work just by doing : ./pecl install imagick

Here is what I did for future reference:

pecl download imagick
tar xvzf imagick-2.2.2.tgz
cd imagick-2.2.2
phpize
./configure --with-imagick=/opt/local
make
make install


If you look at the bottom of the output, it will tell you where it has placed the imagick.so module. For me it was placed in: /Applications/MAMP/bin/php5/bin/imagick-2.2.2/modules/

Then copy it into your PHP extensions folder. For me it was: /Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20050922/

Then, for PHP to honor the the extension, add the following line to the extensions section of your php.ini file:

extension=imagick.so

I followed the Wallance recommendation (below), having experienced the same error diagnostics when trying this install with incantations I found in two other sources. I figured the Wallance method would work. It seemed to be going fine until I got to the 'make' which fails:

make: *** No targets specified and no makefile found. Stop.

This is the same result I had at this point with the other attempts I'd made.

Has anyone gotten to this 'make' error and found a way to finish successfully?

Thanks,
Tom
___________

I finally solved the problem after two entire days...

I followed these steps I found on another forum. I still donʻt know why it doesnʻt work just by doing : ./pecl install imagick

Here is what I did for future reference:

pecl download imagick
tar xvzf imagick-2.2.2.tgz
cd imagick-2.2.2
phpize
./configure --with-imagick=/opt/local
make
make install


If you look at the bottom of the output, it will tell you where it has placed the imagick.so module. For me it was placed in: /Applications/MAMP/bin/php5/bin/imagick-2.2.2/modules/

Then copy it into your PHP extensions folder. For me it was: /Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20050922/

Then, for PHP to honor the the extension, add the following line to the extensions section of your php.ini file:

extension=imagick.so

Make sure when you are running the make command, you are in the imagick directory. You should also make sure you have the latest MacPorts version.

I assume I am in the correct when I do "cd imagick-2.3.0". I try executing 'make' and I still get the following message: make: *** No targets specified and no makefile found. Stop.

I do see the 'install' file in the directory. Any suggestions?

i have installed without errors, but i can't see imagick library in phpinfo();

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.