Bug #78197 [Opn->Csd]: PCRE2 version check in `configure` fails for "##.##-xxx" version strings
Edit report at https://bugs.php.net/bug.php?id=78197&edit=1
ID: 78197
Updated by: petk@php.net
Reported by: pgnet dot dev at gmail dot com
Summary: PCRE2 version check in configure fails for
"##.##-xxx" version strings
-Status: Open
+Status: Closed
Type: Bug
Package: Compile Failure
Operating System: linux64
PHP Version: 7.3.6
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of peterkokot@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=624488b5e82545f6424998fa66d6bb0f143f81c0
Log: Fix bug #78197: PCRE2 version check
Previous Comments:
------------------------------------------------------------------------
[2019-06-23 14:14:15] peterkokot at gmail dot com
Above pull request should fix this. PHP 7.3 and PCRE already use pkg-config otherwise...
------------------------------------------------------------------------
[2019-06-23 13:57:48] peterkokot at gmail dot com
The following pull request has been associated:
Patch Name: Fix bug #78197: PCRE2 version check
On GitHub: https://github.com/php/php-src/pull/4296
Patch: https://github.com/php/php-src/pull/4296.patch
------------------------------------------------------------------------
[2019-06-23 11:20:09] cmb@php.net
Thanks! The fix would go to config0.m4[1]. I'm not sure whether
we should apply the fix, though, since PHP 7.4 dropped support for
pcre2-config in favor of pkg-config which is already supported by
PHP 7.3. So having a properly pgk-config would be necessary in
the near future anyway.
[1] <https://github.com/php/php-src/blob/php-7.3.6/ext/pcre/config0.m4#L38>
------------------------------------------------------------------------
[2019-06-22 18:38:45] pgnet dot dev at gmail dot com
Description:
------------
Building PHP 7.3 against PCRE2/git
which pcre2-config
/usr/local/bin/pcre2-config
pcre2-config --version
10.34-RC1
php configure fails
...
checking for PCRE2 10.30 or greater... ./configure: line 19557: test: 1034-RC1: integer expression
expected
...
in 'configure',
...
PCRE2_CONF=$PHP_PCRE_REGEX/bin/pcre2-config
...
PCRE2_VER=$PCRE2_CONF --version
19557 if test "echo $PCRE2_VER | sed 's,\.,,g'" -lt 1030;
then
...
The problem's in the PCRE2 version string -- the configure step chokes on the "-RC1"
in its version test.
- 19557 if test "echo $PCRE2_VER | sed 's,\.,,g'" -lt 1030;
then
+ 19557 if test "echo $PCRE2_VER | sed 's,-.*,,g' | sed
's,\.,,g'" -lt 1030; then
does the trick
...
checking for PCRE2 10.30 or greater... 10.34-RC1
...
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78197&edit=1
Thread (5 messages)