Php – Debian PHP 5.3 APD compile problems

debianpeclPHP

I've been trying to install APD on Debian using pecl install apd. However, the command fails when entering the make stage:

make
/bin/sh /src/apd-1.0.1/libtool --mode=compile cc  -I. -I/src/apd-1.0.1 -DPHP_ATOM_INC -I/src/apd-1.0.1/include -I/src/apd-1.0.1/main -I/src/apd-1.0.1 -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  -DHAVE_CONFIG_H  -g -O2   -c /src/apd-1.0.1/php_apd.c -o php_apd.lo 
mkdir .libs
 cc -I. -I/src/apd-1.0.1 -DPHP_ATOM_INC -I/src/apd-1.0.1/include -I/src/apd-1.0.1/main -I/src/apd-1.0.1 -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 -DHAVE_CONFIG_H -g -O2 -c /src/apd-1.0.1/php_apd.c  -fPIC -DPIC -o .libs/php_apd.o
/src/apd-1.0.1/php_apd.c: In function ‘zif_override_function’:
/src/apd-1.0.1/php_apd.c:615: warning: ‘zend_get_parameters_ex’ is deprecated (declared at /usr/include/php5/Zend/zend_API.h:222)
/src/apd-1.0.1/php_apd.c: In function ‘zif_rename_function’:
/src/apd-1.0.1/php_apd.c:669: warning: ‘zend_get_parameters_ex’ is deprecated (declared at /usr/include/php5/Zend/zend_API.h:222)
/src/apd-1.0.1/php_apd.c: In function ‘zif_apd_set_pprof_trace’:
/src/apd-1.0.1/php_apd.c:792: warning: ‘zend_get_parameters_ex’ is deprecated (declared at /usr/include/php5/Zend/zend_API.h:222)
/src/apd-1.0.1/php_apd.c: In function ‘apd_zend_startup’:
/src/apd-1.0.1/php_apd.c:967: error: ‘struct _zend_compiler_globals’ has no member named ‘extended_info’
make: *** [php_apd.lo] Error 1

Downloading the source, phpizeing and compiling myself leads to the same thing.

And help with why this is and how to get around it would be much appreciated!

Best Answer

APD doesn't compile with PHP 5.3. See bug.

Try apply patch. Edit apd-1.0.1/php_apd.c, change this line:

CG(extended_info) = 1;

to

CG(compiler_options) |= ZEND_COMPILE_EXTENDED_INFO;