gpt4 book ai didi

php - 如何使用 pthreads 重新编译 PHP7

转载 作者:可可西里 更新时间:2023-10-31 23:46:28 26 4
gpt4 key购买 nike

我已经安装并正常运行 php7 build with -enable-zts ( https://github.com/rlerdorf/php7dev )

现在我需要添加 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 )并通过问题最后一个 block 中的脚本安装对我有用。该问题也称为 Bug #75490在 PHP bugtracker 中。

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

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com