homebrew-php icon indicating copy to clipboard operation
homebrew-php copied to clipboard

Fix compilation of PHP due ICU 70

Open osrecio opened this issue 2 years ago • 8 comments

Fix the installation of older versions of PHP due to the update of ICU 70

Fixed issues: https://github.com/henkrehorst/homebrew-php/issues/158

More info: https://github.com/php/php-src/pull/7596

Thanks @nickolasburr for the hint!

osrecio avatar Mar 31 '22 15:03 osrecio

How can I test this before it is merged?

JPry avatar Apr 11 '22 16:04 JPry

You can test it following next steps:

cd  /opt/homebrew/Library/Taps/henkrehorst/homebrew-php/

git pull origin pull/160/head:fix-php
git checkout fix-php

brew install [email protected] --build-from-source 

x.x can be: 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1

osrecio avatar Apr 11 '22 16:04 osrecio

Thanks @osrecio, I can confirm that the fix works for PHP 7.4, 8.0, and 8.1. But I see issues for these versions:

7.0

brew install --build-from-source [email protected]
==> Downloading https://raw.githubusercontent.com/henkrehorst/homebrew-php/master/Patches/php70-icu70.patch

curl: (22) The requested URL returned error: 404 
Error: [email protected]: Failed to download resource "[email protected]"
Download failed: https://raw.githubusercontent.com/henkrehorst/homebrew-php/master/Patches/php70-icu70.patch

7.1

brew install --build-from-source [email protected]
==> Downloading https://raw.githubusercontent.com/henkrehorst/homebrew-php/master/Patches/php71-icu70.patch

curl: (22) The requested URL returned error: 404 
Error: [email protected]: Failed to download resource "[email protected]"
Download failed: https://raw.githubusercontent.com/henkrehorst/homebrew-php/master/Patches/php71-icu70.patch

7.2

brew install --build-from-source [email protected]  
==> Downloading https://raw.githubusercontent.com/henkrehorst/homebrew-php/master/Patches/php71-icu70.patch

curl: (22) The requested URL returned error: 404 
Error: [email protected]: Failed to download resource "[email protected]"
Download failed: https://raw.githubusercontent.com/henkrehorst/homebrew-php/master/Patches/php71-icu70.patch

7.3

brew install --build-from-source [email protected]      
==> Downloading https://raw.githubusercontent.com/henkrehorst/homebrew-php/master/Patches/php73-icu70.patch

curl: (22) The requested URL returned error: 404 
Error: [email protected]: Failed to download resource "[email protected]"
Download failed: https://raw.githubusercontent.com/henkrehorst/homebrew-php/master/Patches/php73-icu70.patch

JPry avatar Apr 11 '22 18:04 JPry

Ahh yes,

the problem is those patch files will not exists until the PR will be merged.

you can edit the formula to store the patches in local url for example

to edit formula: brew edit [email protected]

osrecio avatar Apr 12 '22 08:04 osrecio

the problem is those patch files will not exists until the PR will be merged.

I had a feeling that was the likely issue, but still figured it was worth flagging 🙂

JPry avatar Apr 12 '22 14:04 JPry

@henkrehorst any chance to take a look this PR?

Thanks!

osrecio avatar May 05 '22 06:05 osrecio

After applying these changes I was able to install 7.3 and 7.4 with no issues, thanks @osrecio

diazwatson avatar May 23 '22 16:05 diazwatson

Ey @henkrehorst can you please review this ticket? Thanks!!!

manuelson avatar Jun 08 '22 10:06 manuelson