In case anybody else runs into this problem compiling against newer versions of libxml:
php-7.1.33/ext/libxml/libxml.c:1004:49: error: passing argument 2 of ‘xmlSetStructuredErrorFunc’ from incompatible pointer type [-Wincompatible-pointer-types]
1004 | xmlSetStructuredErrorFunc(NULL, php_libxml_structured_error_handler);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| void (*)(void *, xmlError *) {aka void (*)(void *, struct _xmlError *)}
Solved by applying https://github.com/php/php-src/commit/0a39890c967aa57225bb6bdf4821aff7a3a3c082.patch against the source. Had to modify it slightly to apply the 3rd hunk to libxml.c, and remove the patch of php_sdl.c which somehow already had the change.
See also https://github.com/php/php-src/issues/12965 for more info.
Additionally, had to set CFLAGS="-Wno-error=implicit-int -Wno-error=implicit-function-declaration -Wno-error=incompatible-pointer-types"
to work around some other issues (for example with readdir_r) - no idea if it potentially breaks something. It compiled and ran. Had some more errors packaing the pecl and pear modules, skipped those since I didn't need them.
Pinned Comments
el_aur commented on 2022-02-03 18:48 (UTC) (edited on 2022-02-18 10:38 (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 7.1 packages with:el_aur commented on 2022-02-03 18:47 (UTC) (edited on 2022-02-03 18:50 (UTC) by el_aur)
Read Carefully! Breaking changes in compare with native PHP package
Console version
/usr/bin/php71
is installed withphp71-cli
subpackage,php71
doesn't include it anymore!!!PEAR and PECL are available as
php71-pear
andphp71-pecl
subpackagesAll shared modules are respresented as stand-alone subpackages and are not included with
php71
package anymore.No more extensions in php.ini itself!
Separate INI files for each extension are placed in
/etc/php71/conf.d
They are loaded in correct order according to priority