Bug #78197 [PATCH]: PCRE2 version check in `configure` fails for "##.##-xxx" version strings

From: Date: Sun, 23 Jun 2019 13:57:48 +0000
Subject: Bug #78197 [PATCH]: PCRE2 version check in `configure` fails for "##.##-xxx" version strings
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-221458@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78197&edit=1 ID: 78197 Patch added by: peterkokot@gmail.com Reported by: pgnet dot dev at gmail dot com Summary: PCRE2 version check in configure fails for "##.##-xxx" version strings Status: Open Type: Bug Package: Compile Failure Operating System: linux64 PHP Version: 7.3.6 Block user comment: N Private report: N New Comment: 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 Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#221458) next »