Closed Groxx closed 1 year ago
Apologies, but I'm not familiar with how to request "please rebuild and push formula X now that a dependency has changed", and I couldn't find it in discussions or other issues from a bit of searching.
Hopefully this is sufficient? If not, I'm happy to change the request.
Not a maintainer, but "disabled on Homebrew core" means no one can install it any longer from Homebrew core, so I'm pretty sure the maintainers aren't entertaining any rebottling requests for this.
Your fork means you're responsible for maintaining it going forward.
Broadly I agree... but it is still in core, and it still receives updates, many times long after it was versioned and disabled. If it's unsupported it should probably be removed, in favor of a tap or something.
Also I'm honestly not sure how to add versioning to icu4c to properly manage this (I would prefer to link it against a keg-only old ICU and just freeze everything until we can drop php7), as it fails on the bottle manifest request. From some diving around docs, I get the impression that this is a rather large knowledge cliff and I'm not even sure where to start climbing - nearly all docs assume it's a core formula.
Broadly I agree... but it is still in core, and it still receives updates, many times long after it was versioned and disabled. If it's unsupported it should probably be removed, in favor of a tap or something.
It's disabled because upstream no longer releases updates: https://www.php.net/supported-versions.php.
I believe current policy is to permanently delete disabled formulae one year after, to give people time to copy the formula over to their own taps. At least one person is actively doing so: https://github.com/shivammathur/homebrew-php
Also I'm honestly not sure how to add versioning to icu4c to properly manage this (I would prefer to link it against a keg-only old ICU and just freeze everything until we can drop php7), as it fails on the bottle manifest request. From some diving around docs, I get the impression that this is a rather large knowledge cliff and I'm not even sure where to start climbing - nearly all docs assume it's a core formula.
The simplest way forward, assuming you don't want to rely on Shivam's own efforts, is to remove the bottle do ... end
block from your formula, build from source (which, if you change nothing else, will be against the latest Homebrew dependencies)...and rebuild as necessary against new dependencies, when you see breakage like this.
PHP 7.4 is unsupported so we don't rebottle it for dependencies anymore
Yep, rebuilding from source does work. It's a fine though slow workaround for now.
Thanks all! I'll figure something out.
@Groxx: Perhaps I had a similar problem. Have a mac mini late 2014 with Monterey and homebrew with php@7.4 (webserver). Yesterday I did "brew upgrade" and did not expect any problem. Afterwords php@7.4 did no longer work. Similar warning as you described. What I finally did is:
I know I have a slightly damaged brew-installation now. I will investigate what I will do to fix it. The mac mini is only a fall-back-device, so there is some time hopefully.
Kind regards from Aachen, Germany
The better fix would be to install from https://github.com/shivammathur/homebrew-php who still supports versions of php that upstream doesn't.
If I was meant, I did not touch my installed php at all, I think. Only the webserver apache couldn't start due to php@7.4 did not find icu4c@71.1, because it was overwritten by the brew upgrade command. (But frankly speaking IT-stuff is just something I do as an absolute amateur and I am not an expert at all)
I think as soon as I delete the created symlink, renamed the original one to its original name the homebrew-installation is valid again.
brew upgrade shivammathur/php/php@7.4
upgrades PHP to v7.4.33_1 and fixes the issue with icu4c v72
Thanks @SMillerDev and others above for pointing out the right way to solve this problem.
I just applied the following on an Apple M1 Macbook Pro with Ventura 13.2:
Heiner@virk Release % brew tap shivammathur/php
Heiner@virk Release % brew upgrade shivammathur/php/php@7.4
Heiner@virk Release % codesign --remove-signature /opt/homebrew/Cellar/php@7.4/7.4.33_1/lib/httpd/modules/libphp7.so
Heiner@virk Release % codesign -s "Veelken_20220228" --keychain ~/Library/Keychains/login.keychain-db /opt/homebrew/Cellar/php@7.4/7.4.33_1/lib/httpd/modules/libphp7.so
Now it seems as if php@7.4 and php@8.1 both can work with icu4c 72.1. Questions: 1) Is the homebrew-installation still valid/correct or is it corrupted now somehow? 2) Did the "upgrade" only update the existing homebrew-php@7.4-version or did it install a completely new one? 3) Why did I need to apply the "brew tap shivammathur/php"? 4) Is there anything else I need to take care of concerning this matter?
Thank you @virk It worked like a charm.
brew gist-logs <formula>
link ORbrew config
ANDbrew doctor
outputVerification
brew doctor
output" saysYour system is ready to brew.
and am still able to reproduce my issue.brew update
and am still able to reproduce my issue.brew doctor
and that did not fix my problem.What were you trying to do (and why)?
Install and use
php@7.4.rb
with only these changes so it can be installed and linked (we maintain a fork for this formula):What happened (include all command output)?
The latest PHP 8 works as it links against icu4c v72:
but PHP 7.4 still links to icu4c 71:
which results in the install failing:
brew install php@7.4.rb -s
works with 72 onarc
output at least, seems like it probably just needs a new build to be pushed.What did you expect to happen?
working install of 7.4
Step-by-step reproduction instructions (by running
brew
commands)Apply this patch to the latest php@7.4(.33):
and install it: