我已经安装并且它可以正常使用 -enable-zts ( https://github.com/rlerdorf/php7dev ) 构建 php7

现在我需要添加 pthreads 扩展( https://github.com/krakjoe/pthreads ),但会出现一些错误:

In file included from /home/pthreads/php_pthreads.c:47:0:
./src/copy.h:113:8: error: unknown type name ‘zend_live_range’
 static zend_live_range* pthreads_copy_live(zend_live_range *old, int end) {
        ^
./src/copy.h:113:44: error: unknown type name ‘zend_live_range’
 static zend_live_range* pthreads_copy_live(zend_live_range *old, int end) {
                                            ^
In file included from /home/pthreads/php_pthreads.c:47:0:
./src/copy.h: In function ‘pthreads_copy_user_function’:
./src/copy.h:276:14: error: ‘zend_op_array’ has no member named ‘live_range’
  if (op_array->live_range)  op_array->live_range = pthreads_copy_live(op_array->live_range, op_array->last_live_range);
              ^
./src/copy.h:276:37: error: ‘zend_op_array’ has no member named ‘live_range’
  if (op_array->live_range)  op_array->live_range = pthreads_copy_live(op_array->live_range, op_array->last_live_range);
                                     ^
./src/copy.h:276:79: error: ‘zend_op_array’ has no member named ‘live_range’
  if (op_array->live_range)  op_array->live_range = pthreads_copy_live(op_array->live_range, op_array->last_live_range);
                                                                               ^
./src/copy.h:276:101: error: ‘zend_op_array’ has no member named ‘last_live_range’
  if (op_array->live_range)  op_array->live_range = pthreads_copy_live(op_array->live_range, op_array->last_live_range);
                                                                                                     ^
Makefile:196: recipe for target 'php_pthreads.lo' failed

我试图通过 pecl install pthreads 命令和该脚本安装它:
git clone https://github.com/krakjoe/pthreads.git /home/pthreads
cd /home/pthreads
phpize
./configure --with-php-config=/usr/local/php71-zts/bin/php-config
make
make install

还是有错误

最佳答案

该问题似乎已通过存储库中的更新解决。 pecl 提供的软件包似乎仍然损坏,但拉动当前主(在编写 ddb2d43 时)并通过问题中最后一个块中的脚本安装对我有用。
该问题在 PHP 错误跟踪器中也称为 Bug #75490

关于php - 如何用pthreads重新编译PHP7,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/34433519/

10-11 02:54