Skip to content

Commit 17c2e01

Browse files
committed
Update m4 check for libpcre2 version
The pcre extension automake configuration only requires libpcre2 10.30. PHP 8.2 requires 10.42 else on startup one would encounter: Warning: PHP Startup: ^(text/|application/xhtml\+xml) (offset=0): unrecognised compile-time option bit(s) in Unknown on line 0 Most people use the bundled libpcre2. When one uses a dynamically linked version of libpcre2, the pcre extension has an outdated version requirement: ext/pcre/config0.m4: PKG_CHECK_MODULES([PCRE2], [libpcre2-8 >= 10.30]) That was introduced by a5bc5ae (released with php 7.30) which came with libpcre2 10.30. If one backports php 8.3 to an older version of Debian (Bullseye has 10.36), the compilation configuration checks pass but the PHP startup warning will appear. The bundled version of libpcre2 has been updated several time and the version check was never kept in sync: | PHP | libpcre2 | commit |-------|----------|------- | 7.3.0 | 10.30 | a5bc5ae | 7.3.0 | 10.31 | 703e037 | 7.4.0 | 10.32 | d918e07 | 7.4.0 | 10.33 | aa9433e | 8.0.0 | 10.34 | 52d0783 | 8.0.0 | 10.35 | b419f96 | 8.1.0 | 10.37 | 5d42900 | 8.1.1 | 10.39 | 6008a75 | 8.2.0 | 10.40 | 32cceb7 | 8.3.0 | 10.42 | c4e8f65 | 8.4.0 | 10.43 | ae5beff | 8.4.0 | 10.44 | d1f14a4 | 8.5.x | 10.45 | e928487 The requirement did not: ``` $ git grep libpcre {PHP-{7.4,8.0,8.1,8.2,8.3,8.4},master} ext/pcre/config0.m4 PHP-7.4:ext/pcre/config0.m4: PKG_CHECK_MODULES([PCRE2], [libpcre2-8 >= 10.30]) PHP-8.0:ext/pcre/config0.m4: PKG_CHECK_MODULES([PCRE2], [libpcre2-8 >= 10.30]) PHP-8.1:ext/pcre/config0.m4: PKG_CHECK_MODULES([PCRE2], [libpcre2-8 >= 10.30]) PHP-8.2:ext/pcre/config0.m4: PKG_CHECK_MODULES([PCRE2], [libpcre2-8 >= 10.30]) PHP-8.3:ext/pcre/config0.m4: PKG_CHECK_MODULES([PCRE2], [libpcre2-8 >= 10.30]) PHP-8.4:ext/pcre/config0.m4: PKG_CHECK_MODULES([PCRE2], [libpcre2-8 >= 10.30]) master:ext/pcre/config0.m4: PKG_CHECK_MODULES([PCRE2], [libpcre2-8 >= 10.30]) ``` Update the m4 macro libpre2-8 requirement from 1.30 to 10.42. References: * https://phabricator.wikimedia.org/T398245#11010808 * https://phabricator.wikimedia.org/T400693
1 parent aae35f3 commit 17c2e01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/pcre/config0.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ PHP_ARG_WITH([pcre-jit],,
1414

1515
if test "$PHP_EXTERNAL_PCRE" != "no"; then
1616

17-
PKG_CHECK_MODULES([PCRE2], [libpcre2-8 >= 10.30])
17+
PKG_CHECK_MODULES([PCRE2], [libpcre2-8 >= 10.42])
1818

1919
PHP_EVAL_INCLINE($PCRE2_CFLAGS)
2020
PHP_EVAL_LIBLINE($PCRE2_LIBS)

0 commit comments

Comments
 (0)