#26151 [Bgs->Csd]: php_pcre.c won't compile due to new "support for named subpattern"

From: Date: Sat, 08 Nov 2003 11:03:52 +0000
Subject: #26151 [Bgs->Csd]: php_pcre.c won't compile due to new "support for named subpattern"
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-50145@lists.php.net to get a copy of this message
ID: 26151 User updated by: wenthe at ims dot de Reported By: wenthe at ims dot de -Status: Bogus +Status: Closed Bug Type: Compile Failure Operating System: Debian Woody 3.0r1 PHP Version: 4.3.4 New Comment: All the time I did a debian build, that is I tried a "retro port" from the Debian unstable php4.3.3 source package on a stable debian woody. The package maintainer had enabled --with-pcre-regex=/usr which obviously works fine for unstable Debian with it's newer libraries. What I did not realize is, that there is a 3rd way of configuring php. Instead of --with-pcre-regex=/usr and --without-pcre you just say nothing, which tells configure to use the bundled PCRE library. Now everything works fine. Thanks a lot for the quick help! Matthias Wenthe Previous Comments: ------------------------------------------------------------------------ [2003-11-06 14:34:34] sniper@php.net Use the bundled PCRE library and it will work just fine. Most likely your installed pcre version is not compatible. (too old perhaps) We only support the use of bundled pcre library. ------------------------------------------------------------------------ [2003-11-06 11:48:22] wenthe at ims dot de 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 this bug report at http://bugs.php.net/?id=26151&edit=1

« previous php.bugs (#50145) next »