php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #888 Can't compile with use-system-regex=yes
Submitted: 1998-11-01 12:54 UTC Modified: 1998-11-01 16:26 UTC
From: afan at jeonet dot com Assigned:
Status: Closed Package: Compile Failure
PHP Version: 3.0.5 OS: RH Linux, 2.0.32, i686, glibc-2.
Private report: No CVE-ID: None
 [1998-11-01 12:54 UTC] afan at jeonet dot com
Trying to use the system regex instead of the one 
included with php fails with errors such as 

In file included from ../apache_1.3.3/src/include/ap_config.h:952,
                 from php.h:183,
                 from language-parser.y:56:
../apache_1.3.3/src/include/hsregex.h:25: conflicting types for `regoff_t'
/usr/include/regex.h:390: previous declaration of `regoff_t'
../apache_1.3.3/src/include/hsregex.h:31: conflicting types for `regex_t'
/usr/include/regex.h:387: previous declaration of `regex_t'
../apache_1.3.3/src/include/hsregex.h:35: conflicting types for `regmatch_t'
/usr/include/regex.h:418: previous declaration of `regmatch_t'
../apache_1.3.3/src/include/hsregex.h:39: conflicting types for `regcomp'
/usr/include/regex.h:513: previous declaration of `regcomp'
../apache_1.3.3/src/include/hsregex.h:69: conflicting types for `regerror'
/usr/include/regex.h:519: previous declaration of `regerror'
../apache_1.3.3/src/include/hsregex.h:73: conflicting types for `regexec'
/usr/include/regex.h:516: previous declaration of `regexec'
../apache_1.3.3/src/include/hsregex.h:83: conflicting types for `regfree'
/usr/include/regex.h:520: previous declaration of `regfree'
make: *** [language-parser.tab.o] Error 1                              

---------------
CONFIGURE SCRIPT
./configure --with-apache=../apache_1.3.3 --with-gd=/usr/local/include --with-msql=/usr/local/mSQL --with-zlib=/usr/include --with-system-regex=yes

-----------------
Relevent Lines from config.h
#define REGEX 0
#define HSREGEX 0  

------------------
Other information:
  It compiled fine with Slackware Linux 2.0.30, and PHP 3.0.3

Correct me if I am wrong, but shouldn't it not be using the 
apache regex files if  #define HSREGEX=0 ?


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-11-01 16:26 UTC] rasmus
There is an Apache dependancy here.  When you first configure Apache it creates an ap_config.h file which PHP includes.  This ap_config.h file will include the Apache regex library by default.  So, in order to use your system's regex library you will have to first configure Apache to use that library.  ie. build Apache once without PHP and make sure you build it such that it uses your system's regex lib.  Then, once that works, configure and build PHP with your system regex library and then rebuild Apache with PHP support.

By the way, did you have a specific reason for wanting to use your system's regex library?  There are a couple of performance advantages to using the built-in one because when the system regex is used we go for maximum portability and do not make use of some of the shortcuts available in the built-in library.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 09 10:01:31 2024 UTC