Failed to build php-81

I’m trying to update php81, php81-fpm, php81-gd, php81-mysql, php81-openssl, php81-pdo,
but when compiling I get this error:

In file included from /usr/include/unicode/unistr.h:39,
from /var/tmp/pamac-build-u/php81/src/php-8.1.29/ext/intl/intl_convertcpp.h:22,
from /var/tmp/pamac-build-u/php81/src/php-8.1.29/ext/intl/intl_convertcpp.cpp:17:
/usr/include/unicode/stringpiece.h:133:29: error: ‘enable_if_t’ in namespace ‘std’ does not name a template type
133 | typename = std::enable_if_t<
| ^~~~~~~~~~~
/usr/include/unicode/stringpiece.h:133:24: note: ‘std::enable_if_t’ is only available from C++14 onwards
133 | typename = std::enable_if_t<
| ^~~
/usr/include/unicode/stringpiece.h:133:40: error: expected ‘>’ before ‘<’ token
133 | typename = std::enable_if_t<
| ^
/bin/sh /var/tmp/pamac-build-u/php81/src/build-cli/libtool --silent --preserve-dup-deps --tag CC --mode=compile g++ -Iext/intl/ -I/var/tmp/pamac-build-u/php81/src/php-8.1.29/ext/intl/ -I/var/tmp/pamac-build-u/php81/src/build-cli/include -I/var/tmp/pamac-build-u/php81/src/build-cli/main -I/var/tmp/pamac-build-u/php81/src/php-8.1.29 -I/var/tmp/pamac-build-u/php81/src/build-cli/ext/date/lib -I/var/tmp/pamac-build-u/php81/src/php-8.1.29/ext/date/lib -I/usr/include/libxml2 -I/usr/include/enchant-2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/webp -I/usr/include/imap -I/var/tmp/pamac-build-u/php81/src/php-8.1.29/ext/mbstring/libmbfl -I/var/tmp/pamac-build-u/php81/src/build-cli/ext/mbstring/libmbfl -I/var/tmp/pamac-build-u/php81/src/php-8.1.29/ext/mbstring/libmbfl/mbfl -I/var/tmp/pamac-build-u/php81/src/build-cli/ext/mbstring/libmbfl/mbfl -I/usr/include/pspell -I/usr/include/editline -I/var/tmp/pamac-build-u/php81/src/build-cli/TSRM -I/var/tmp/pamac-build-u/php81/src/build-cli/Zend -I/var/tmp/pamac-build-u/php81/src/php-8.1.29/main -I/var/tmp/pamac-build-u/php81/src/php-8.1.29/Zend -I/var/tmp/pamac-build-u/php81/src/php-8.1.29/TSRM -I/var/tmp/pamac-build-u/php81/src/build-cli/ -DU_USING_ICU_NAMESPACE=1 -I/usr/include/imap -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS -fPIC -Wno-error=incompatible-pointer-types -std=c++17 -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 -DU_HIDE_OBSOLETE_UTF_OLD_H=1 -Wno-write-strings -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++11 -DUNISTR_FROM_CHAR_EXPLICIT=explicit -DUNISTR_FROM_STRING_EXPLICIT=explicit -c /var/tmp/pamac-build-u/php81/src/php-8.1.29/ext/intl/common/common_enum.cpp -o ext/intl/common/common_enum.lo -MMD -MF ext/intl/common/common_enum.dep -MT ext/intl/common/common_enum.lo
make: *** [Makefile:1676: ext/intl/intl_convertcpp.lo] Error 1
make: *** Waiting for unfinished jobs…
In file included from /usr/include/unicode/unistr.h:39,
from /usr/include/unicode/strenum.h:20,
from /var/tmp/pamac-build-u/php81/src/php-8.1.29/ext/intl/common/common_enum.h:21,
from /var/tmp/pamac-build-u/php81/src/php-8.1.29/ext/intl/common/common_enum.cpp:24:
/usr/include/unicode/stringpiece.h:133:29: error: ‘enable_if_t’ in namespace ‘std’ does not name a template type
133 | typename = std::enable_if_t<
| ^~~~~~~~~~~
/usr/include/unicode/stringpiece.h:133:24: note: ‘std::enable_if_t’ is only available from C++14 onwards
133 | typename = std::enable_if_t<
| ^~~
/usr/include/unicode/stringpiece.h:133:40: error: expected ‘>’ before ‘<’ token
133 | typename = std::enable_if_t<
| ^
make: *** [Makefile:1679: ext/intl/common/common_enum.lo] Error 1
==> ERROR: A failure occurred in build().
Aborting…

If I try to update individually, I get the following error:

could not satisfy dependencies:

  • unable to satisfy dependency ‘php81-pdo=8.1.28’ required by php81-mysql
  • unable to satisfy dependency ‘php81-openssl=8.1.28’ required by php81-mysql

these are all AUR packages.
Please ask the maintainer of these packages

You should be able to install PHP and related packages from the official repositories; and have them updated automatically as needed; rather than relying on foreign packages from the AUR; officially unsupported by Manjaro (or Arch).

Here are some related guides that may be useful:

Good luck.

1 Like