环境及版本:
OS:macOs11.4
php版本:php8.0.14
redis扩展包版本:5.3.5
问题描述:
安装php的redis扩展时,编译过程出现错误:
In file included from /usr/local/Cellar/php@8.0/8.0.14/include/php/Zend/zend.h:357:
/usr/local/Cellar/php@8.0/8.0.14/include/php/Zend/zend_operators.h:541:10: error:
'asm goto' constructs are not supported yet
asm goto(
^
/usr/local/Cellar/php@8.0/8.0.14/include/php/Zend/zend_operators.h:604:10: error:
'asm goto' constructs are not supported yet
asm goto(
^
/usr/local/Cellar/php@8.0/8.0.14/include/php/Zend/zend_operators.h:674:10: error:
'asm goto' constructs are not supported yet
asm goto(
^
/usr/local/Cellar/php@8.0/8.0.14/include/php/Zend/zend_operators.h:784:10: error:
'asm goto' constructs are not supported yet
asm goto(
^
4 errors generated.
make: *** [redis.lo] Error 1
解决方案:
相关链接:https://bugs.php.net/bug.php?id=80607
如上图所示,这个问题和我的基本一致,他的解决方法是把512行的“# define ZEND_USE_ASM_ARITHMETIC “的值从1改为0;
但是我打开文件发现这行定义是在522行,把这行的1改为0,如下图所示:
之后重新make && make install,成功解决问题。
网友评论