web-dev-qa-db-fra.com

Erreur de compilation d'extension PECL pour PHP 7.4 sur MacOS

J'essaie d'installer Pecl Mongodb et des extensions Memcaches sur le dernier système d'exploitation Mac pour PHP 7.4.

Obtenez les mêmes erreurs:

pecl install memcached
...
creating libtool
appending configuration tag "CXX" to libtool
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /private/tmp/pear/temp/pear-build-timurbYTemI/memcached-3.1.5/libtool --mode=compile cc -I/usr/local/Cellar/php/7.4.11/include/php    -I. -I/private/tmp/pear/temp/memcached -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-timurbYTemI/memcached-3.1.5/include -I/private/tmp/pear/temp/pear-build-timurbYTemI/memcached-3.1.5/main -I/private/tmp/pear/temp/memcached -I/usr/local/Cellar/php/7.4.11/include/php -I/usr/local/Cellar/php/7.4.11/include/php/main -I/usr/local/Cellar/php/7.4.11/include/php/TSRM -I/usr/local/Cellar/php/7.4.11/include/php/Zend -I/usr/local/Cellar/php/7.4.11/include/php/ext -I/usr/local/Cellar/php/7.4.11/include/php/ext/date/lib -I/usr/local/opt/zlib/include -I/usr/local/Cellar/libmemcached/1.0.18_2/include  -I/usr/local/opt/[email protected]/include -DHAVE_CONFIG_H  -g -O2 -I/usr/local/Cellar/php/7.4.11/include/php -I/usr/local/Cellar/php/7.4.11/include/php/main -I/usr/local/Cellar/php/7.4.11/include/php/TSRM -I/usr/local/Cellar/php/7.4.11/include/php/Zend -I/usr/local/Cellar/php/7.4.11/inclu
de/php/ext -I/usr/local/Cellar/php/7.4.11/include/php/ext/date/lib -I/usr/local/opt/zlib/include -I/usr/local/Cellar/libmemcached/1.0.18_2/include   -c /private/tmp/pear/temp/memcached/php_memcached.c -o php_memcached.lo
mkdir .libs
 cc -I/usr/local/Cellar/php/7.4.11/include/php -I. -I/private/tmp/pear/temp/memcached -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-timurbYTemI/memcached-3.1.5/include -I/private/tmp/pear/temp/pear-build-timurbYTemI/memcached-3.1.5/main -I/private/tmp/pear/temp/memcached -I/usr/local/Cellar/php/7.4.11/include/php -I/usr/local/Cellar/php/7.4.11/include/php/main -I/usr/local/Cellar/php/7.4.11/include/php/TSRM -I/usr/local/Cellar/php/7.4.11/include/php/Zend -I/usr/local/Cellar/php/7.4.11/include/php/ext -I/usr/local/Cellar/php/7.4.11/include/php/ext/date/lib -I/usr/local/opt/zlib/include -I/usr/local/Cellar/libmemcached/1.0.18_2/include -I/usr/local/opt/[email protected]/include -DHAVE_CONFIG_H -g -O2 -I/usr/local/Cellar/php/7.4.11/include/php -I/usr/local/Cellar/php/7.4.11/include/php/main -I/usr/local/Cellar/php/7.4.11/include/php/TSRM -I/usr/local/Cellar/php/7.4.11/include/php/Zend -I/usr/local/Cellar/php/7.4.11/include/php/ext -I/usr/local/Cellar/php/7.4.11/include/php/ext/date/lib -I/usr/local/opt/zlib/include
-I/usr/local/Cellar/libmemcached/1.0.18_2/include -c /private/tmp/pear/temp/memcached/php_memcached.c  -fno-common -DPIC -o .libs/php_memcached.o
In file included from /private/tmp/pear/temp/memcached/php_memcached.c:22:
In file included from /private/tmp/pear/temp/memcached/php_memcached.h:20:
In file included from /usr/local/Cellar/php/7.4.11/include/php/main/php.h:33:
In file included from /usr/local/Cellar/php/7.4.11/include/php/Zend/zend.h:356:
/usr/local/Cellar/php/7.4.11/include/php/Zend/zend_operators.h:523:10: error: 'asm goto' constructs are not supported yet
        __asm__ goto(
                ^
/usr/local/Cellar/php/7.4.11/include/php/Zend/zend_operators.h:586:10: error: 'asm goto' constructs are not supported yet
        __asm__ goto(
                ^
/usr/local/Cellar/php/7.4.11/include/php/Zend/zend_operators.h:656:10: error: 'asm goto' constructs are not supported yet
        __asm__ goto(
                ^
/usr/local/Cellar/php/7.4.11/include/php/Zend/zend_operators.h:766:10: error: 'asm goto' constructs are not supported yet
        __asm__ goto(
                ^
/private/tmp/pear/temp/memcached/php_memcached.c:482:6: warning: 'sasl_client_init' is deprecated: first deprecated in macOS 10.11 [-Wdeprecated-declarations]
        if (sasl_client_init(NULL) != SASL_OK) {
            ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sasl/sasl.h:924:17: note: 'sasl_client_init' has been explicitly marked deprecated here
LIBSASL_API int sasl_client_init(const sasl_callback_t *callbacks) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_11,__IPHONE_NA,__IPHONE_NA);
                ^
/private/tmp/pear/temp/memcached/php_memcached.c:4631:3: warning: 'sasl_done' is deprecated: first deprecated in macOS 10.11 [-Wdeprecated-declarations]
                sasl_done();
                ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sasl/sasl.h:727:18: note: 'sasl_done' has been explicitly marked deprecated here
LIBSASL_API void sasl_done(void) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_11,__IPHONE_NA,__IPHONE_NA);
                 ^
2 warnings and 4 errors generated.
make: *** [php_memcached.lo] Error 1
ERROR: `make' failed

Est-ce quelque chose avec la version compilateur (clang !?)? Cela fonctionne bien avec PHP 7.2. Mais pour PHP 7.3 et 7.4. La même erreur arrive.

5
Stark

Vous pouvez essayer d'installer l'outil de ligne de commande pour Xcode 12, ici .

0
HoQuocThinh