apcu fails to install on php 5.6

katmai

Well-Known Member
Mar 13, 2006
564
3
168
Brno, Czech Republic
hey guys,

trying to install apc on php 5.6 and it's failing with the following message. any ideas what's up?

Code:
config.status: creating config.h
config.status: executing libtool commands
running: make
/bin/sh /root/tmp/pear/pear-build-rootw980B9/APC-3.1.13/libtool --mode=compile cc -D_GNU_SOURCE -I. -I/root/tmp/pear/APC -DPHP_ATOM_INC -I/root/tmp/pear/pear-build-rootw980B9/APC-3.1.13/include -I/root/tmp/pear/pear-build-rootw980B9/APC-3.1.13/main -I/root/tmp/pear/APC -I/opt/cpanel/ea-php56/root/usr/include/php -I/opt/cpanel/ea-php56/root/usr/include/php/main -I/opt/cpanel/ea-php56/root/usr/include/php/TSRM -I/opt/cpanel/ea-php56/root/usr/include/php/Zend -I/opt/cpanel/ea-php56/root/usr/include/php/ext -I/opt/cpanel/ea-php56/root/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /root/tmp/pear/APC/apc.c -o apc.lo
libtool: compile:  cc -D_GNU_SOURCE -I. -I/root/tmp/pear/APC -DPHP_ATOM_INC -I/root/tmp/pear/pear-build-rootw980B9/APC-3.1.13/include -I/root/tmp/pear/pear-build-rootw980B9/APC-3.1.13/main -I/root/tmp/pear/APC -I/opt/cpanel/ea-php56/root/usr/include/php -I/opt/cpanel/ea-php56/root/usr/include/php/main -I/opt/cpanel/ea-php56/root/usr/include/php/TSRM -I/opt/cpanel/ea-php56/root/usr/include/php/Zend -I/opt/cpanel/ea-php56/root/usr/include/php/ext -I/opt/cpanel/ea-php56/root/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/tmp/pear/APC/apc.c  -fPIC -DPIC -o .libs/apc.o
/root/tmp/pear/APC/apc.c: In function 'apc_search_paths':
/root/tmp/pear/APC/apc.c:352:5: warning: passing argument 2 of 'php_stream_locate_url_wrapper' from incompatible pointer type [enabled by default]
    wrapper = php_stream_locate_url_wrapper(filename, &path_for_open, 0 TSRMLS_CC);
    ^
In file included from /opt/cpanel/ea-php56/root/usr/include/php/main/php.h:398:0,
                from /root/tmp/pear/APC/apc.h:61,
                from /root/tmp/pear/APC/apc.c:34:
/opt/cpanel/ea-php56/root/usr/include/php/main/php_streams.h:552:28: note: expected 'const char **' but argument is of type 'char **'
 PHPAPI php_stream_wrapper *php_stream_locate_url_wrapper(const char *path, const char **path_for_open, int options TSRMLS_DC);
                           ^
/root/tmp/pear/APC/apc.c:416:20: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
        exec_fname = zend_get_executed_filename(TSRMLS_C);
                   ^
/bin/sh /root/tmp/pear/pear-build-rootw980B9/APC-3.1.13/libtool --mode=compile cc -D_GNU_SOURCE -I. -I/root/tmp/pear/APC -DPHP_ATOM_INC -I/root/tmp/pear/pear-build-rootw980B9/APC-3.1.13/include -I/root/tmp/pear/pear-build-rootw980B9/APC-3.1.13/main -I/root/tmp/pear/APC -I/opt/cpanel/ea-php56/root/usr/include/php -I/opt/cpanel/ea-php56/root/usr/include/php/main -I/opt/cpanel/ea-php56/root/usr/include/php/TSRM -I/opt/cpanel/ea-php56/root/usr/include/php/Zend -I/opt/cpanel/ea-php56/root/usr/include/php/ext -I/opt/cpanel/ea-php56/root/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /root/tmp/pear/APC/php_apc.c -o php_apc.lo
libtool: compile:  cc -D_GNU_SOURCE -I. -I/root/tmp/pear/APC -DPHP_ATOM_INC -I/root/tmp/pear/pear-build-rootw980B9/APC-3.1.13/include -I/root/tmp/pear/pear-build-rootw980B9/APC-3.1.13/main -I/root/tmp/pear/APC -I/opt/cpanel/ea-php56/root/usr/include/php -I/opt/cpanel/ea-php56/root/usr/include/php/main -I/opt/cpanel/ea-php56/root/usr/include/php/TSRM -I/opt/cpanel/ea-php56/root/usr/include/php/Zend -I/opt/cpanel/ea-php56/root/usr/include/php/ext -I/opt/cpanel/ea-php56/root/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/tmp/pear/APC/php_apc.c  -fPIC -DPIC -o .libs/php_apc.o
/bin/sh /root/tmp/pear/pear-build-rootw980B9/APC-3.1.13/libtool --mode=compile cc -D_GNU_SOURCE -I. -I/root/tmp/pear/APC -DPHP_ATOM_INC -I/root/tmp/pear/pear-build-rootw980B9/APC-3.1.13/include -I/root/tmp/pear/pear-build-rootw980B9/APC-3.1.13/main -I/root/tmp/pear/APC -I/opt/cpanel/ea-php56/root/usr/include/php -I/opt/cpanel/ea-php56/root/usr/include/php/main -I/opt/cpanel/ea-php56/root/usr/include/php/TSRM -I/opt/cpanel/ea-php56/root/usr/include/php/Zend -I/opt/cpanel/ea-php56/root/usr/include/php/ext -I/opt/cpanel/ea-php56/root/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /root/tmp/pear/APC/apc_cache.c -o apc_cache.lo
libtool: compile:  cc -D_GNU_SOURCE -I. -I/root/tmp/pear/APC -DPHP_ATOM_INC -I/root/tmp/pear/pear-build-rootw980B9/APC-3.1.13/include -I/root/tmp/pear/pear-build-rootw980B9/APC-3.1.13/main -I/root/tmp/pear/APC -I/opt/cpanel/ea-php56/root/usr/include/php -I/opt/cpanel/ea-php56/root/usr/include/php/main -I/opt/cpanel/ea-php56/root/usr/include/php/TSRM -I/opt/cpanel/ea-php56/root/usr/include/php/Zend -I/opt/cpanel/ea-php56/root/usr/include/php/ext -I/opt/cpanel/ea-php56/root/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/tmp/pear/APC/apc_cache.c  -fPIC -DPIC -o .libs/apc_cache.o
/root/tmp/pear/APC/apc_cache.c: In function '_apc_cache_user_update':
/root/tmp/pear/APC/apc_cache.c:818:63: error: 'IS_CONSTANT_INDEX' undeclared (first use in this function)
            switch(Z_TYPE_P((*slot)->value->data.user.val) & ~IS_CONSTANT_INDEX) {
                                                              ^
/root/tmp/pear/APC/apc_cache.c:818:63: note: each undeclared identifier is reported only once for each function it appears in
/root/tmp/pear/APC/apc_cache.c:820:22: error: 'IS_CONSTANT_ARRAY' undeclared (first use in this function)
                case IS_CONSTANT_ARRAY:
                     ^
make: *** [apc_cache.lo] Error 1
ERROR: `make' failed
 
Last edited by a moderator:

katmai

Well-Known Member
Mar 13, 2006
564
3
168
Brno, Czech Republic
is there a way to install the last version that supported php 5.6 by any chance?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,213
363
Hello @katmai,

You could install the last APCu 4.x PECL release for PHP 5.6 using the command below:

Code:
/opt/cpanel/ea-php56/root/usr/bin/pecl install https://pecl.php.net/get/apcu-4.0.11.tgz
Keep in mind this is unsupported and not recommended due to the use of an outdated software package.

Thank you.