Search code examples
phpcompilationmysqlnd

Error compiling mysqlnd_qc


I was trying to compile the mysqlnd_qc but failed.

I'm running Ubuntu 14.04.1 and have installed PHP 5.6.5 from the launchpad repository https://launchpad.net/~ondrej/+archive/ubuntu/php5-5.6 . I have also installed libmemcached-dev in order to enable the memcached feature of mysqlnd_qc.

Here're the commands I used:

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

Nothing wrong when configuring but failed to compile:

/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

I tried to compile the stable version but also failed. What's going wrong? Please help me, thanks!


Solution

  • The mysqlnd_qc-1.2.0 doesn't compatible with the PHP 5.6

    You can use the latest source code on the trunk. http://svn.php.net/viewvc/pecl/mysqlnd_qc/trunk/

    Their change logs. https://lists.fedoraproject.org/pipermail/scm-commits/Week-of-Mon-20140317/1210988.html