Reputation: 68
I'm installing mysqlnd_ms package for php, but the make command reported an error:
make: *** [php_mysqlnd_ms.lo] Error 1
ERROR: `make' failed
my PHP version:
[root@uoo insFile]# php -v
PHP 5.6.12 (cli) (built: Aug 30 2015 00:04:44) Copyright (c) 1997-2015 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
my OS:
[root@uoo ~]# cat /etc/centos-release
CentOS Linux release 7.2.1511 (Core)
all php module that has been installed:
[root@uoo insFile]# php -m
[PHP Modules]
bcmath
Core
ctype
curl
date
dom
ereg
fileinfo
filter
gd
hash
iconv
json
libxml
mbstring
mcrypt
mhash
mysql
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
standard
sysvsem
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
zip
zlib
[Zend Modules]
here is my installation process with pecl:
[root@uoo insFile]# pecl install mysqlnd_ms
downloading mysqlnd_ms-1.5.2.tgz ...
Starting to download mysqlnd_ms-1.5.2.tgz (385,916 bytes)
..............................................................................done: 385,916 bytes
36 source files, building
running: phpize
Configuring for:
PHP Api Version: 20131106
Zend Module Api No: 20131226
Zend Extension Api No: 220131226
building in /tmp/pear/temp/pear-build-rootvgIJMs/mysqlnd_ms-1.5.2
running: /tmp/pear/temp/mysqlnd_ms/configure
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr/local/php
checking for PHP includes... -I/usr/local/php/include/php -I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext -I/usr/local/php/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/php/lib/php/extensions/no-debug-zts-20131226
checking for PHP installed headers prefix... /usr/local/php/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable mysqlnd_ms support... yes, shared
checking whether to enable table filter in mysqlnd_ms... no
checking whether to query caching through mysqlnd_qc in mysqlnd_ms... no
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 1572864
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /tmp/pear/temp/pear-build-rootr7CW9Q/mysqlnd_ms-1.5.2/libtool --mode=compile cc
-I. -I/tmp/pear/temp/mysqlnd_ms -DPHP_ATOM_INC
-I/tmp/pear/temp/pear-build-rootr7CW9Q/mysqlnd_ms-1.5.2/include
-I/tmp/pear/temp/pear-build-rootr7CW9Q/mysqlnd_ms-1.5.2/main
-I/tmp/pear/temp/mysqlnd_ms -I/usr/local/php/include/php
-I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSRM
-I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext
-I/usr/local/php/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2
-c /tmp/pear/temp/mysqlnd_ms/php_mysqlnd_ms.c -o php_mysqlnd_ms.lo
mkdir .libs
cc -I. -I/tmp/pear/temp/mysqlnd_ms -DPHP_ATOM_INC
-I/tmp/pear/temp/pear-build-rootr7CW9Q/mysqlnd_ms-1.5.2/include -I/tmp/pear/temp/pear-build-rootr7CW9Q/mysqlnd_ms-1.5.2/main -I/tmp/pear/temp/mysqlnd_ms -I/usr/local/php/include/php -I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext -I/usr/local/php/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/mysqlnd_ms/php_mysqlnd_ms.c -fPIC -DPIC -o .libs/php_mysqlnd_ms.o /tmp/pear/temp/mysqlnd_ms/php_mysqlnd_ms.c: In function ‘zif_mysqlnd_ms_get_last_used_connection’:/tmp/pear/temp/mysqlnd_ms/php_mysqlnd_ms.c:293:2: warning: passing argument 2 of ‘zval_to_mysqlnd’ makes integer from pointer without a cast [enabled by default]
if (!(proxy_conn = zval_to_mysqlnd(handle TSRMLS_CC))) { ^ In file included from /tmp/pear/temp/mysqlnd_ms/mysqlnd_ms.h:40:0,
from /tmp/pear/temp/mysqlnd_ms/php_mysqlnd_ms.c:34: /usr/local/php/include/php/ext/mysqlnd/mysqlnd_reverse_api.h:37:18: note: expected ‘unsigned int’ but argument is of type ‘void ***’
PHPAPI MYSQLND * zval_to_mysqlnd(zval * zv, const unsigned int client_api_capabilities, unsigned int * save_client_api_capabilities TSRMLS_DC);
^ /tmp/pear/temp/mysqlnd_ms/php_mysqlnd_ms.c:293:2: error: too few arguments to function ‘zval_to_mysqlnd’
if (!(proxy_conn = zval_to_mysqlnd(handle TSRMLS_CC))) { ^ In file included from /tmp/pear/temp/mysqlnd_ms/mysqlnd_ms.h:40:0,
from /tmp/pear/temp/mysqlnd_ms/php_mysqlnd_ms.c:34: /usr/local/php/include/php/ext/mysqlnd/mysqlnd_reverse_api.h:37:18: note: declared here
PHPAPI MYSQLND * zval_to_mysqlnd(zval * zv, const unsigned int client_api_capabilities, unsigned int * save_client_api_capabilities TSRMLS_DC);
^ /tmp/pear/temp/mysqlnd_ms/php_mysqlnd_ms.c: In function ‘zif_mysqlnd_ms_get_last_gtid’:
/tmp/pear/temp/mysqlnd_ms/php_mysqlnd_ms.c:333:2: warning: passing argument 2 of ‘zval_to_mysqlnd’ makes integer from pointer without a cast [enabled by default] if (!(proxy_conn = zval_to_mysqlnd(handle TSRMLS_CC))) { ^ In file included from /tmp/pear/temp/mysqlnd_ms/mysqlnd_ms.h:40:0,
from /tmp/pear/temp/mysqlnd_ms/php_mysqlnd_ms.c:34: /usr/local/php/include/php/ext/mysqlnd/mysqlnd_reverse_api.h:37:18: note: expected ‘unsigned int’ but argument is of type ‘void ***’
PHPAPI MYSQLND * zval_to_mysqlnd(zval * zv, const unsigned int client_api_capabilities, unsigned int * save_client_api_capabilities TSRMLS_DC);^ /tmp/pear/temp/mysqlnd_ms/php_mysqlnd_ms.c:333:2: error: too few arguments to function ‘zval_to_mysqlnd’
if (!(proxy_conn = zval_to_mysqlnd(handle TSRMLS_CC))) { ^ In file included from /tmp/pear/temp/mysqlnd_ms/mysqlnd_ms.h:40:0,
from /tmp/pear/temp/mysqlnd_ms/php_mysqlnd_ms.c:34:
/usr/local/php/include/php/ext/mysqlnd/mysqlnd_reverse_api.h:37:18: note: declared here
PHPAPI MYSQLND * zval_to_mysqlnd(zval * zv, const unsigned int client_api_capabilities, unsigned int * save_client_api_capabilities TSRMLS_DC);
^ /tmp/pear/temp/mysqlnd_ms/php_mysqlnd_ms.c:373:3: warning: passing argument 2 of ‘ms_ori mysqlnd_conn_methods->store_result’ makes integer from pointer without a cast [enabled▽by default] if (!(res = MS_CALL_ORIGINAL_CONN_DATA_METHOD(store_result)(conn TSRMLS_CC))) { ^ /tmp/pear/temp/mysqlnd_ms/php_mysqlnd_ms.c:373:3: note: expected ‘unsigned int’ but argument is of type ‘void ***’
/tmp/pear/temp/mysqlnd_ms/php_mysqlnd_ms.c:373:3: error: too few arguments to function ‘ms_orig_mysqlnd_conn_methods->store_result’
/tmp/pear/temp/mysqlnd_ms/php_mysqlnd_ms.c: In function ‘zif_mysqlnd_ms_set_qos’:
/tmp/pear/temp/mysqlnd_ms/php_mysqlnd_ms.c:506:2: warning: passing argument 2 of ‘zval_to_mysqlnd’ makes integer from pointer without a cast [enabled by default] if (!(proxy_conn = zval_to_mysqlnd(handle TSRMLS_CC))) {
^
In file included from /tmp/pear/temp/mysqlnd_ms/mysqlnd_ms.h:40:0,
from /tmp/pear/temp/mysqlnd_ms/php_mysqlnd_ms.c:34: /usr/local/php/include/php/ext/mysqlnd/mysqlnd_reverse_api.h:37:18: note: expected ‘unsigned int’ but argument is of type ‘void ***’
PHPAPI MYSQLND * zval_to_mysqlnd(zval * zv, const unsigned int client_api_capabilities, unsigned int * save_client_api_capabilities TSRMLS_DC);
^
/tmp/pear/temp/mysqlnd_ms/php_mysqlnd_ms.c:506:2: error: too few arguments to function ‘zval_to_mysqlnd’
if (!(proxy_conn = zval_to_mysqlnd(handle TSRMLS_CC))) {
^
In file included from /tmp/pear/temp/mysqlnd_ms/mysqlnd_ms.h:40:0,
from /tmp/pear/temp/mysqlnd_ms/php_mysqlnd_ms.c:34: /usr/local/php/include/php/ext/mysqlnd/mysqlnd_reverse_api.h:37:18: note: declared here
PHPAPI MYSQLND * zval_to_mysqlnd(zval * zv, const unsigned int client_api_capabilities, unsigned int * save_client_api_capabilities TSRMLS_DC);
^
make: *** [php_mysqlnd_ms.lo] Error 1
ERROR: `make' failed
Upvotes: 1
Views: 1873
Reputation: 675
I was able to successfully install it via RPM package install. The links below may help you, depending on OS and PHP version you currently have. I mention this detail since this was originally posted a few years ago.
I simply followed the instructions from CentOS packages and the php pecl-svn extension installed with no issues on the Redhat 6.9 PHP 5.6 server. Hopefully the same works for you.
Upvotes: 0
Reputation: 9
I have been looking hours and hours on the google finally the Clark's solution worked on cpanel just a bit of tweak
For cpanel I changed the command to:
svn checkout http://svn.php.net/repository/pecl/mysqlnd_ms/trunk/ && cd trunk && /opt/cpanel/ea-php56/root/usr/bin/phpize && ./configure --with-php-config=/opt/cpanel/ea-php56/root/usr/bin/php-config && make; make install
You also need to create and add the extension name in
/opt/cpanel/ea-php56/root/usr/lib64/php/modules/
:
cd /opt/cpanel/ea-php56/root/usr/lib64/php/modules/
cat >> mysqlnd_ms.ini << EOF
extension=mysqlnd_ms.so
EOF
You can see result with php -m
.
Upvotes: 0
Reputation: 11
Try this:
svn checkout http://svn.php.net/repository/pecl/mysqlnd_ms/trunk/ && cd trunk && phpize && ./configure --with-php-config=/usr/bin/php-config && make
then run make install
then restart your apache.
I only tried this on php5.6. I'm not sure if this works on other version.
Upvotes: 1