4

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

Now i need to add 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 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

I'd tried to install it via pecl install pthreads command and via that 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

Still have error

Trevor
  • 1,111
  • 2
  • 18
  • 30
inJakuzi
  • 151
  • 1
  • 12
  • 1
    ```phpize``` and ```php-config``` must be from different installations, I think ... the live range stuff is in 7.1, which appears to be the version of ```php-config```, not sure about ```phpize```, check that ? – Joe Watkins Dec 25 '15 at 13:12
  • 1
    @JoeWatkins make clean solve the problem, thanks. Can you answer to my next [question](http://stackoverflow.com/questions/34857779/why-not-all-threads-are-completed) about pthreads – inJakuzi Jan 18 '16 at 15:06

1 Answers1

0

The issue seems to be fixed by an update in the repository. The package delivered by pecl seems to be still broken but pulling the current master (at time of writing ddb2d43) and installing via the script in the last block in the question worked for me. The issue is also known as Bug #75490 in the PHP bugtracker.

DBX12
  • 2,041
  • 1
  • 15
  • 25