From:             wenthe at ims dot de
Operating system: Debian Woody 3.0r1
PHP version:      4.3.4
PHP Bug Type:     Compile Failure
Bug description:  php_pcre.c won't compile due to new "support for named subpattern" 

Description:
------------
Compilation of php4.3.3 and php4.3.4 fail with following 
compiler error (gcc version 2.95.4 20011002 (Debian 
prerelease)): 
 
/bin/sh /usr/src/php-4.3.4/libtool --silent 
--preserve-dup-deps --mode=compile gcc -DSUPPORT_UTF8 
-DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -Iext/pcre/ 
-I/usr/src/php-4.3.4/ext/pcre/ -DPHP_ATOM_INC 
-I/usr/src/php-4.3.4/include -I/usr/src/php-4.3.4/main 
-I/usr/src/php-4.3.4 -I/usr/src/php-4.3.4/Zend 
-I/usr/include/libxml2 -I/usr/X11R6/include 
-I/usr/include/freetype2 -I/usr/include/c-client 
-I/usr/src/php-4.3.4/ext/mbstring/mbregex 
-I/usr/src/php-4.3.4/ext/mbstring/libmbfl 
-I/usr/src/php-4.3.4/ext/mbstring/libmbfl/mbfl 
-I/usr/include/mysql -I/usr/include/ucd-snmp  
-I/usr/src/php-4.3.4/TSRM  -O2 -Wall -fsigned-char  
-prefer-pic -c /usr/src/php-4.3.4/ext/pcre/php_pcre.c -o 
ext/pcre/php_pcre.lo  
/usr/src/php-4.3.4/ext/pcre/php_pcre.c: In function 
`php_pcre_match': 
/usr/src/php-4.3.4/ext/pcre/php_pcre.c:435: 
`PCRE_INFO_NAMECOUNT' undeclared (first use in this 
function) 
/usr/src/php-4.3.4/ext/pcre/php_pcre.c:435: (Each 
undeclared identifier is reported only once 
/usr/src/php-4.3.4/ext/pcre/php_pcre.c:435: for each 
function it appears in.) 
/usr/src/php-4.3.4/ext/pcre/php_pcre.c:437: 
`PCRE_INFO_NAMETABLE' undeclared (first use in this 
function) 
/usr/src/php-4.3.4/ext/pcre/php_pcre.c:438: 
`PCRE_INFO_NAMEENTRYSIZE' undeclared (first use in this 
function) 
make: *** [ext/pcre/php_pcre.lo] Error 1 
 
I can make the compilation to continue by adding following 
definitions from ./ext/pcre/pcrelib/pcre.h to php_pcre.c 
 
#define PCRE_INFO_NAMEENTRYSIZE      7 
#define PCRE_INFO_NAMECOUNT          8 
#define PCRE_INFO_NAMETABLE          9 
#define PCRE_INFO_STUDYSIZE         10 
 
alas the resulting binaries segfault as soon as the 
preg_match function is used (e.g. during "make install" 
when PEAR ist being build as well as libphp4.so as an 
apache DSO) 
 
php4.3.1 without "support for named subpattern" compiles 
fine on the same system. 
 
configure options as follows: 
 
CFLAGS="-O2 -Wall -fsigned-char" ./configure --prefix=/usr 
\ 
                --with-apxs=/usr/bin/apxs \ 
                --with-regex=php \ 
                --with-config-file-path=/etc/php4/apache \ 
                --disable-rpath \ 
                --enable-memory-limit \ 
                --disable-debug \ 
                --with-layout=GNU \ 
                --with-pear=/usr/share/php \ 
                --enable-calendar \ 
                --enable-sysvsem \ 
                --enable-sysvshm \ 
                --enable-track-vars \ 
                --enable-trans-sid \ 
                --enable-bcmath \ 
                --with-bz2 \ 
                --enable-ctype \ 
                --with-db2 \ 
                --with-iconv \ 
                --enable-exif \ 
                --enable-filepro \ 
                --enable-ftp \ 
                --with-gettext \ 
                --enable-mbstring \ 
                --with-pcre-regex=/usr \ 
                --enable-shmop \ 
                --enable-sockets \ 
                --enable-wddx \ 
                --disable-xml --with-expat-dir=/usr \ 
                --enable-yp \ 
                --with-zlib \ 
                --without-pgsql \ 
                --with-kerberos=/usr \ 
                --with-openssl=/usr \ 
                --with-exec-dir=/usr/lib/php4/libexec \ 
                --disable-static \ 
                --with-curl=shared,/usr \ 
                --with-dom=shared,/usr 
--with-dom-xslt=shared,/usr --with-dom-ex 
slt=shared,/usr \ 
                --with-zlib-dir=/usr \ 
                --with-gd=shared,/usr \ 
                --with-jpeg-dir=shared,/usr 
--with-xpm-dir=shared,/usr/X11R6 --w 
ith-png-dir=shared,/usr \ 
                --with-freetype-dir=shared,/usr  \ 
                --with-imap=shared,/usr \ 
                --with-imap-ssl \ 
                --with-ldap=shared,/usr \ 
                --with-mcal=shared,/usr \ 
                --with-mhash=shared,/usr \ 
                --with-mm \ 
                --with-mysql=shared,/usr \ 
                --with-unixODBC=shared,/usr \ 
                --with-recode=shared,/usr \ 
                --enable-xslt=shared 
--with-xslt-sablot=shared,/usr \ 
                --with-snmp=shared --enable-ucd-snmp-hack 
\ 
                --with-sybase-ct=shared,/usr \ 
                --with-ttf=shared,/usr 
--with-t1lib=shared,/usr 
 
Glad for any help in this matter 
 
Matthias Wenthe 


-- 
Edit bug report at http://bugs.php.net/?id=26151&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26151&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26151&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26151&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26151&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26151&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=26151&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26151&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26151&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26151&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26151&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26151&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26151&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26151&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26151&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26151&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26151&r=float

Reply via email to