Skip to content
This repository has been archived by the owner on Dec 16, 2019. It is now read-only.

PHP 7.1 support #646

Closed
flavioheleno opened this issue Dec 14, 2016 · 14 comments
Closed

PHP 7.1 support #646

flavioheleno opened this issue Dec 14, 2016 · 14 comments

Comments

@flavioheleno
Copy link

Environment

  • PHP: PHP 7.1.0 (cli) (built: Dec 13 2016 23:33:53) ( ZTS )
    Copyright (c) 1997-2016 The PHP Group
    Zend Engine v3.1.0-dev, Copyright (c) 1998-2016 Zend Technologies
  • pthreads: 3.1.6
  • OS: Ubuntu Xenial 16.04

Summary

I'm trying to compile PHP 7.1-zts with PThreads support.

Reproducing Code

pecl install pthreads

Expected Output

Successful compilation

Actual Output

/bin/bash /tmp/pear/temp/pear-build-defaultuserKawT7f/pthreads-3.1.6/libtool --mode=compile cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/tmp/pear/temp/pthreads -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-defaultuserKawT7f/pthreads-3.1.6/include -I/tmp/pear/temp/pear-build-defaultuserKawT7f/pthreads-3.1.6/main -I/tmp/pear/temp/pthreads -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/tmp/pear/temp/pear-build-defaultuserKawT7f/pthreads-3.1.6/.  -fstack-protector-strong -fpic -fpie -O2 -DHAVE_CONFIG_H  -fstack-protector-strong -fpic -fpie -O2   -c /tmp/pear/temp/pthreads/php_pthreads.c -o php_pthreads.lo
mkdir .libs
 cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/tmp/pear/temp/pthreads -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-defaultuserKawT7f/pthreads-3.1.6/include -I/tmp/pear/temp/pear-build-defaultuserKawT7f/pthreads-3.1.6/main -I/tmp/pear/temp/pthreads -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/tmp/pear/temp/pear-build-defaultuserKawT7f/pthreads-3.1.6/. -fstack-protector-strong -fpic -fpie -O2 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -c /tmp/pear/temp/pthreads/php_pthreads.c  -fPIC -DPIC -o .libs/php_pthreads.o
/tmp/pear/temp/pthreads/php_pthreads.c: In function ‘php_pthreads_recv’:
/tmp/pear/temp/pthreads/php_pthreads.c:192:19: warning: type of ‘ZEND_OPCODE_HANDLER_ARGS’ defaults to ‘int’ [-Wimplicit-int]
 static inline int php_pthreads_recv(ZEND_OPCODE_HANDLER_ARGS) {
                   ^
/tmp/pear/temp/pthreads/php_pthreads.c: In function ‘php_pthreads_verify_return_type’:
/tmp/pear/temp/pthreads/php_pthreads.c:223:19: warning: type of ‘ZEND_OPCODE_HANDLER_ARGS’ defaults to ‘int’ [-Wimplicit-int]
 static inline int php_pthreads_verify_return_type(ZEND_OPCODE_HANDLER_ARGS) {
                   ^
In file included from /usr/local/include/php/Zend/zend_modules.h:26:0,
                 from /usr/local/include/php/Zend/zend_API.h:27,
                 from /usr/local/include/php/main/php.h:39,
                 from /tmp/pear/temp/pthreads/src/pthreads.h:37,
                 from /tmp/pear/temp/pthreads/php_pthreads.c:22:
/tmp/pear/temp/pthreads/classes/threaded.h: In function ‘zim_Threaded_extend’:
/usr/local/include/php/Zend/zend_compile.h:516:39: error: ‘zend_execute_data {aka struct _zend_execute_data}’ has no member named ‘called_scope’
 #define EX(element)    ((execute_data)->element)
                                       ^
/tmp/pear/temp/pthreads/classes/threaded.h:322:29: note: in expansion of macro ‘EX’
     zend_do_inheritance(ce, EX(called_scope));
                             ^
In file included from /usr/local/include/php/Zend/zend.h:31:0,
                 from /usr/local/include/php/main/php.h:35,
                 from /tmp/pear/temp/pthreads/src/pthreads.h:37,
                 from /tmp/pear/temp/pthreads/php_pthreads.c:22:
/usr/local/include/php/Zend/zend_compile.h:516:39: error: ‘zend_execute_data {aka struct _zend_execute_data}’ has no member named ‘called_scope’
 #define EX(element)    ((execute_data)->element)
                                       ^
/usr/local/include/php/Zend/zend_types.h:608:5: note: in definition of macro ‘ZVAL_BOOL’
    (b) ? IS_TRUE : IS_FALSE; \
     ^
/usr/local/include/php/Zend/zend_API.h:640:31: note: in expansion of macro ‘RETVAL_BOOL’
 #define RETURN_BOOL(b)      { RETVAL_BOOL(b); return; }
                               ^
/tmp/pear/temp/pthreads/classes/threaded.h:327:5: note: in expansion of macro ‘RETURN_BOOL’
     RETURN_BOOL(instanceof_function(ce, EX(called_scope)));
     ^
/tmp/pear/temp/pthreads/classes/threaded.h:327:41: note: in expansion of macro ‘EX’
     RETURN_BOOL(instanceof_function(ce, EX(called_scope)));
                                         ^
In file included from /tmp/pear/temp/pthreads/php_pthreads.h:43:0,
                 from /tmp/pear/temp/pthreads/php_pthreads.c:26:
/tmp/pear/temp/pthreads/classes/worker.h: In function ‘zim_Worker_collect’:
/tmp/pear/temp/pthreads/classes/worker.h:53:10: error: ‘zend_fcall_info {aka struct _zend_fcall_info}’ has no member named ‘function_table’
  call.fci.function_table = &(w)->ce->function_table; \
          ^
/tmp/pear/temp/pthreads/classes/worker.h:227:3: note: in expansion of macro ‘PTHREADS_WORKER_COLLECTOR_INIT’
   PTHREADS_WORKER_COLLECTOR_INIT(call, Z_OBJ_P(getThis()));
   ^
/tmp/pear/temp/pthreads/classes/worker.h:55:57: error: ‘zend_fcall_info {aka struct _zend_fcall_info}’ has no member named ‘function_table’
  call.fcc.function_handler = zend_hash_find_ptr(call.fci.function_table, Z_STR(call.fci.function_name)); \
                                                         ^
/tmp/pear/temp/pthreads/classes/worker.h:227:3: note: in expansion of macro ‘PTHREADS_WORKER_COLLECTOR_INIT’
   PTHREADS_WORKER_COLLECTOR_INIT(call, Z_OBJ_P(getThis()));
   ^
In file included from /usr/local/include/php/Zend/zend_portability.h:52:0,
                 from /usr/local/include/php/Zend/zend_types.h:27,
                 from /usr/local/include/php/Zend/zend.h:31,
                 from /usr/local/include/php/main/php.h:35,
                 from /tmp/pear/temp/pthreads/src/pthreads.h:37,
                 from /tmp/pear/temp/pthreads/php_pthreads.c:22:
/tmp/pear/temp/pthreads/classes/pool.h: In function ‘zim_Pool_submit’:
/usr/local/include/php/Zend/../TSRM/TSRM.h:171:69: error: ‘zend_executor_globals {aka struct _zend_executor_globals}’ has no member named ‘scope’
 #define TSRMG_STATIC(id, type, element) (TSRMG_BULK_STATIC(id, type)->element)
                                                                     ^
/usr/local/include/php/Zend/zend.h:57:20: note: in expansion of macro ‘TSRMG_STATIC’
 #define ZEND_TSRMG TSRMG_STATIC
                    ^
/usr/local/include/php/Zend/zend_globals_macros.h:44:16: note: in expansion of macro ‘ZEND_TSRMG’
 # define EG(v) ZEND_TSRMG(executor_globals_id, zend_executor_globals *, v)
                ^
/tmp/pear/temp/pthreads/classes/pool.h:189:30: note: in expansion of macro ‘EG’
    zend_class_entry *scope = EG(scope);
                              ^
/usr/local/include/php/Zend/../TSRM/TSRM.h:171:69: error: ‘zend_executor_globals {aka struct _zend_executor_globals}’ has no member named ‘scope’
 #define TSRMG_STATIC(id, type, element) (TSRMG_BULK_STATIC(id, type)->element)
                                                                     ^
/usr/local/include/php/Zend/zend.h:57:20: note: in expansion of macro ‘TSRMG_STATIC’
 #define ZEND_TSRMG TSRMG_STATIC
                    ^
/usr/local/include/php/Zend/zend_globals_macros.h:44:16: note: in expansion of macro ‘ZEND_TSRMG’
 # define EG(v) ZEND_TSRMG(executor_globals_id, zend_executor_globals *, v)
                ^
/tmp/pear/temp/pthreads/classes/pool.h:195:4: note: in expansion of macro ‘EG’
    EG(scope) = ce;
    ^
/usr/local/include/php/Zend/../TSRM/TSRM.h:171:69: error: ‘zend_executor_globals {aka struct _zend_executor_globals}’ has no member named ‘scope’
 #define TSRMG_STATIC(id, type, element) (TSRMG_BULK_STATIC(id, type)->element)
                                                                     ^
/usr/local/include/php/Zend/zend.h:57:20: note: in expansion of macro ‘TSRMG_STATIC’
 #define ZEND_TSRMG TSRMG_STATIC
                    ^
/usr/local/include/php/Zend/zend_globals_macros.h:44:16: note: in expansion of macro ‘ZEND_TSRMG’
 # define EG(v) ZEND_TSRMG(executor_globals_id, zend_executor_globals *, v)
                ^
/tmp/pear/temp/pthreads/classes/pool.h:197:4: note: in expansion of macro ‘EG’
    EG(scope) = scope;
    ^
In file included from /tmp/pear/temp/pthreads/php_pthreads.c:442:0:
/tmp/pear/temp/pthreads/classes/pool.h:204:8: error: ‘zend_fcall_info {aka struct _zend_fcall_info}’ has no member named ‘function_table’
     fci.function_table = EG(function_table);
        ^
In file included from /usr/local/include/php/Zend/zend_portability.h:52:0,
                 from /usr/local/include/php/Zend/zend_types.h:27,
                 from /usr/local/include/php/Zend/zend.h:31,
                 from /usr/local/include/php/main/php.h:35,
                 from /tmp/pear/temp/pthreads/src/pthreads.h:37,
                 from /tmp/pear/temp/pthreads/php_pthreads.c:22:
/usr/local/include/php/Zend/../TSRM/TSRM.h:171:69: error: ‘zend_executor_globals {aka struct _zend_executor_globals}’ has no member named ‘scope’
 #define TSRMG_STATIC(id, type, element) (TSRMG_BULK_STATIC(id, type)->element)
                                                                     ^
/usr/local/include/php/Zend/zend.h:57:20: note: in expansion of macro ‘TSRMG_STATIC’
 #define ZEND_TSRMG TSRMG_STATIC
                    ^
/usr/local/include/php/Zend/zend_globals_macros.h:44:16: note: in expansion of macro ‘ZEND_TSRMG’
 # define EG(v) ZEND_TSRMG(executor_globals_id, zend_executor_globals *, v)
                ^
/tmp/pear/temp/pthreads/classes/pool.h:211:25: note: in expansion of macro ‘EG’
     fcc.calling_scope = EG(scope);
                         ^
In file included from /tmp/pear/temp/pthreads/php_pthreads.h:43:0,
                 from /tmp/pear/temp/pthreads/php_pthreads.c:26:
/tmp/pear/temp/pthreads/classes/pool.h: In function ‘zim_Pool_collect’:
/tmp/pear/temp/pthreads/classes/worker.h:53:10: error: ‘zend_fcall_info {aka struct _zend_fcall_info}’ has no member named ‘function_table’
  call.fci.function_table = &(w)->ce->function_table; \
          ^
/tmp/pear/temp/pthreads/classes/pool.h:293:4: note: in expansion of macro ‘PTHREADS_WORKER_COLLECTOR_INIT’
    PTHREADS_WORKER_COLLECTOR_INIT(call, Z_OBJ_P(worker));
    ^
/tmp/pear/temp/pthreads/classes/worker.h:55:57: error: ‘zend_fcall_info {aka struct _zend_fcall_info}’ has no member named ‘function_table’
  call.fcc.function_handler = zend_hash_find_ptr(call.fci.function_table, Z_STR(call.fci.function_name)); \
                                                         ^
/tmp/pear/temp/pthreads/classes/pool.h:293:4: note: in expansion of macro ‘PTHREADS_WORKER_COLLECTOR_INIT’
    PTHREADS_WORKER_COLLECTOR_INIT(call, Z_OBJ_P(worker));
    ^
Makefile:196: recipe for target 'php_pthreads.lo' failed
make: *** [php_pthreads.lo] Error 1
ERROR: `make' failed
@bwoebi
Copy link
Collaborator

bwoebi commented Dec 18, 2016

You … uh … you could use the current master of this git repository though.

It's perhaps not completely bug free yet, but it should work at large.

@sirsnyder
Copy link
Collaborator

I would like to use 7.1, but the changed closure scope #605 is a backward incompatibility and a show-stopper for existing projects.

@alcaeus
Copy link

alcaeus commented Dec 21, 2016

I've tried to add the extension to homebrew (see https://github.com/Homebrew/homebrew-php/pull/3863), but the build failed with the following errors:

In file included from /private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6/php_pthreads.c:426:
./classes/threaded.h:322:32: error: no member named 'called_scope' in 'struct _zend_execute_data'
    zend_do_inheritance(ce, EX(called_scope));
                            ~~~^~~~~~~~~~~~~
/usr/local/Cellar/php71/7.1.0_11/include/php/Zend/zend_compile.h:516:41: note: expanded from macro 'EX'
#define EX(element)                     ((execute_data)->element)
                                         ~~~~~~~~~~~~~~  ^
In file included from /private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6/php_pthreads.c:426:
./classes/threaded.h:327:44: error: no member named 'called_scope' in 'struct _zend_execute_data'
    RETURN_BOOL(instanceof_function(ce, EX(called_scope)));
                                        ~~~^~~~~~~~~~~~~
/usr/local/Cellar/php71/7.1.0_11/include/php/Zend/zend_compile.h:516:41: note: expanded from macro 'EX'
#define EX(element)                     ((execute_data)->element)
                                         ~~~~~~~~~~~~~~  ^
/usr/local/Cellar/php71/7.1.0_11/include/php/Zend/zend_API.h:640:43: note: expanded from macro 'RETURN_BOOL'
#define RETURN_BOOL(b)                                  { RETVAL_BOOL(b); return; }
                                                                      ^
/usr/local/Cellar/php71/7.1.0_11/include/php/Zend/zend_API.h:622:52: note: expanded from macro 'RETVAL_BOOL'
#define RETVAL_BOOL(b)                                  ZVAL_BOOL(return_value, b)
                                                                                ^
/usr/local/Cellar/php71/7.1.0_11/include/php/Zend/zend_types.h:608:5: note: expanded from macro 'ZVAL_BOOL'
                        (b) ? IS_TRUE : IS_FALSE;       \
                         ^
/bin/sh /private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6/libtool --mode=compile clang -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6 -DPHP_ATOM_INC -I/private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6/include -I/private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6/main -I/private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6 -I/usr/local/Cellar/php71/7.1.0_11/include/php -I/usr/local/Cellar/php71/7.1.0_11/include/php/main -I/usr/local/Cellar/php71/7.1.0_11/include/php/TSRM -I/usr/local/Cellar/php71/7.1.0_11/include/php/Zend -I/usr/local/Cellar/php71/7.1.0_11/include/php/ext -I/usr/local/Cellar/php71/7.1.0_11/include/php/ext/date/lib -I/private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6/.  -DHAVE_CONFIG_H  -g -O2   -c /private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6/src/prepare.c -o src/prepare.lo 
In file included from /private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6/php_pthreads.c:438:
./classes/worker.h:227:3: error: no member named 'function_table' in 'struct _zend_fcall_info'; did you mean 'function_name'?
                PTHREADS_WORKER_COLLECTOR_INIT(call, Z_OBJ_P(getThis()));
                ^
./classes/worker.h:53:11: note: expanded from macro 'PTHREADS_WORKER_COLLECTOR_INIT'
        call.fci.function_table = &(w)->ce->function_table; \
                 ^
/usr/local/Cellar/php71/7.1.0_11/include/php/Zend/zend_API.h:46:7: note: 'function_name' declared here
        zval function_name;
             ^
In file included from /private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6/php_pthreads.c:438:
./classes/worker.h:227:3: error: assigning to 'zval' (aka 'struct _zval_struct') from incompatible type 'HashTable *' (aka 'struct _zend_array *')
                PTHREADS_WORKER_COLLECTOR_INIT(call, Z_OBJ_P(getThis()));
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./classes/worker.h:53:26: note: expanded from macro 'PTHREADS_WORKER_COLLECTOR_INIT'
        call.fci.function_table = &(w)->ce->function_table; \
                                ^ ~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6/php_pthreads.c:438:
./classes/worker.h:227:3: error: no member named 'function_table' in 'struct _zend_fcall_info'
                PTHREADS_WORKER_COLLECTOR_INIT(call, Z_OBJ_P(getThis()));
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/bin/sh /private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6/libtool --mode=compile clang -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6 -DPHP_ATOM_INC -I/private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6/include -I/private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6/main -I/private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6 -I/usr/local/Cellar/php71/7.1.0_11/include/php -I/usr/local/Cellar/php71/7.1.0_11/include/php/main -I/usr/local/Cellar/php71/7.1.0_11/include/php/TSRM -I/usr/local/Cellar/php71/7.1.0_11/include/php/Zend -I/usr/local/Cellar/php71/7.1.0_11/include/php/ext -I/usr/local/Cellar/php71/7.1.0_11/include/php/ext/date/lib -I/private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6/.  -DHAVE_CONFIG_H  -g -O2   -c /private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6/src/store.c -o src/store.lo 

./classes/worker.h:55:58: note: expanded from macro 'PTHREADS_WORKER_COLLECTOR_INIT'
        call.fcc.function_handler = zend_hash_find_ptr(call.fci.function_table, Z_STR(call.fci.function_name)); \
                                                       ~~~~~~~~ ^
In file included from /private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6/php_pthreads.c:442:
./classes/pool.h:189:33: error: no member named 'scope' in 'struct _zend_executor_globals'
                        zend_class_entry *scope = EG(scope);
                                                  ~~~^~~~~~
/usr/local/Cellar/php71/7.1.0_11/include/php/Zend/zend_globals_macros.h:44:73: note: expanded from macro 'EG'
# define EG(v) ZEND_TSRMG(executor_globals_id, zend_executor_globals *, v)
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/usr/local/Cellar/php71/7.1.0_11/include/php/TSRM/TSRM.h:171:71: note: expanded from macro 'TSRMG_STATIC'
#define TSRMG_STATIC(id, type, element) (TSRMG_BULK_STATIC(id, type)->element)
                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
In file included from /private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6/php_pthreads.c:442:
./classes/pool.h:195:7: error: no member named 'scope' in 'struct _zend_executor_globals'
                        EG(scope) = ce;
                        ~~~^~~~~~
/usr/local/Cellar/php71/7.1.0_11/include/php/Zend/zend_globals_macros.h:44:73: note: expanded from macro 'EG'
# define EG(v) ZEND_TSRMG(executor_globals_id, zend_executor_globals *, v)
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/usr/local/Cellar/php71/7.1.0_11/include/php/TSRM/TSRM.h:171:71: note: expanded from macro 'TSRMG_STATIC'
#define TSRMG_STATIC(id, type, element) (TSRMG_BULK_STATIC(id, type)->element)
                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
In file included from /private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6/php_pthreads.c:442:
./classes/pool.h:197:7: error: no member named 'scope' in 'struct _zend_executor_globals'
                        EG(scope) = scope;
                        ~~~^~~~~~
/usr/local/Cellar/php71/7.1.0_11/include/php/Zend/zend_globals_macros.h:44:73: note: expanded from macro 'EG'
# define EG(v) ZEND_TSRMG(executor_globals_id, zend_executor_globals *, v)
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/usr/local/Cellar/php71/7.1.0_11/include/php/TSRM/TSRM.h:171:71: note: expanded from macro 'TSRMG_STATIC'
#define TSRMG_STATIC(id, type, element) (TSRMG_BULK_STATIC(id, type)->element)
                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
In file included from /private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6/php_pthreads.c:442:
./classes/pool.h:204:9: error: no member named 'function_table' in 'struct _zend_fcall_info'; did you mean 'function_name'?
                                fci.function_table = EG(function_table);
                                    ^~~~~~~~~~~~~~
                                    function_name
/usr/local/Cellar/php71/7.1.0_11/include/php/Zend/zend_API.h:46:7: note: 'function_name' declared here
        zval function_name;
             ^
In file included from /private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6/php_pthreads.c:442:
./classes/pool.h:204:24: error: assigning to 'zval' (aka 'struct _zval_struct') from incompatible type 'HashTable *' (aka 'struct _zend_array *')
                                fci.function_table = EG(function_table);
                                                   ^ ~~~~~~~~~~~~~~~~~~
./classes/pool.h:211:28: error: no member named 'scope' in 'struct _zend_executor_globals'
                                fcc.calling_scope = EG(scope);
                                                    ~~~^~~~~~
/usr/local/Cellar/php71/7.1.0_11/include/php/Zend/zend_globals_macros.h:44:73: note: expanded from macro 'EG'
# define EG(v) ZEND_TSRMG(executor_globals_id, zend_executor_globals *, v)
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/usr/local/Cellar/php71/7.1.0_11/include/php/TSRM/TSRM.h:171:71: note: expanded from macro 'TSRMG_STATIC'
#define TSRMG_STATIC(id, type, element) (TSRMG_BULK_STATIC(id, type)->element)
                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
In file included from /private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6/php_pthreads.c:442:
./classes/pool.h:293:4: error: no member named 'function_table' in 'struct _zend_fcall_info'; did you mean 'function_name'?
                        PTHREADS_WORKER_COLLECTOR_INIT(call, Z_OBJ_P(worker));
                        ^
./classes/worker.h:53:11: note: expanded from macro 'PTHREADS_WORKER_COLLECTOR_INIT'
        call.fci.function_table = &(w)->ce->function_table; \
                 ^
/usr/local/Cellar/php71/7.1.0_11/include/php/Zend/zend_API.h:46:7: note: 'function_name' declared here
        zval function_name;
             ^
In file included from /private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6/php_pthreads.c:442:
./classes/pool.h:293:4: error: assigning to 'zval' (aka 'struct _zval_struct') from incompatible type 'HashTable *' (aka 'struct _zend_array *')
                        PTHREADS_WORKER_COLLECTOR_INIT(call, Z_OBJ_P(worker));
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./classes/worker.h:53:26: note: expanded from macro 'PTHREADS_WORKER_COLLECTOR_INIT'
        call.fci.function_table = &(w)->ce->function_table; \
                                ^ ~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6/php_pthreads.c:442:
./classes/pool.h:293:4: error: no member named 'function_table' in 'struct _zend_fcall_info'
                        PTHREADS_WORKER_COLLECTOR_INIT(call, Z_OBJ_P(worker));
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./classes/worker.h:55:58: note: expanded from macro 'PTHREADS_WORKER_COLLECTOR_INIT'
        call.fcc.function_handler = zend_hash_find_ptr(call.fci.function_table, Z_STR(call.fci.function_name)); \
                                                       ~~~~~~~~ ^
14 errors generated.
make: *** [php_pthreads.lo] Error 1
make: *** Waiting for unfinished jobs....
 clang -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6 -DPHP_ATOM_INC -I/private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6/include -I/private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6/main -I/private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6 -I/usr/local/Cellar/php71/7.1.0_11/include/php -I/usr/local/Cellar/php71/7.1.0_11/include/php/main -I/usr/local/Cellar/php71/7.1.0_11/include/php/TSRM -I/usr/local/Cellar/php71/7.1.0_11/include/php/Zend -I/usr/local/Cellar/php71/7.1.0_11/include/php/ext -I/usr/local/Cellar/php71/7.1.0_11/include/php/ext/date/lib -I/private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6/. -DHAVE_CONFIG_H -g -O2 -c /private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6/src/prepare.c  -fno-common -DPIC -o src/.libs/prepare.o
 clang -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6 -DPHP_ATOM_INC -I/private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6/include -I/private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6/main -I/private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6 -I/usr/local/Cellar/php71/7.1.0_11/include/php -I/usr/local/Cellar/php71/7.1.0_11/include/php/main -I/usr/local/Cellar/php71/7.1.0_11/include/php/TSRM -I/usr/local/Cellar/php71/7.1.0_11/include/php/Zend -I/usr/local/Cellar/php71/7.1.0_11/include/php/ext -I/usr/local/Cellar/php71/7.1.0_11/include/php/ext/date/lib -I/private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6/. -DHAVE_CONFIG_H -g -O2 -c /private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6/src/store.c  -fno-common -DPIC -o src/.libs/store.o
/private/tmp/php71-pthreads-20161220-18357-1ee04sh/pthreads-3.1.6/src/store.c:680:43: error: no member named 'scope' in 'struct _zend_executor_globals'
                        zend_create_closure(pzval, closure, EG(scope), closure->common.scope, NULL);
                                                            ~~~^~~~~~
/usr/local/Cellar/php71/7.1.0_11/include/php/Zend/zend_globals_macros.h:44:73: note: expanded from macro 'EG'
# define EG(v) ZEND_TSRMG(executor_globals_id, zend_executor_globals *, v)
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/usr/local/Cellar/php71/7.1.0_11/include/php/TSRM/TSRM.h:171:71: note: expanded from macro 'TSRMG_STATIC'
#define TSRMG_STATIC(id, type, element) (TSRMG_BULK_STATIC(id, type)->element)
                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
1 error generated.
make: *** [src/store.lo] Error 1

Am I correct to assume that there is no release compatible with 7.1? If so, what's the expected timeline on a release?

@krakjoe
Copy link
Owner

krakjoe commented Dec 22, 2016

Support has just not been released yet, there is ongoing work in master (Socket) ...

Use master for now, there will be a release soon ... may have to move socket to a development branch, or I might get time to finish it, not sure.

@flavioheleno
Copy link
Author

Thank you for your time & reply @krakjoe. I'm looking forward to the next release.

@j0hannes
Copy link

I tried to compile PHP 7.1.1 with pthreads 3.1.6.

It seems that I caught the same error here:

... error: ‘zend_execute_data’ has no member named ‘called_scope’
#define EX(element)    ((execute_data)->element)

@krakjoe
Copy link
Owner

krakjoe commented Jan 22, 2017

Please use source from github, as mentioned above.

@dmytro-y-dev
Copy link

How to compile pthreads from master branch? I found no instruction for 3.x version.

@sirsnyder
Copy link
Collaborator

unix:

cd pthreads
phpize
./configure
make
sudo make install

@dmytro-y-dev
Copy link

Ok, looks pretty straightforward. Thanks @sirsnyder.

@nikoskip
Copy link

Still does not compatible with 7.1?

@krakjoe
Copy link
Owner

krakjoe commented Jul 24, 2017

The next release of pthreads will not compile with 7.0 or 7.1.

There are flaws in ZTS that were fixed in 7.2, so that is our requirement from here ...

@krakjoe krakjoe closed this as completed Jul 24, 2017
@tiuman
Copy link

tiuman commented Aug 12, 2017

i download from
git clone https://github.com/krakjoe/pthreads -b master pthreads
and give same error.
php 7.1.8
ubuntu 14.04

where this master location?

@ClosetGeek-Git
Copy link

what exactly is the cause of this error?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants