Error compiling mysqlnd_qc - php

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!

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

Related

php amqp error while running make

I'm trying to install php amqp according to this answer https://stackoverflow.com/a/9997263/2271028
but at the make command i see following:
/bin/bash /var/www/rabbitmq-c/amqp-1.4.0/libtool --mode=compile cc -I. -I/var/www/rabbitmq-c/amqp-1.4.0 -DPHP_ATOM_INC -I/var/www/rabbitmq-c/amqp-1.4.0/include -I/var/www/rabbitmq-c/amqp-1.4.0/main -I/var/www/rabbitmq-c/amqp-1.4.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 /var/www/rabbitmq-c/amqp-1.4.0/amqp.c -o amqp.lo
libtool: compile: cc -I. -I/var/www/rabbitmq-c/amqp-1.4.0 -DPHP_ATOM_INC -I/var/www/rabbitmq-c/amqp-1.4.0/include -I/var/www/rabbitmq-c/amqp-1.4.0/main -I/var/www/rabbitmq-c/amqp-1.4.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 /var/www/rabbitmq-c/amqp-1.4.0/amqp.c -fPIC -DPIC -o .libs/amqp.o
In file included from /var/www/rabbitmq-c/amqp-1.4.0/amqp.c:46:0:
/var/www/rabbitmq-c/amqp-1.4.0/php_amqp.h:303:2: error: unknown type name 'amqp_socket_t'
/var/www/rabbitmq-c/amqp-1.4.0/amqp.c: In function 'amqp_error':
/var/www/rabbitmq-c/amqp-1.4.0/amqp.c:616:4: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'int' [-Wformat]
make: *** [amqp.lo] Error 1
I see that there is some trouble with make, but can not resolve this problem.
Any ideas?
Thanks.
After some magic tryies i decided to install rabbitmq1 instead of rabbitmq0 that i can see in
aptitude search rabbitmq
command on my ubuntu 12.04 server.
i've manually installed
http://security.ubuntu.com/ubuntu/pool/main/libr/librabbitmq/librabbitmq-dev_0.4.1-1_amd64.deb
and
http://security.ubuntu.com/ubuntu/pool/main/libr/librabbitmq/librabbitmq1_0.4.1-1_amd64.deb
and after that again repeated actions from https://stackoverflow.com/a/9997263/2271028
It helps!

Attempting to install OAuth on Ubuntu but getting errors

I am attempting to install OAuth on Ubuntu Server 12.04 but getting errors. I am following this tutorial but something isn't lining up:
http://sergiopvilar.wordpress.com/2013/05/18/how-to-install-php-oauth-extension/
Command I am running in terminal:
sudo pecl install oauth
Last portion of error I am getting response (because it returns several pages of response):
running: make
/bin/bash /tmp/pear/temp/pear-build-rootFgGDRe/oauth-1.2.3/libtool --mode=compile cc -I. -I/tmp/pear/temp/oauth -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootFgGDRe/oauth-1.2.3/include -I/tmp/pear/temp/pear-build-rootFgGDRe/oauth-1.2.3/main -I/tmp/pear/temp/oauth -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 -Wall -g -c /tmp/pear/temp/oauth/oauth.c -o oauth.lo
libtool: compile: cc -I. -I/tmp/pear/temp/oauth -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootFgGDRe/oauth-1.2.3/include -I/tmp/pear/temp/pear-build-rootFgGDRe/oauth-1.2.3/main -I/tmp/pear/temp/oauth -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 -Wall -g -c /tmp/pear/temp/oauth/oauth.c -fPIC -DPIC -o .libs/oauth.o
In file included from /tmp/pear/temp/oauth/php_oauth.h:47:0,
from /tmp/pear/temp/oauth/oauth.c:14:
/usr/include/php5/ext/pcre/php_pcre.h:29:18: fatal error: pcre.h: No such file or directory
compilation terminated.
make: *** [oauth.lo] Error 1
ERROR: `make' failed
Make is installed and working. Any advice?
Found it, I needed to install PCRE Library ( Perl 5 Compatible Regular Expression Library ).
# apt-get update
# apt-get install libpcre3 libpcre3-dev
This worked for me.
Try This
apt-get update
apt-get install libpcre3 libpcre3-dev
sudo pecl install mongodb

pecl install tcpwrap error on make (centos 6.4)

Im having hard time install tcpwrap using pecl install and also tried manual install its giving me the following error on make. I appreciate any help on how to install tcpwrap properly.
running: make
/bin/sh /root/tmp/pear/pear-build-rootNwW6Vg/tcpwrap-1.1.3/libtool --mode=compile cc -I. -I/root/tmp/pear/tcpwrap -DPHP_ATOM_INC -I/root/tmp/pear/pear-build-rootNwW6Vg/tcpwrap-1.1.3/include -I/root/tmp/pear/pear-build-rootNwW6Vg/tcpwrap-1.1.3/main -I/root/tmp/pear/tcpwrap -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 -DHAVE_CONFIG_H -g -O2 -c /root/tmp/pear/tcpwrap/tcpwrap.c -o tcpwrap.lo
mkdir .libs
cc -I. -I/root/tmp/pear/tcpwrap -DPHP_ATOM_INC -I/root/tmp/pear/pear-build-rootNwW6Vg/tcpwrap-1.1.3/include -I/root/tmp/pear/pear-build-rootNwW6Vg/tcpwrap-1.1.3/main -I/root/tmp/pear/tcpwrap -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 -DHAVE_CONFIG_H -g -O2 -c /root/tmp/pear/tcpwrap/tcpwrap.c -fPIC -DPIC -o .libs/tcpwrap.o
/root/tmp/pear/tcpwrap/tcpwrap.c:42: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âtcpwrap_functionsâ
/root/tmp/pear/tcpwrap/tcpwrap.c:55: error: âtcpwrap_functionsâ undeclared here (not in a function)
make: *** [tcpwrap.lo] Error 1
ERROR: `make' failed

Error while installing PHP expect extension

I got some serious error while installing expect extension in PHP.
I ran sudo pecl install channel://pecl.php.net/expect-0.3.1
I got error like this while running make,
running: make
/bin/bash /tmp/pear/temp/pear-build-rootvXp7LZ/expect-0.3.1/libtool --mode=compile cc -I. -I/tmp/pear/temp/expect -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootvXp7LZ/expect-0.3.1/include -I/tmp/pear/temp/pear-build-rootvXp7LZ/expect-0.3.1/main -I/tmp/pear/temp/expect -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 /tmp/pear/temp/expect/expect.c -o expect.lo
libtool: compile: cc -I. -I/tmp/pear/temp/expect -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootvXp7LZ/expect-0.3.1/include -I/tmp/pear/temp/pear-build-rootvXp7LZ/expect-0.3.1/main -I/tmp/pear/temp/expect -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 /tmp/pear/temp/expect/expect.c -fPIC -DPIC -o .libs/expect.o
In file included from /tmp/pear/temp/expect/expect.c:21:0:
/tmp/pear/temp/expect/php_expect.h:33:17: fatal error: tcl.h: No such file or directory
compilation terminated.
make: *** [expect.lo] Error 1
ERROR: `make' failed
Please advice me as I am a very beginner in PHP.
Thanks.
I found this post helpful for this issue. On CentOS I was able to get this installed via:
yum install tcl tcl-devel tk tk-devel
yum install expect expect-devel
pecl install channel://pecl.php.net/expect-0.3.1
Then add the following to php.ini:
extension = expect.so

How to compile the Oracle Instant Client Libraries for PHP PDO - Linux x86_64?

I'm currently trying to compile the Oracle Instant Client Libraries for PHP PDO (Linux x86_64) and it's failing on the make step. Note: this is an old experimental plugin.
I've followed the steps highlighted on this page: http://lacot.org/blog/2009/11/03/ubuntu-php5-oci8-and-pdo_oci-the-perfect-install.html and it fails on make.
Do you have any idea what this error means? or how i can correct it?
I think i means that the zend_fcall_info type is not being recognised but as far as i can see the zend.h file is being included ok since i've copied all of the Zend includes into /usr/local/include/php/ext/pdo/ to try and resolve this error.
gary#gary-desktop:/tmp/PDO_OCI-1.0$ make /bin/bash
/tmp/PDO_OCI-1.0/libtool --mode=compile gcc
-I/usr/local/include/php/ext -I. -I/tmp/PDO_OCI-1.0 -DPHP_ATOM_INC
-I/tmp/PDO_OCI-1.0/include -I/tmp/PDO_OCI-1.0/main -I/tmp/PDO_OCI-1.0
-I/usr/local/include/php -I/usr/local/include/php/main
-I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend
-DHAVE_CONFIG_H -g -O2 -c /tmp/PDO_OCI-1.0/pdo_oci.c -o pdo_oci.lo
gcc -I/usr/local/include/php/ext -I. -I/tmp/PDO_OCI-1.0 -DPHP_ATOM_INC
-I/tmp/PDO_OCI-1.0/include -I/tmp/PDO_OCI-1.0/main -I/tmp/PDO_OCI-1.0
-I/usr/local/include/php -I/usr/local/include/php/main
-I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend
-DHAVE_CONFIG_H -g -O2 -c /tmp/PDO_OCI-1.0/pdo_oci.c -fPIC -DPIC -o
pdo_oci.lo In file included from /tmp/PDO_OCI-1.0/pdo_oci.c:29:
/usr/local/include/php/ext/pdo/php_pdo_driver.h:617: error: expected
specifier-qualifier-list before 'zend_fcall_info'
/usr/local/include/php/ext/pdo/php_pdo_driver.h:624: error: expected
specifier-qualifier-list before 'zend_fcall_info' make: ***
[pdo_oci.lo] Error 1 gary#gary-desktop:/tmp/PDO_OCI-1.0$
Any help would be appreciated.
I tried another machine and all worked fine. It was probably a configuration issue.

Categories