php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59364 Install Fails
Submitted: 2010-08-12 10:18 UTC Modified: 2010-08-12 10:46 UTC
From: nkline at kent dot edu Assigned:
Status: Closed Package: imagick (PECL)
PHP Version: 5.1.6 OS: RHEL Server 5.5
Private report: No CVE-ID: None
 [2010-08-12 10:18 UTC] nkline at kent dot edu
Description:
------------
Installation fails. See the last few lines:

-bash-3.2$ sudo pecl install imagick
WARNING: channel "pecl.php.net" has updated its protocols, use "channel-update pecl.php.net" to update
downloading imagick-3.0.0.tgz ...
Starting to download imagick-3.0.0.tgz (93,488 bytes)
.....................done: 93,488 bytes
13 source files, building
running: phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20050922
Zend Extension Api No:   220051025
Please provide the prefix of Imagemagick installation [autodetect] : 
building in /var/tmp/pear-build-root/imagick-3.0.0
running: /tmp/tmpRyLQeX/imagick-3.0.0/configure --with-imagick
checking for egrep... 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 ANSI C... 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-redhat-linux-gnu
checking host system type... x86_64-redhat-linux-gnu
checking target system type... x86_64-redhat-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext
checking for PHP extension directory... /usr/lib64/php/modules
checking for PHP installed headers prefix... /usr/include/php
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 GraphicsMagick backend... no
checking ImageMagick MagickWand API configuration program... found in /usr/bin/Wand-config
checking if ImageMagick version is at least 6.2.4... found version 6.2.8
checking for magick-wand.h header file... found in /usr/include/wand/magick-wand.h
checking PHP version is at least 5.1.3... /tmp/tmpRyLQeX/imagick-3.0.0/configure: line 3339: test: Usage: /usr/bin/php-config [--prefix|--includes|--ldflags|--libs|--extension-dir|--include-dir|--php-binary|--version]: integer expression expected
configure: error: no. found 5.1.6
ERROR: `/tmp/tmpRyLQeX/imagick-3.0.0/configure --with-imagick' failed

Reproduce code:
---------------
sudo pecl install imagick

Expected result:
----------------
'sudo pecl install imagick' should successfully install imagick.

Actual result:
--------------
Running 'sudo pecl install imagick' will produce the output listed in the Description section above. Specifically:

checking PHP version is at least 5.1.3... /tmp/tmpRyLQeX/imagick-3.0.0/configure: line 3339: test: Usage: /usr/bin/php-config [--prefix|--includes|--ldflags|--libs|--extension-dir|--include-dir|--php-binary|--version]: integer expression expected
configure: error: no. found 5.1.6
ERROR: `/tmp/tmpRyLQeX/imagick-3.0.0/configure --with-imagick' failed


Others are also experiencing this problem:

(vbsaltydog @ 31-Jul-2010 03:31) http://www.php.net/manual/en/imagick.installation.php#99162

http://translate.google.com/translate?hl=en&sl=ja&u=http://dqn.sakusakutto.jp/mt/mt-search.cgi%3FIncludeBlogs%3D5%26search%3DPECL&ei=F0JjTNLUD4-eOPvuseoJ&sa=X&oi=translate&ct=result&resnum=1&ved=0CBUQ7gEwAA&prev=/search%3Fq%3Dimagick-3.0.0%2Bconfigure%2Binteger%2Bexpression%2Bexpected%26hl%3Den

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-08-12 10:46 UTC] mkoppanen@php.net
This bug has been fixed in SVN.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.

This bug has been fixed in svn already. There hasn't been a release yet but there will be one soonish.
 [2010-08-30 20:55 UTC] tharmor at gmail dot com
Any idea when CentOS 5.5 will see this bug fix in stable?
 [2010-09-16 10:09 UTC] joris at timdm dot nl
Thank you for fixing the bug, but is there a workaround for?
 [2010-09-27 05:59 UTC] chris+pecl at aptivate dot org
As a workaround, edit /usr/bin/php-config, find the line that says:

--version)

And change it to:

--version|--vernum)

Then install imagick again.
 [2010-09-27 06:05 UTC] chris+pecl at aptivate dot org
Sorry, I made a mistake, more is needed to fix this problem.

The simplest workaround is to edit /usr/bin/php-config, find the following lines:

--version)
        echo $version;;

And add two more lines after them:

--vernum)
        echo "50106";;

If that doesn't work, increase the "version number" of PHP until it does :)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 13:01:28 2024 UTC