Skip to content
This repository has been archived by the owner on Jan 4, 2018. It is now read-only.

Error compiling with PHP 5.6.3 with thread-safe support enabled #10

Open
flavioheleno opened this issue Dec 18, 2014 · 0 comments · May be fixed by #11
Open

Error compiling with PHP 5.6.3 with thread-safe support enabled #10

flavioheleno opened this issue Dec 18, 2014 · 0 comments · May be fixed by #11

Comments

@flavioheleno
Copy link

I'm compiling PHP 5.6.3 from git with thread-safe support (--enable-maintainer-zts) along with this extension (also from git) and during the process, the compilation returns an error:

/tmp/php-src/ext/gearman/php_gearman.c: In function ‘_php_task_cb_fn’:
/tmp/php-src/ext/gearman/php_gearman.c:2633:3: error: too few arguments to function ‘zend_objects_store_add_ref_by_handle’
   zend_objects_store_add_ref_by_handle(task->value.handle);
   ^
In file included from /tmp/php-src/Zend/zend_globals.h:35:0,
                 from /tmp/php-src/Zend/zend_compile.h:431,
                 from /tmp/php-src/Zend/zend_modules.h:26,
                 from /tmp/php-src/Zend/zend_API.h:26,
                 from /tmp/php-src/main/php.h:39,
                 from /tmp/php-src/ext/gearman/php_gearman.c:16:
/tmp/php-src/Zend/zend_objects_API.h:70:15: note: declared here
 ZEND_API void zend_objects_store_add_ref_by_handle(zend_object_handle handle TSRMLS_DC);
               ^
/tmp/php-src/ext/gearman/php_gearman.c:2670:3: error: too few arguments to function ‘zend_objects_store_del_ref_by_handle’
   zend_objects_store_del_ref_by_handle(task->value.handle);
   ^
In file included from /tmp/php-src/Zend/zend_globals.h:35:0,
                 from /tmp/php-src/Zend/zend_compile.h:431,
                 from /tmp/php-src/Zend/zend_modules.h:26,
                 from /tmp/php-src/Zend/zend_API.h:26,
                 from /tmp/php-src/main/php.h:39,
                 from /tmp/php-src/ext/gearman/php_gearman.c:16:
/tmp/php-src/Zend/zend_objects_API.h:72:32: note: declared here
 static zend_always_inline void zend_objects_store_del_ref_by_handle(zend_object_handle handle TSRMLS_DC) {
                                ^
make: *** [ext/gearman/php_gearman.lo] Error 1

I've fixed this by changing line 2633 from:

zend_objects_store_add_ref_by_handle(task->value.handle);

to:

zend_objects_store_add_ref_by_handle(task->value.handle TSRMLS_CC);

and line 2670 from:

zend_objects_store_del_ref_by_handle(task->value.handle);

to:

zend_objects_store_del_ref_by_handle(task->value.handle TSRMLS_CC);
@flavioheleno flavioheleno linked a pull request Dec 18, 2014 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant