编译mysqlnd_qc时出错

时间:2015-02-01 09:26:57

标签: php compilation mysqlnd

我试图编译mysqlnd_qc但失败了。

我正在运行Ubuntu 14.04.1,并已从启动板存储库https://launchpad.net/~ondrej/+archive/ubuntu/php5-5.6安装了PHP 5.6.5。我还安装了libmemcached-dev以启用mysqlnd_qc的memcached功能。

这里是我使用的命令:

phpize
./configure --enable-mysqlnd-qc --enable-mysqlnd-qc-memcache --enable-shared
make

配置但编译失败时没有错误:

/bin/bash /home/frederick/mysqlnd_qc-1.2.0/libtool --mode=compile cc  -I. -I/home/frederick/mysqlnd_qc-1.2.0 -DPHP_ATOM_INC -I/home/frederick/mysqlnd_qc-1.2.0/include -I/home/frederick/mysqlnd_qc-1.2.0/main -I/home/frederick/mysqlnd_qc-1.2.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /home/frederick/mysqlnd_qc-1.2.0/mysqlnd_qc.c -o mysqlnd_qc.lo
libtool: compile:  cc -I. -I/home/frederick/mysqlnd_qc-1.2.0 -DPHP_ATOM_INC -I/home/frederick/mysqlnd_qc-1.2.0/include -I/home/frederick/mysqlnd_qc-1.2.0/main -I/home/frederick/mysqlnd_qc-1.2.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /home/frederick/mysqlnd_qc-1.2.0/mysqlnd_qc.c  -fPIC -DPIC -o .libs/mysqlnd_qc.o
/home/frederick/mysqlnd_qc-1.2.0/mysqlnd_qc.c: In function 'php_mysqlnd_qc_store_result_pub':
/home/frederick/mysqlnd_qc-1.2.0/mysqlnd_qc.c:624:3: error: too few arguments to function 'qc_orig_mysqlnd_conn_methods->store_result'
   result = QC_CALL_ORIGINAL_CONN_DATA_METHOD(store_result)(conn TSRMLS_CC);
   ^
/home/frederick/mysqlnd_qc-1.2.0/mysqlnd_qc.c: In function 'php_mysqlnd_qc_use_result_pub':
/home/frederick/mysqlnd_qc-1.2.0/mysqlnd_qc.c:786:2: error: too few arguments to function 'qc_orig_mysqlnd_conn_methods->use_result'
  ret = QC_CALL_ORIGINAL_CONN_DATA_METHOD(use_result)(conn TSRMLS_CC);
  ^
/home/frederick/mysqlnd_qc-1.2.0/mysqlnd_qc.c: In function 'mysqlnd_qc_register_hooks':
/home/frederick/mysqlnd_qc-1.2.0/mysqlnd_qc.c:882:39: warning: assignment from incompatible pointer type [enabled by default]
  my_mysqlnd_conn_methods.store_result = MYSQLND_METHOD(mysqlnd_qc, store_result);
                                       ^
/home/frederick/mysqlnd_qc-1.2.0/mysqlnd_qc.c:884:37: warning: assignment from incompatible pointer type [enabled by default]
  my_mysqlnd_conn_methods.use_result = MYSQLND_METHOD(mysqlnd_qc, use_result);
                                     ^
make: *** [mysqlnd_qc.lo] Error 1

我试图编译稳定版但也失败了。出了什么问题?请帮助我,谢谢!

1 个答案:

答案 0 :(得分:2)

mysqlnd_qc-1.2.0与PHP 5.6不兼容

您可以在主干上使用最新的源代码。 http://svn.php.net/viewvc/pecl/mysqlnd_qc/trunk/

他们的更改日志。 https://lists.fedoraproject.org/pipermail/scm-commits/Week-of-Mon-20140317/1210988.html