-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Update m4 check for libpcre2 version #19289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: PHP-8.3
Are you sure you want to change the base?
Conversation
PHP 7.3, 7.4, 8.0, 8.1 and 8.2 are also affected but according to https://www.php.net/supported-versions.php they are no more supported. I believe the For the maintainers: whenever the bundled version is updated, the m4 macro should be adjusted as well :) |
@hashar CI does not run again when the target branch of a PR changes (and we don't have an equivalent of your (WMF zuul) |
Thing is, PHP 8.3 etc still work fine with pcre2lib 10.30, I just tried and there is no warning. |
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
50ca270
to
17c2e01
Compare
@DanielEScherzer wrote:
I thought GitHub had a way for maintainers to rebase a change or at least have a CI run against the change has would be merged ( I am surprised you know about Zuul :] It is indeed rather convenient to approve a change and have CI rerun and ensure nothing breaks. GitHub has a similar system nowadays: merge queue. Anyway, I have rebased and force pushed. Thank you for the notification! |
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:
The requirement did not:
Update the m4 macro libpre2-8 requirement from 1.30 to 10.42.
References: