在 Mac 上安装 xdebug 失败

时间:2021-06-01 19:58:21

标签: macos xdebug php-7.4

我正在使用 PHP 7.4.19 运行 MacOS Big Sur(11.4 版)。我正在尝试使用自制软件安装 xdebug:

pecl install xdebug

但它失败了:

5 warnings and 4 errors generated.
make: *** [xdebug.lo] Error 1
ERROR: `make' failed

我尝试下载源代码并运行 make 但出现相同的错误:

In file included from /usr/local/Cellar/php@7.4/7.4.19_1/include/php/Zend/zend.h:356:
/usr/local/Cellar/php@7.4/7.4.19_1/include/php/Zend/zend_operators.h:523:10: error: 
      'asm goto' constructs are not supported yet
        __asm__ goto(

我已经谷歌搜索无济于事。有没有其他人遇到过这种情况?

1 个答案:

答案 0 :(得分:1)

这是因为编译器之间不匹配。您没有足够包含有关哪个部分由哪个编译器编译的信息,但是其中一个是由 LLVM 编译的,另一个是由 GCC 编译的。这会导致 mismatch

您需要确保对两者使用相同的编译器。