-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix check for newer versions of ICU #14186
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
Fix check for newer versions of ICU #14186
Conversation
The previous test would always trigger, even if the version of ICU installed didn't require C++17. This was because it incorrectly used the `test` program, which broke the build on systems without a C++17 compiler. Tested with macOS 14 and i 7.2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let @petk have a look perhaps too ?
Yes, this now works properly indeed - without that test in there. Thanks for finding it and fixing it. There is one more to change in the --- a/build/php.m4
+++ b/build/php.m4
@@ -1819,9 +1819,8 @@ AC_DEFUN([PHP_SETUP_ICU],[
ICU_CFLAGS="$ICU_CFLAGS -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1"
ICU_CXXFLAGS="$ICU_CXXFLAGS -DUNISTR_FROM_CHAR_EXPLICIT=explicit -DUNISTR_FROM_STRING_EXPLICIT=explicit"
- if test "$PKG_CONFIG icu-io --atleast-version=60"; then
- ICU_CFLAGS="$ICU_CFLAGS -DU_HIDE_OBSOLETE_UTF_OLD_H=1"
- fi
+ AS_IF([$PKG_CONFIG icu-io --atleast-version=60],
+ [ICU_CFLAGS="$ICU_CFLAGS -DU_HIDE_OBSOLETE_UTF_OLD_H=1"])
]) |
Same as the previous fix for C++17.
The changes to ext/intl/config.m4 and build/php.m4 are not enough for me. I still have to change the configure script as well. --- configure.orig 2024-05-10 13:45:38.311436752 -0600
+++ configure 2024-05-10 13:45:53.832945544 -0600
@@ -48868,7 +48868,7 @@
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if intl requires -std=gnu++17" >&5
printf %s "checking if intl requires -std=gnu++17... " >&6; }
-if test "$PKG_CONFIG icu-uc --atleast-version=74"
+if $PKG_CONFIG icu-uc --atleast-version=74
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 Is this supposed to be necessary? |
Did you build from the github repo ? Did you do |
What David said. The configure script is built from these files. Once you change those files, you'll need to regenerate the build system with |
That was the missing step. |
The previous test would always trigger, even if the version of ICU installed didn't require C++17. This was because it incorrectly used the
test
program, which broke the build on systems without a C++17 compiler.Tested with macOS 14 and i 7.2. Targeting 8.2 for fixing the regression introduced into there.