【问题标题】:PHP7 couchbase module compilationPHP7 couchbase 模块编译
【发布时间】:2016-02-02 10:59:19
【问题描述】:

我尝试用 PHP7 编译 php-couchbase (https://github.com/couchbase/php-couchbase) 但在 phpize 之后,./configure on make 收到此错误:

In file included from /home/ubuntu/php-couchbase/bucket.c:1:0:
/home/ubuntu/php-couchbase/bucket.c: In function 'zim_Bucket_http_request':
/home/ubuntu/php-couchbase/couchbase.h:44:23: warning: initialization makes pointer from integer without a cast [enabled by default]
 #define PHP_THISOBJ() zend_object_store_get_object(getThis() TSRMLS_CC)
                       ^
/home/ubuntu/php-couchbase/bucket.c:1136:24: note: in expansion of macro 'PHP_THISOBJ'
  bucket_object *data = PHP_THISOBJ();
                        ^
/home/ubuntu/php-couchbase/bucket.c: In function 'zim_Bucket_durability':
/home/ubuntu/php-couchbase/couchbase.h:44:23: warning: initialization makes pointer from integer without a cast [enabled by default]
 #define PHP_THISOBJ() zend_object_store_get_object(getThis() TSRMLS_CC)
                       ^
/home/ubuntu/php-couchbase/bucket.c:1203:24: note: in expansion of macro 'PHP_THISOBJ'
  bucket_object *data = PHP_THISOBJ();
                        ^
/home/ubuntu/php-couchbase/bucket.c: In function 'zim_Bucket_setTranscoder':
/home/ubuntu/php-couchbase/couchbase.h:44:23: warning: initialization makes pointer from integer without a cast [enabled by default]
 #define PHP_THISOBJ() zend_object_store_get_object(getThis() TSRMLS_CC)
                       ^
/home/ubuntu/php-couchbase/bucket.c:1268:24: note: in expansion of macro 'PHP_THISOBJ'
  bucket_object *data = PHP_THISOBJ();
                        ^
/home/ubuntu/php-couchbase/bucket.c:1275:2: warning: passing argument 1 of '_zval_ptr_dtor' from incompatible pointer type [enabled by default]
  zval_ptr_dtor(&data->encoder);
  ^
In file included from /usr/include/php/20151012/Zend/zend.h:39:0,
                 from /usr/include/php/20151012/main/php.h:36,
                 from /home/ubuntu/php-couchbase/couchbase.h:11,
                 from /home/ubuntu/php-couchbase/bucket.c:1:
/usr/include/php/20151012/Zend/zend_variables.h:112:15: note: expected 'struct zval *' but argument is of type 'struct zval **'
 ZEND_API void _zval_ptr_dtor(zval *zval_ptr ZEND_FILE_LINE_DC);
               ^
/home/ubuntu/php-couchbase/bucket.c:1279:2: warning: passing argument 1 of '_zval_ptr_dtor' from incompatible pointer type [enabled by default]
  zval_ptr_dtor(&data->decoder);
  ^
In file included from /usr/include/php/20151012/Zend/zend.h:39:0,
                 from /usr/include/php/20151012/main/php.h:36,
                 from /home/ubuntu/php-couchbase/couchbase.h:11,
                 from /home/ubuntu/php-couchbase/bucket.c:1:
/usr/include/php/20151012/Zend/zend_variables.h:112:15: note: expected 'struct zval *' but argument is of type 'struct zval **'
 ZEND_API void _zval_ptr_dtor(zval *zval_ptr ZEND_FILE_LINE_DC);
               ^
In file included from /home/ubuntu/php-couchbase/bucket.c:1:0:
/home/ubuntu/php-couchbase/bucket.c: In function 'zim_Bucket_setOption':
/home/ubuntu/php-couchbase/couchbase.h:44:23: warning: initialization makes pointer from integer without a cast [enabled by default]
 #define PHP_THISOBJ() zend_object_store_get_object(getThis() TSRMLS_CC)
                       ^
/home/ubuntu/php-couchbase/bucket.c:1288:24: note: in expansion of macro 'PHP_THISOBJ'
  bucket_object *data = PHP_THISOBJ();
                        ^
/home/ubuntu/php-couchbase/bucket.c: In function 'zim_Bucket_getOption':
/home/ubuntu/php-couchbase/couchbase.h:44:23: warning: initialization makes pointer from integer without a cast [enabled by default]
 #define PHP_THISOBJ() zend_object_store_get_object(getThis() TSRMLS_CC)
                       ^
/home/ubuntu/php-couchbase/bucket.c:1304:24: note: in expansion of macro 'PHP_THISOBJ'
  bucket_object *data = PHP_THISOBJ();
                        ^
/home/ubuntu/php-couchbase/bucket.c: In function 'couchbase_init_bucket':
/home/ubuntu/php-couchbase/bucket.c:1345:19: warning: assignment from incompatible pointer type [enabled by default]
  ce.create_object = bucket_create_handler;
                   ^
make: *** [bucket.lo] Error 1

Couchbase 对我们没有帮助,而 PHP7 对性能提升很重要。我们尝试使用 HHVM,但无法编译 couchbase 模块。

谢谢, 雅各布

【问题讨论】:

    标签: php couchbase php-7


    【解决方案1】:

    很遗憾,Couchbase PHP SDK 目前不支持 PHP 7,根据https://issues.couchbase.com/browse/PCBC-360 计划添加对 SDK 的支持,但尚未确定添加此支持的预定发布日期。

    【讨论】:

      【解决方案2】:

      您可以使用 php7 分支 (https://github.com/couchbase/php-couchbase/tree/php7) 编译 php-couchbase。

      【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-09-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-04-23
      • 2020-01-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多