-
Notifications
You must be signed in to change notification settings - Fork 19
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
phps: Fix build with GCC 14 #393
Conversation
e5d912b
to
1f99b72
Compare
Current issue:
|
Maybe it is necessary to switch from According to https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Werror:
|
IMO, I think we should not spend too much time on this and use the most simple and straightforward solution to fix these old and unmaintained PHP versions. |
Concatenate all the flags from array and also move to `env` attribute.
GCC 14 has gotten stricter as well.
14bceda
to
ee4c32e
Compare
Looks like it now mostly builds. The only remaining thing as far as I can see is the need to rebase the gettext patch for PHP 7.1 through 7.4. |
This comment was marked as outdated.
This comment was marked as outdated.
I would expect it needs to include the C code changes since per the commit message, it will crash. |
Oh... I wonder if such a patch already exist in another similar project aiming at maintaining old PHP versions. Do you know any of them? |
The only thing I am aware of is https://github.com/shivammathur/setup-php and it does not appear to have any specific gettext patches in either homebrew repository. Searching GitHub does not reveal anything. It is possible no-one else is actually running gettext tests on Darwin. Do we even want to fix that? It might be pretty rare for projects to ① run old version of PHP ② on Darwin ③ using |
I totally agree. Let's remove the failing test. |
…th gettext 0.22.5 The incoming bump of the gettext library to 0.22.5 reportedly [1] introduces an assertion that `category` argument of `dcgettext` and `dcngettext` functions is not `LC_ALL`, causing PHP crash with SIGABRT when that happens. This should be rare in practice – I only found one example of a decade-old WordPress plug-in doing that [2]. However, one test was passing `0` as the category argument to those functions, which triggered the assertion on Darwin because it defines `LC_ALL` as 0. On Linux, glibc defines `LC_CTYPE` as 0 so it is not problem there. PHP 8.2 introduced a validation step [1] that will make the functions throw on receiving `LC_ALL`, and we cherry-picked it to 8.0. We decided just to remove the offending test on older versions since the crash is unlikely in practice and backporting the fix is too much bother. [1]: php/php-src@9999a0c [2]: https://github.com/search?utf8=%E2%9C%93&q=%2Fdcn%3Fgettext.%2B%28LC_ALL%7C0%29%2F+language%3APHP&type=code
Flake lock file updates: • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/4989a246d7a390a859852baddb1013f825435cee' (2024-12-17) → 'github:NixOS/nixpkgs/5757bbb8bd7c0630a0cc4bb19c47e588db30b97c' (2025-01-22)
Split it into a separate commit. |
No description provided.