Bug #75493 [Opn]: Compile falis on PCRE both 7.0 and 7.1 latest
| From: | samashining at gmail dot com | Date: | Thu, 09 Nov 2017 15:06:03 +0000 |
| Subject: | Bug #75493 [Opn]: Compile falis on PCRE both 7.0 and 7.1 latest | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-212531@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75493&edit=1
ID: 75493
User updated by: samashining at gmail dot com
Reported by: samashining at gmail dot com
Summary: Compile falis on PCRE both 7.0 and 7.1 latest
Status: Open
Type: Bug
Package: Compile Failure
Operating System: Linux (RHEL 6.9)
PHP Version: 7.1.11
Block user comment: N
Private report: N
New Comment:
If possible, to help others, appreciate you to update configure to check for pcre lib, and possible
to express using --with-pcre-regex=/usr as alternative for someone who might run into this, as error
when it fails, and then feel free to close this, would be most appreciated.
Previous Comments:
------------------------------------------------------------------------
[2017-11-09 15:03:28] samashining at gmail dot com
You make a good point, I didn't think about the libraries being that old.
I did try with the --use-pcre-regex=/usr, I still see php-7.0.25/ext/pcre/php_pcre.c:113: undefined
reference to `pcre_free_study'
the same error.
I agree, it should be caught in the configure, checking for which pcre lib is being used, would have
avoided reporting this bug.
I agree that, my bad, didn't realize how old RHEL 6.x was, but many places still use this,
RHEL7x adoption is not as high, not as much certified with it sometimes.
I was able to use php56 latest available, and went with that, do appreciate your help looking at
this.
------------------------------------------------------------------------
[2017-11-07 13:37:08] cmb@php.net
> it makes not much sense compile a recent PHP7.0/PHP7.1 against
> completly outdated system libraries
ACK. However, we're still checking for libpcre ⥠6.6 even in
master[1], what likely has to be adjusted to let ./configure fail
instead of make.
[1] <https://github.com/php/php-src/blob/master/ext/pcre/config0.m4#L44-L46>
------------------------------------------------------------------------
[2017-11-07 13:02:25] spam2 at rhsoft dot net
CentOS6: pcre-7.8-7.el6.x86_64
CentOS7: pcre-8.32-17.el7.x86_64
Fedora 26: pcre-8.41-3.fc26.x86_64
it makes not much sense compile a recent PHP7.0/PHP7.1 against completly outdated system libraries
------------------------------------------------------------------------
[2017-11-07 12:58:36] cmb@php.net
> --with-pcre-regex=/usr \
Please try without this configuration option to force usage of the
bundled libpcre. Would that succeed?
Also, what is the PCRE version you have tried to compile against?
------------------------------------------------------------------------
[2017-11-07 01:31:09] samashining at gmail dot com
Description:
------------
php-7.0.25/ext/pcre/php_pcre.c:113: undefined reference to `pcre_free_study'
I tried to compile with JIT and without JIT, I get errors either way. The errors are in the file
above, in different lines.
ext/pcre/.libs/php_pcre.o: In function `php_free_pcre_cache':
php-7.1.11/ext/pcre/php_pcre.c:113: undefined reference to `pcre_free_study'
If you turn on JIT then you get the following error when running make:
_SIGNALS -c /php-7.1.11/ext/pcre/php_pcre.c -o ext/pcre/php_pcre.lo
p/php-7.1.11/ext/pcre/php_pcre.c:68: error: expected â=â, â,â, â;â,
âasmâ or â__attribute__â before â*â token
/php-7.1.11/ext/pcre/php_pcre.c: In function âpcre_handle_exec_errorâ:
/php-7.1.11/ext/pcre/php_pcre.c:93: error: âPCRE_ERROR_JIT_STACKLIMITâ undeclared (first
use in this function)
/php-7.1.11/ext/pcre/php_pcre.c:93: error: (Each undeclared identifier is reported only once
/php-7.1.11/ext/pcre/php_pcre.c:93: error: for each function it appears in.)
/php-7.1.11/ext/pcre/php_pcre.c: In function âphp_free_pcre_cacheâ:
/php-7.1.11/ext/pcre/php_pcre.c:113: warning: implicit declaration of function
âpcre_free_studyâ
/php-7.1.11/ext/pcre/php_pcre.c: In function âzm_globals_dtor_pcreâ:
/php-7.1.11/ext/pcre/php_pcre.c:138: error: âjit_stackâ undeclared (first use in this
function)
/php-7.1.11/ext/pcre/php_pcre.c:139: warning: implicit declaration of function
âpcre_jit_stack_freeâ
/php-7.1.11/ext/pcre/php_pcre.c: In function âzm_info_pcreâ:
/php-7.1.11/ext/pcre/php_pcre.c:168: error: âPCRE_CONFIG_JITâ undeclared (first use in
this function)
/php-7.1.11/ext/pcre/php_pcre.c: In function âzm_activate_pcreâ:
/php-7.1.11/ext/pcre/php_pcre.c:222: error: âjit_stackâ undeclared (first use in this
function)
/php-7.1.11/ext/pcre/php_pcre.c:223: warning: implicit declaration of function
âpcre_jit_stack_allocâ
/php-7.1.11/ext/pcre/php_pcre.c: In function âpcre_get_compiled_regex_cacheâ:
/php-7.1.11/ext/pcre/php_pcre.c:511: error: âPCRE_STUDY_JIT_COMPILEâ undeclared (first use
in this function)
/php-7.1.11/ext/pcre/php_pcre.c:524: error: âjit_stackâ undeclared (first use in this
function)
/php-7.1.11/ext/pcre/php_pcre.c:525: warning: implicit declaration of function
âpcre_assign_jit_stackâ
make: *** [ext/pcre/php_pcre.lo] Error 1
Test script:
---------------
Here is the compile command in use:
./configure --build=x86_64-redhat-linux-gnu \
--host=x86_64-redhat-linux-gnu \
--target=x86_64-redhat-linux-gnu \
--prefix=/opt/php/php7 \
--cache-file=../config.cache \
--with-libdir=lib64 \
--with-config-file-path=/etc \
--with-config-file-scan-dir=/etc/php.d \
--enable-debug \
--disable-rpath \
--without-pear \
--with-freetype-dir=/usr \
--with-png-dir=/usr \
--with-xpm-dir=/usr \
--enable-gd-native-ttf \
--without-gdbm \
--with-gettext \
--with-iconv \
--with-jpeg-dir=/usr \
--with-openssl \
--with-pcre-regex=/usr \
--with-zlib \
--with-layout=GNU \
--enable-exif \
--enable-ftp \
--enable-sockets \
--with-libxml-dir=/usr \
--enable-xml \
--enable-pcntl \
--enable-mbstring=shared \
--enable-mbregex \
--enable-bcmath=shared \
--with-xmlrpc=shared \
--with-mysqli=shared,/usr/lib64/mysql/mysql_config \
--enable-dom=shared \
--with-snmp=shared,/usr \
--enable-soap=shared \
--enable-xmlreader=shared \
--enable-xmlwriter=shared \
--with-curl=shared,/usr \
--enable-json=shared \
--without-readline \
--without-libedit \
--with-oci8=$ORACLE_HOME \
--enable-opcache=no
Expected result:
----------------
I expect it to compile with make successfully.
Actual result:
--------------
It fails to compile with make when using either the latest 7.1 or 7.0 publicly downloadable source
files.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75493&edit=1