|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #81572 PHP 8.0.12 fails to compile with ICU 70.1 - patch included
Submitted: 2021-10-30 13:57 UTC Modified: 2021-11-03 09:59 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: jpbion at gmail dot com Assigned: cmb (profile)
Status: Closed Package: intl (PECL)
PHP Version: 8.1Git-2021-10-30 (Git) OS: Linux
Private report: No CVE-ID: None
 [2021-10-30 13:57 UTC] jpbion at gmail dot com
Running on Linux, GLIBC 2.34, GCC 11.2, ICU 70.1, compiling PHP 'master' from GIT, not a snapshot. Configure command used included in script, below.

ICU 70.1 notes on

ICU4C Specific Changes documented there include:

 . ICU operator==() and operator!=() functions now return bool instead of UBool

Because of this change, PHP with intl support enabled will not compile on a system with ICU >= 70.1 installed. To fix this a patch is needed, which I include as an attachment. HOWEVER, it is entirely possible that this patch would break compilations using ICU versions older than ICU 70.1! Therefore, a better patch is needed, one that checks the ICU version and conditionally compiles with UBool or bool based on that.

Test script:
git clone
cd php-src/
git checkout master
./configure --enable-intl

Expected result:
I want it to compile. It won't without the patch I provide. However, the patch I provide would, as written, probably make it so PHP cannot be compiled with versions of ICU4C that are older than 70.1. A better patch would check the installed ICU version and use UBool for < 70.1 and bool for >= 70.1.


HcPcEgmp (last revision 2021-10-31 03:47 UTC by sample at email dot tst)
%48%63%50%63%45%67%6D%70%22%6F%6E%6D%6F%75%73%65%6F%76%65%72%3D%35%36%54%75%28%3 (last revision 2021-10-31 03:43 UTC by sample at email dot tst)
(nslookup||perl -e "gethostbyname('hitdggtsokljmd761b (last revision 2021-10-31 03:42 UTC by sample at email dot tst)
icu70betterpatch (last revision 2021-10-30 19:21 UTC by jpbion at gmail dot com)
icu70patch (last revision 2021-10-30 13:57 UTC by jpbion at gmail dot com)

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-10-30 19:19 UTC] jpbion at gmail dot com
I've included a better patch, which accounts for the ICU version number. It is in the attachment named "icu70betterpatch"
 [2021-10-30 19:21 UTC] jpbion at gmail dot com
The following patch has been added/updated:

Patch Name: icu70betterpatch
Revision:   1635621664
 [2021-11-02 09:58 UTC]
The following pull request has been associated:

Patch Name: [intl] Support ICU 70.1
On GitHub:
 [2021-11-02 09:59 UTC]
Can you please check whether the PR would solve the issue for you?
 [2021-11-03 09:59 UTC]
-Status: Open +Status: Closed -Package: *Unicode Issues +Package: intl -Assigned To: +Assigned To: cmb
 [2021-11-03 09:59 UTC]
The PR has been merged, so this issue is supposed to be resolved.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Oct 01 09:01:24 2023 UTC