Hi,
Trying to recompile PHP4.3.4 (on Debian Sarge, 2.6.7 kernel) to support postgresql (flag --with-pgsql).
$ auto-apt run dpkg-buildpackage -b -D
Getting the following errors:
[...]
cd apache2-build && /usr/bin/make
make[1]: Entering directory /root/build/php4-4.3.4/apache2-build'
/bin/sh /root/build/php4-4.3.4/apache2-build/libtool --preserve-dup-deps --mode=compile gcc -Iext/openssl/ -I/root/build/php4-4.3.4/ext/openssl/ -DPHP_ATOM_INC -I/root/build/php4-4.3.4/apache2-build/include -I/root/build/php4-4.3.4/apache2-build/main -I/root/build/php4-4.3.4 -I/root/build/php4-4.3.4/apache2-build/Zend -I/usr/include/libxml2 -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/c-client -I/root/build/php4-4.3.4/ext/mbstring/mbregex -I/root/build/php4-4.3.4/ext/mbstring/libmbfl -I/root/build/php4-4.3.4/ext/mbstring/libmbfl/mbfl -I/usr/include/mysql -I/usr/include/postgresql -I/usr/include/ucd-snmp -I/root/build/php4-4.3.4/main -I/root/build/php4-4.3.4/Zend -I/root/build/php4-4.3.4/TSRM -I/root/build/php4-4.3.4/apache2-build/TSRM -O2 -Wall -fsigned-char -gstabs -prefer-pic -c /root/build/php4-4.3.4/ext/openssl/openssl.c -o ext/openssl/openssl.lo
mkdir ext/openssl/.libs
gcc -Iext/openssl/ -I/root/build/php4-4.3.4/ext/openssl/ -DPHP_ATOM_INC -I/root/build/php4-4.3.4/apache2-build/include -I/root/build/php4-4.3.4/apache2-build/main -I/root/build/php4-4.3.4 -I/root/build/php4-4.3.4/apache2-build/Zend -I/usr/include/libxml2 -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/c-client -I/root/build/php4-4.3.4/ext/mbstring/mbregex -I/root/build/php4-4.3.4/ext/mbstring/libmbfl -I/root/build/php4-4.3.4/ext/mbstring/libmbfl/mbfl -I/usr/include/mysql -I/usr/include/postgresql -I/usr/include/ucd-snmp -I/root/build/php4-4.3.4/main -I/root/build/php4-4.3.4/Zend -I/root/build/php4-4.3.4/TSRM -I/root/build/php4-4.3.4/apache2-build/TSRM -O2 -Wall -fsigned-char -gstabs -c /root/build/php4-4.3.4/ext/openssl/openssl.c -fPIC -DPIC -o ext/openssl/.libs/openssl.o
/root/build/php4-4.3.4/ext/openssl/openssl.c:66: error:zif_openssl_pkey_free' undeclared here (not in a function)
/root/build/php4-4.3.4/ext/openssl/openssl.c:66: error: initializer element is not constant
/root/build/php4-4.3.4/ext/openssl/openssl.c:66: error: (near initialization for openssl_functions[0].handler')
/root/build/php4-4.3.4/ext/openssl/openssl.c:66: error: initializer element is not constant
/root/build/php4-4.3.4/ext/openssl/openssl.c:66: error: (near initialization foropenssl_functions[0]')
/root/build/php4-4.3.4/ext/openssl/openssl.c:67: error: zif_openssl_pkey_new' undeclared here (not in a function)
/root/build/php4-4.3.4/ext/openssl/openssl.c:67: error: initializer element is not constant
/root/build/php4-4.3.4/ext/openssl/openssl.c:67: error: (near initialization foropenssl_functions[1].handler')
/root/build/php4-4.3.4/ext/openssl/openssl.c:67: error: initializer element is not constant
/root/build/php4-4.3.4/ext/openssl/openssl.c:67: error: (near initialization for openssl_functions[1]')
/root/build/php4-4.3.4/ext/openssl/openssl.c:68: error:zif_openssl_pkey_export' undeclared here (not in a function)
/root/build/php4-4.3.4/ext/openssl/openssl.c:68: error: initializer element is not constant
etc...
When I see these kinds of errors, I usually think that a library or definition is missing or deprecated. And, I've tried to trace this down to no avail.
The first line that bombs is the PHP_FE line below at line 66 in openssl.c:
function_entry openssl_functions[] = {
/ public/private key functions /
PHP_FE(openssl_pkey_free, NULL)
It refers to php.h in /root/build/php4-4.3.4/ which contains:
#define PHP_FE ZEND_FE
This refers to zend_API.h in /root/build/php4-4.3.4/Zend which contains:
#define ZEND_FN(name) zif_##name
#define ZEND_NAMED_FE(zend_name, name, arg_types) { #zend_name, name, arg_types },
#define ZEND_FE(name, arg_types) ZEND_NAMED_FE(name, ZEND_FN(name), arg_types)
Huh? Basically, everything gets prepended with zif_, but I don't find any reference to these functions anywhere, though they are supposedly part of zend_API.c.
Any ideas? I didn't have this problem with 4.1.2 before (Debian Woody version)
Thanks!
P.B.