How to recompile PHP7 using pthreads

I have installed and working php7 build correctly with -enable-zts ( https://github.com/rlerdorf/php7dev )

Now I need to add the pthreads extension ( https://github.com/krakjoe/pthreads ), but get some errors:

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 functionpthreads_copy_user_function’:
./src/copy.h:276:14: error: ‘zend_op_arrayhas no member namedlive_rangeif (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

I tried to install it using the command pecl install pthreadsand using the script:

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

There is still an error

+4
source share
1 answer

, , ​​ . , , - , ( ddb2d43) script . # 75490 PHP bugtracker.

0

Source: https://habr.com/ru/post/1621421/


All Articles