[php-src] Issue #12965: Build Failure With libxml2-2.12.3
| From: | debohman | Date: | Sun, 17 Dec 2023 12:23:04 +0000 |
| Subject: | [php-src] Issue #12965: Build Failure With libxml2-2.12.3 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-246064@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/12965
Author: debohman
### Description
```
/bin/sh /tera/tera/debo/Projects/php/php-8.2.13/libtool --silent --preserve-dup-deps --tag CC
--mode=compile cc -Iext/libxml/ -I/tera/tera/debo/Projects/php/php-8.2.13/ext/libxml/
-I/tera/tera/debo/Projects/php/php-8.2.13/include -I/tera/tera/debo/Projects/php/php-8.2.13/main
-I/tera/tera/debo/Projects/php/php-8.2.13 -I/tera/tera/debo/Projects/php/php-8.2.13/ext/date/lib
-I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/include/libpng16
-I/usr/local/include/webp -I/usr/local/include/freetype2 -I/usr/local/include/harfbuzz
-I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include
-I/tera/tera/debo/Projects/php/php-8.2.13/ext/mbstring/libmbfl
-I/tera/tera/debo/Projects/php/php-8.2.13/ext/mbstring/libmbfl/mbfl
-I/tera/tera/debo/Projects/php/php-8.2.13/TSRM -I/tera/tera/debo/Projects/php/php-8.2.13/Zend
-D_GNU_SOURCE -fno-common -Wstrict-prototypes -Wall -Wextra -Wno-strict-aliasing
-Wno-unused-parameter -Wno-sign-compare -g -O2 -fvisibility=hidden -DZEND_SIGNALS
-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /tera/tera/debo/Projects/php/php-8.2.13/ext/libxml/libxml.c
-o ext/libxml/libxml.lo -MMD -MF ext/libxml/libxml.dep -MT ext/libxml/libxml.lo
/tera/tera/debo/Projects/php/php-8.2.13/ext/libxml/libxml.c:929:41: warning: comparison of distinct
pointer types ('xmlStructuredErrorFunc' (aka 'void (*)(void *, const struct _xmlError
*)') and 'void (*)(void *, xmlErrorPtr)' (aka 'void (*)(void *, struct _xmlError
*)')) [-Wcompare-distinct-pointer-types]
929 | if (current_handler && current_handler ==
php_libxml_structured_error_handler) {
| ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tera/tera/debo/Projects/php/php-8.2.13/ext/libxml/libxml.c:947:35: error: incompatible function
pointer types passing 'void (void *, xmlErrorPtr)' (aka 'void (void *, struct
_xmlError *)') to parameter of type 'xmlStructuredErrorFunc' (aka 'void (*)(void
*, const struct _xmlError *)') [-Wincompatible-function-pointer-types]
947 | xmlSetStructuredErrorFunc(NULL, php_libxml_structured_error_handler);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/libxml2/libxml/xmlerror.h:898:29: note: passing argument to parameter
'handler' here
898 | xmlStructuredErrorFunc handler);
| ^
/tera/tera/debo/Projects/php/php-8.2.13/ext/libxml/libxml.c:964:8: warning: assigning to
'xmlErrorPtr' (aka 'struct _xmlError *') from 'const xmlError *' (aka
'const struct _xmlError *') discards qualifiers
[-Wincompatible-pointer-types-discards-qualifiers]
964 | error = xmlGetLastError();
| ^ ~~~~~~~~~~~~~~~~~
2 warnings and 1 error generated.
make: *** [Makefile:736: ext/libxml/libxml.lo] Error 1
```
I also ran into this trying to build PHP 8.1.26.
The compiler toolchain is Clang-17, on macOS.
### PHP Version
PHP 8.2.13
### Operating System
macOS