@florianorineveu try with these 2 patches:
From 0a39890c967aa57225bb6bdf4821aff7a3a3c082 Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Fri, 1 Dec 2023 18:03:35 +0100
Subject: [PATCH 1/1] Fix libxml2 2.12 build due to API breaks
See https://github.com/php/php-src/actions/runs/7062192818/job/19225478601
---
ext/libxml/libxml.c | 14 ++++++++++----
ext/soap/php_sdl.c | 2 +-
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c
index 22eb1901b8..1de693892b 100644
--- a/ext/libxml/libxml.c
+++ b/ext/libxml/libxml.c
@@ -472,7 +472,11 @@ static void _php_libxml_free_error(void *ptr)
xmlResetError((xmlErrorPtr) ptr);
}
-static void _php_list_set_error_structure(xmlErrorPtr error, const char *msg)
+#if LIBXML_VERSION >= 21200
+static void _php_list_set_error_structure(const xmlError *error, const char *msg)
+#else
+static void _php_list_set_error_structure(xmlError *error, const char *msg)
+#endif
{
xmlError error_copy;
int ret;
@@ -725,7 +729,11 @@ PHP_LIBXML_API void php_libxml_ctx_warning(void *ctx, const char *msg, ...)
va_end(args);
}
+#if LIBXML_VERSION >= 21200
+PHP_LIBXML_API void php_libxml_structured_error_handler(void *userData, const xmlError *error)
+#else
PHP_LIBXML_API void php_libxml_structured_error_handler(void *userData, xmlErrorPtr error)
+#endif
{
_php_list_set_error_structure(error, NULL);
@@ -957,11 +965,9 @@ PHP_FUNCTION(libxml_use_internal_errors)
/* {{{ Retrieve last error from libxml */
PHP_FUNCTION(libxml_get_last_error)
{
- xmlErrorPtr error;
-
ZEND_PARSE_PARAMETERS_NONE();
- error = xmlGetLastError();
+ const xmlError *error = xmlGetLastError();
if (error) {
object_init_ex(return_value, libxmlerror_class_entry);
diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c
index 749f5a5685..b731114775 100644
--- a/ext/soap/php_sdl.c
+++ b/ext/soap/php_sdl.c
@@ -332,7 +332,7 @@ static void load_wsdl_ex(zval *this_ptr, char *struri, sdlCtx *ctx, int include)
sdl_restore_uri_credentials(ctx);
if (!wsdl) {
- xmlErrorPtr xmlErrorPtr = xmlGetLastError();
+ const xmlError *xmlErrorPtr = xmlGetLastError();
if (xmlErrorPtr) {
soap_error2(E_ERROR, "Parsing WSDL: Couldn't load from '%s' : %s", struri, xmlErrorPtr->message);
--
2.45.1
and
From cc46a4e6b5a413bab3e264c1dcaaf7052f54fbc4 Mon Sep 17 00:00:00 2001
From: David Carlier <devnexen@gmail.com>
Date: Sat, 17 Feb 2024 21:38:21 +0000
Subject: [PATCH 1/1] ext/intl: level up c++ runtime std for icu 74 and
onwards.
to align with what is required to build icu 74 itself.
Close GH-14002
---
NEWS | 3 +++
ext/intl/config.m4 | 11 ++++++++++-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/NEWS b/NEWS
index bcff2820de..e5f8e3eba5 100644
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,9 @@ PHP NEWS
. Fixed bug GH-13563 (Setting bool values via env in FPM config fails).
(Jakub Zelenka)
+- Intl:
+ . Fixed build for icu 74 and onwards. (dunglas)
+
- MySQLnd:
. Fix shift out of bounds on 32-bit non-fast-path platforms. (nielsdos)
diff --git a/ext/intl/config.m4 b/ext/intl/config.m4
index dd687bcd97..48f5147ca7 100644
--- a/ext/intl/config.m4
+++ b/ext/intl/config.m4
@@ -80,7 +80,16 @@ if test "$PHP_INTL" != "no"; then
breakiterator/codepointiterator_methods.cpp"
PHP_REQUIRE_CXX()
- PHP_CXX_COMPILE_STDCXX(11, mandatory, PHP_INTL_STDCXX)
+
+ AC_MSG_CHECKING([if intl requires -std=gnu++17])
+ AS_IF([test "$PKG_CONFIG icu-uc --atleast-version=74"],[
+ AC_MSG_RESULT([yes])
+ PHP_CXX_COMPILE_STDCXX(17, mandatory, PHP_INTL_STDCXX)
+ ],[
+ AC_MSG_RESULT([no])
+ PHP_CXX_COMPILE_STDCXX(11, mandatory, PHP_INTL_STDCXX)
+ ])
+
PHP_INTL_CXX_FLAGS="$INTL_COMMON_FLAGS $PHP_INTL_STDCXX $ICU_CXXFLAGS"
case $host_alias in
*cygwin*) PHP_INTL_CXX_FLAGS="$PHP_INTL_CXX_FLAGS -D_POSIX_C_SOURCE=200809L"
--
2.45.1
Pinned Comments
el_aur commented on 2022-02-02 08:43 (UTC) (edited on 2022-02-04 11:28 (UTC) by el_aur)
Created binary repository on build.opensuse.org
https://build.opensuse.org/project/show/home:el:archphp
For Arch Linux, edit /etc/pacman.conf and add the following (note that the order of repositories in pacman.conf is important, since pacman always downloads the first found package):
Then run the following as root
Refresh packages database
Now search for php packages you need:
Install with
pacman -S
packages you need or all PHP 8.1 packages with:el_aur commented on 2022-01-27 12:09 (UTC) (edited on 2022-01-27 15:19 (UTC) by el_aur)
Read Carefully! Breaking changes in compare with native PHP package
Console version
/usr/bin/php81
is installed withphp81-cli
subpackage,php81
doesn't include it anymore!!!PEAR and PECL are available as
php81-pear
andphp81-pecl
subpackagesAll shared modules are respresented as stand-alone subpackages and are not included with
php81
package anymore.No more extensions in php.ini itself!
Separate INI files for each extension are placed in
/etc/php81/conf.d
They are loaded in correct order according to priority