php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61544 Error Compiling PECL Memcache 2.2.6
Submitted: 2012-03-28 14:53 UTC Modified: 2021-02-11 14:24 UTC
Votes:25
Avg. Score:4.4 ± 0.8
Reproduced:17 of 17 (100.0%)
Same Version:12 (70.6%)
Same OS:3 (17.6%)
From: bennett dot steveb at gmail dot com Assigned: cmb (profile)
Status: Wont fix Package: memcache (PECL)
PHP Version: 5.4.0 OS: Ubuntu 10.04.3 LTS
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2012-03-28 14:53 UTC] bennett dot steveb at gmail dot com
Description:
------------
Hi!

I'm trying to compile manually and install the "memcache" extension (2.2.6) in PHP 5.4.0, but I get the following error while try to "make". I even downloaded and tried: 3.0.6, 2.2.6, 2.2.4, 2.2.2, and 2.2.0. Every version has the same compile error.


cd /usr/local
wget http://pecl.php.net/get/memcache-2.2.6.tgz
tar -xvzf memcache-2.2.6.tgz
rm -Rf memcache-2.2.6.tgz
cd memcache-2.2.6
/usr/local/php5/bin/phpize
./configure --enable-memcache --with-php-config=/usr/local/php5/bin/php-config
make (ERRORS - See Below)
make install


root@UbuntuSRV:/usr/local/memcache-2.2.6# make
/bin/bash /usr/local/memcache-2.2.6/libtool --mode=compile cc -I/usr/local/php5/include/php -I. -I/usr/local/memcache-2.2.6 -DPHP_ATOM_INC -I/usr/local/memcache-2.2.6/include -I/usr/local/memcache-2.2.6/main -I/usr/local/memcache-2.2.6 -I/usr/local/php5/include/php -I/usr/local/php5/include/php/main -I/usr/local/php5/include/php/TSRM -I/usr/local/php5/include/php/Zend -I/usr/local/php5/include/php/ext -I/usr/local/php5/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /usr/local/memcache-2.2.6/memcache.c -o memcache.lo
mkdir .libs
 cc -I/usr/local/php5/include/php -I. -I/usr/local/memcache-2.2.6 -DPHP_ATOM_INC -I/usr/local/memcache-2.2.6/include -I/usr/local/memcache-2.2.6/main -I/usr/local/memcache-2.2.6 -I/usr/local/php5/include/php -I/usr/local/php5/include/php/main -I/usr/local/php5/include/php/TSRM -I/usr/local/php5/include/php/Zend -I/usr/local/php5/include/php/ext -I/usr/local/php5/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /usr/local/memcache-2.2.6/memcache.c  -fPIC -DPIC -o .libs/memcache.o
In file included from /usr/local/memcache-2.2.6/memcache.c:42:
/usr/local/memcache-2.2.6/php_memcache.h:159:1: warning: "IS_CALLABLE" redefined
In file included from /usr/local/php5/include/php/main/php.h:34,
                 from /usr/local/memcache-2.2.6/memcache.c:26:
/usr/local/php5/include/php/Zend/zend.h:576:1: warning: this is the location of the previous definition
/usr/local/memcache-2.2.6/memcache.c: In function ‘php_mmc_connect’:
/usr/local/memcache-2.2.6/memcache.c:1970: error: too few arguments to function ‘zend_list_insert’
/usr/local/memcache-2.2.6/memcache.c:1987: error: too few arguments to function ‘zend_list_insert’
/usr/local/memcache-2.2.6/memcache.c: In function ‘zif_memcache_add_server’:
/usr/local/memcache-2.2.6/memcache.c:2077: error: too few arguments to function ‘zend_list_insert’
/usr/local/memcache-2.2.6/memcache.c: In function ‘mmc_find_persistent’:
/usr/local/memcache-2.2.6/memcache.c:2232: error: too few arguments to function ‘zend_list_insert’
/usr/local/memcache-2.2.6/memcache.c:2250: error: too few arguments to function ‘zend_list_insert’
make: *** [memcache.lo] Error 1


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-03-28 16:10 UTC] bennett dot steveb at gmail dot com
I even tried removing the "memcache.c" file and updating with the SVN Version from here (as it is supposed to provide 5.4 compatibility):

wget http://svn.php.net/viewvc/pecl/memcache/trunk/memcache.c

But now the errors are even worse. I'm seeing a laundry list of things like:

stray "#" in program
too many decimal points in number
invalid digit "8" in octal constant
missing terminating character
etc.
 [2012-03-28 16:28 UTC] tony2001@php.net
-Status: Open +Status: Feedback
 [2012-03-28 16:28 UTC] tony2001@php.net
What if you try to checkout all the sources from SVN, not just one file?
 [2012-03-28 16:43 UTC] bennett dot steveb at gmail dot com
-Status: Feedback +Status: Open
 [2012-03-28 16:43 UTC] bennett dot steveb at gmail dot com
When I download all of the files from the SVN Trunk repository and try to configure, it bails out here:

configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
./configure: line 4017: !DOCTYPE: No such file or directory
./configure: line 4018: syntax error near unexpected token `newline'
./configure: line 4018: `"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
 [2012-03-28 16:53 UTC] bennett dot steveb at gmail dot com
BTW, PHP 5.4.0 was compiled from source like this:


cd /usr/local
wget http://downloads.php.net/stas/php-5.4.0.tar.gz
tar -xvzf php-5.4.0.tar.gz
rm -Rf php-5.4.0.tar.gz
mv /usr/local/php-5.4.0 /usr/local/php5
cd php5
./configure --disable-all --enable-dom --enable-libxml --enable-session --enable-simplexml --enable-xml --prefix=/usr/local/php5 --with-mysql=mysqlnd --with-zlib --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/php5
make
make install
 [2012-03-28 17:45 UTC] hradtke@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: hradtke
 [2012-03-28 17:45 UTC] hradtke@php.net
I am still working on making memcache PHP 5.4 compatible.
 [2012-03-28 17:46 UTC] hradtke@php.net
I am still working on making memcache PHP 5.4 compatible.
 [2012-03-28 18:49 UTC] sixd@php.net
This is similar to bug #61289
 [2012-05-14 13:11 UTC] mcleod at spaceweb dot nl
I experience this problem on:
Mac OS X 10.7
Using MAMP Pro 2.0.5
Php version included with MAMP: 5.3.6
Trying to compile memcache 2.2.6 for php 5.3.13 from source. Downloaded complete 
source code.
 [2012-05-31 18:49 UTC] mr-jack at misterjack dot de
Same problem here. compiling memcache 2.2.6 and 3.0.6. failed:

In file included from /var/tmp/portage/dev-php/pecl-memcache-3.0.6-r1/work/php5.4/memcache_standard_hash.c:27:0:
/var/tmp/portage/dev-php/pecl-memcache-3.0.6-r1/work/php5.4/php_memcache.h:75:0: warning: "IS_CALLABLE" redefined
/usr/lib64/php5.4/include/php/Zend/zend.h:576:0: note: this is the location of the previous definition
In file included from /var/tmp/portage/dev-php/pecl-memcache-3.0.6-r1/work/php5.4/memcache_consistent_hash.c:29:0:
/var/tmp/portage/dev-php/pecl-memcache-3.0.6-r1/work/php5.4/php_memcache.h:75:0: warning: "IS_CALLABLE" redefined
/usr/lib64/php5.4/include/php/Zend/zend.h:576:0: note: this is the location of the previous definition
In file included from /var/tmp/portage/dev-php/pecl-memcache-3.0.6-r1/work/php5.4/memcache.c:30:0:
/var/tmp/portage/dev-php/pecl-memcache-3.0.6-r1/work/php5.4/php_memcache.h:75:0: warning: "IS_CALLABLE" redefined
/usr/lib64/php5.4/include/php/Zend/zend.h:576:0: note: this is the location of the previous definition
In file included from /var/tmp/portage/dev-php/pecl-memcache-3.0.6-r1/work/php5.4/memcache_session.c:34:0:
/var/tmp/portage/dev-php/pecl-memcache-3.0.6-r1/work/php5.4/php_memcache.h:75:0: warning: "IS_CALLABLE" redefined
/usr/lib64/php5.4/include/php/Zend/zend.h:576:0: note: this is the location of the previous definition
/var/tmp/portage/dev-php/pecl-memcache-3.0.6-r1/work/php5.4/memcache.c: In function ‘mmc_find_persistent’:
/var/tmp/portage/dev-php/pecl-memcache-3.0.6-r1/work/php5.4/memcache.c:721:4: error: too few arguments to function ‘zend_list_insert’
/usr/lib64/php5.4/include/php/Zend/zend_list.h:73:14: note: declared here
/var/tmp/portage/dev-php/pecl-memcache-3.0.6-r1/work/php5.4/memcache.c:738:4: error: too few arguments to function ‘zend_list_insert’
/usr/lib64/php5.4/include/php/Zend/zend_list.h:73:14: note: declared here
/var/tmp/portage/dev-php/pecl-memcache-3.0.6-r1/work/php5.4/memcache.c: In function ‘php_mmc_pool_addserver’:
/var/tmp/portage/dev-php/pecl-memcache-3.0.6-r1/work/php5.4/memcache.c:778:3: error: too few arguments to function ‘zend_list_insert’
/usr/lib64/php5.4/include/php/Zend/zend_list.h:73:14: note: declared here
/var/tmp/portage/dev-php/pecl-memcache-3.0.6-r1/work/php5.4/memcache.c: In function ‘php_mmc_connect’:
/var/tmp/portage/dev-php/pecl-memcache-3.0.6-r1/work/php5.4/memcache.c:839:3: error: too few arguments to function ‘zend_list_insert’
/usr/lib64/php5.4/include/php/Zend/zend_list.h:73:14: note: declared here

pls fix asap
 [2012-07-01 17:46 UTC] valid at trash-mail dot com
https://bugs.gentoo.org/show_bug.cgi?id=407441 - go and fix it!
 [2015-02-02 17:32 UTC] bennett dot steveb at gmail dot com
I originally started this post about 3 years ago. Never heard anything since really, only that someone was "working on making memcache PHP 5.4 compatible". Was this ever resolved?
 [2015-02-02 19:12 UTC] mcleod at spaceweb dot nl
I suppose this is not getting a lot of attention, because we are now at php 5.6. In addition, I was able to install memcache on php 5.5 on a Centos 6.5 box by just typing 'pecl install memcache'. My conclusion is that if you have pecl properly installed, there is no need to compile the memcache extension yourself.
 [2015-02-02 19:33 UTC] bennett dot steveb at gmail dot com
[quote]I suppose this is not getting a lot of attention, because we are now at php 5.6.[/quote]

Well at the time of my original post, PHP5.4 WAS the latest version (released March 1st, 2012). The systems we're running still run 5.4 because of the complexity of upgrading. All the installations on our LAMPs were compiled from source for specific reasons (vendor requirements, custom configurations, etc.).


[quote]In addition, I was able to install memcache on php 5.5 on a Centos 6.5 box by just typing 'pecl install memcache'.[/quote] 

'pecl install memcache' is for people who want a base-level installation with no intention of going outside was is common used in the distro configuration. The quick install method for memcache uses the default configuration options and should serve most users’ purposes. However, we needed more control over the installation options, thus installed it the way we did.


[quote]My conclusion is that if you have pecl properly installed, there is no need to compile the memcache extension yourself.[/quote]

You have no idea what we're running and how we're running it, so you have no clue how we've needed to install anything. There IS a need to compile the memcache extension ourselves, and we've been utilizing a workaround. If it hasn't been fixed, then yeah, maybe we'll consider PHP5.6 among other options. 


All I wanted to know is if it ever got fixed (back then)... I hadn't heard anything further on it.
 [2017-10-24 06:59 UTC] kalle@php.net
-Status: Assigned +Status: Open -Assigned To: hradtke +Assigned To:
 [2021-02-11 14:24 UTC] cmb@php.net
-Status: Open +Status: Wont fix -Assigned To: +Assigned To: cmb
 [2021-02-11 14:24 UTC] cmb@php.net
Well, I think this can be closed now.  memcache 4 supports PHP 7,
and memcache 8 supports PHP 8.  It's highly unlikely that proper
support for PHP 5.4 - 5.6 will be accomplished by a future memcache 
release.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 04:01:32 2024 UTC