如何使用pthreads重新编译PHP7

时间:2015-12-23 10:24:41

标签: php pthreads

我已安装并且使用-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

仍有错误

1 个答案:

答案 0 :(得分:0)

该问题似乎可以通过存储库中的更新来解决。 pecl提供的软件包似乎仍然没有被破坏,但拉动当前的大师(在编写ddb2d43时)并通过脚本安装在问题的最后一个块中。 这个问题在PHP bugtracker中也称为Bug #75490