免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3784 | 回复: 4
打印 上一主题 下一主题

[Linux] php无法使用phpize生成mysqli,希望有人会。 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2015-08-22 20:26 |只看该作者 |倒序浏览
[root@localhost mysqli]# ./configure --with-php-config=/usr/local/php/bin/php-config --with-mysqli=/usr/local/mysql/bin/mysql_config
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /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 for MySQLi support... yes, shared
checking whether to enable embedded MySQLi support... no
checking for mysql_set_server_option in -lmysqlclient... yes
checking for mysql_set_character_set in -lmysqlclient... yes
checking for mysql_stmt_next_result in -lmysqlclient... yes
checking for ld used by cc... /bin/ld
checking if the linker (/bin/ld) is GNU ld... yes
checking for /bin/ld option to reload object files... -r
checking for BSD-compatible nm... /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 /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... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/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
[root@localhost mysqli]# make
/bin/sh /home/zlc/php-5.6.12/ext/mysqli/libtool --mode=compile cc  -I. -I/home/zlc/php-5.6.12/ext/mysqli -DPHP_ATOM_INC -I/home/zlc/php-5.6.12/ext/mysqli/include -I/home/zlc/php-5.6.12/ext/mysqli/main -I/home/zlc/php-5.6.12/ext/mysqli -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 -I/usr/local/mysql/include/mysql  -DHAVE_CONFIG_H  -g -O2   -c /home/zlc/php-5.6.12/ext/mysqli/mysqli.c -o mysqli.lo
mkdir .libs
cc -I. -I/home/zlc/php-5.6.12/ext/mysqli -DPHP_ATOM_INC -I/home/zlc/php-5.6.12/ext/mysqli/include -I/home/zlc/php-5.6.12/ext/mysqli/main -I/home/zlc/php-5.6.12/ext/mysqli -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 -I/usr/local/mysql/include/mysql -DHAVE_CONFIG_H -g -O2 -c /home/zlc/php-5.6.12/ext/mysqli/mysqli.c  -fPIC -DPIC -o .libs/mysqli.o
In file included from /usr/local/mysql/include/mysql/my_global.h:68:0,
                 from /home/zlc/php-5.6.12/ext/mysqli/php_mysqli_structs.h:63,
                 from /home/zlc/php-5.6.12/ext/mysqli/mysqli.c:34:
/usr/local/mysql/include/mysql/my_config.h:651:0: 警告:“PACKAGE_NAME”重定义 [默认启用]
#define PACKAGE_NAME "MySQL Server"
^
In file included from /usr/local/php/include/php/TSRM/tsrm_config.h:1:0,
                 from /usr/local/php/include/php/TSRM/tsrm_config_common.h:13,
                 from /usr/local/php/include/php/Zend/zend_virtual_cwd.h:27,
                 from /usr/local/php/include/php/main/php.h:404,
                 from /home/zlc/php-5.6.12/ext/mysqli/mysqli.c:29:
/usr/local/php/include/php/main/../main/php_config.h:2192:0: 附注:这是先前定义的位置
#define PACKAGE_NAME ""
^
In file included from /usr/local/mysql/include/mysql/my_global.h:68:0,
                 from /home/zlc/php-5.6.12/ext/mysqli/php_mysqli_structs.h:63,
                 from /home/zlc/php-5.6.12/ext/mysqli/mysqli.c:34:
/usr/local/mysql/include/mysql/my_config.h:652:0: 警告:“PACKAGE_STRING”重定义 [默认启用]
#define PACKAGE_STRING "MySQL Server 5.6.25"
^
In file included from /usr/local/php/include/php/TSRM/tsrm_config.h:1:0,
                 from /usr/local/php/include/php/TSRM/tsrm_config_common.h:13,
                 from /usr/local/php/include/php/Zend/zend_virtual_cwd.h:27,
                 from /usr/local/php/include/php/main/php.h:404,
                 from /home/zlc/php-5.6.12/ext/mysqli/mysqli.c:29:
/usr/local/php/include/php/main/../main/php_config.h:2195:0: 附注:这是先前定义的位置
#define PACKAGE_STRING ""
^
In file included from /usr/local/mysql/include/mysql/my_global.h:68:0,
                 from /home/zlc/php-5.6.12/ext/mysqli/php_mysqli_structs.h:63,
                 from /home/zlc/php-5.6.12/ext/mysqli/mysqli.c:34:
/usr/local/mysql/include/mysql/my_config.h:653:0: 警告:“PACKAGE_TARNAME”重定义 [默认启用]
#define PACKAGE_TARNAME "mysql"
^
In file included from /usr/local/php/include/php/TSRM/tsrm_config.h:1:0,
                 from /usr/local/php/include/php/TSRM/tsrm_config_common.h:13,
                 from /usr/local/php/include/php/Zend/zend_virtual_cwd.h:27,
                 from /usr/local/php/include/php/main/php.h:404,
                 from /home/zlc/php-5.6.12/ext/mysqli/mysqli.c:29:
/usr/local/php/include/php/main/../main/php_config.h:2198:0: 附注:这是先前定义的位置
#define PACKAGE_TARNAME ""
^
In file included from /usr/local/mysql/include/mysql/my_global.h:68:0,
                 from /home/zlc/php-5.6.12/ext/mysqli/php_mysqli_structs.h:63,
                 from /home/zlc/php-5.6.12/ext/mysqli/mysqli.c:34:
/usr/local/mysql/include/mysql/my_config.h:654:0: 警告:“PACKAGE_VERSION”重定义 [默认启用]
#define PACKAGE_VERSION "5.6.25"
^
In file included from /usr/local/php/include/php/TSRM/tsrm_config.h:1:0,
                 from /usr/local/php/include/php/TSRM/tsrm_config_common.h:13,
                 from /usr/local/php/include/php/Zend/zend_virtual_cwd.h:27,
                 from /usr/local/php/include/php/main/php.h:404,
                 from /home/zlc/php-5.6.12/ext/mysqli/mysqli.c:29:
/usr/local/php/include/php/main/../main/php_config.h:2204:0: 附注:这是先前定义的位置
#define PACKAGE_VERSION ""
^
/bin/sh /home/zlc/php-5.6.12/ext/mysqli/libtool --mode=compile cc  -I. -I/home/zlc/php-5.6.12/ext/mysqli -DPHP_ATOM_INC -I/home/zlc/php-5.6.12/ext/mysqli/include -I/home/zlc/php-5.6.12/ext/mysqli/main -I/home/zlc/php-5.6.12/ext/mysqli -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 -I/usr/local/mysql/include/mysql  -DHAVE_CONFIG_H  -g -O2   -c /home/zlc/php-5.6.12/ext/mysqli/mysqli_api.c -o mysqli_api.lo
cc -I. -I/home/zlc/php-5.6.12/ext/mysqli -DPHP_ATOM_INC -I/home/zlc/php-5.6.12/ext/mysqli/include -I/home/zlc/php-5.6.12/ext/mysqli/main -I/home/zlc/php-5.6.12/ext/mysqli -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 -I/usr/local/mysql/include/mysql -DHAVE_CONFIG_H -g -O2 -c /home/zlc/php-5.6.12/ext/mysqli/mysqli_api.c  -fPIC -DPIC -o .libs/mysqli_api.o
In file included from /usr/local/mysql/include/mysql/my_global.h:68:0,
                 from /home/zlc/php-5.6.12/ext/mysqli/php_mysqli_structs.h:63,
                 from /home/zlc/php-5.6.12/ext/mysqli/mysqli_api.c:34:
/usr/local/mysql/include/mysql/my_config.h:651:0: 警告:“PACKAGE_NAME”重定义 [默认启用]
#define PACKAGE_NAME "MySQL Server"
^
In file included from /usr/local/php/include/php/TSRM/tsrm_config.h:1:0,
                 from /usr/local/php/include/php/TSRM/tsrm_config_common.h:13,
                 from /usr/local/php/include/php/Zend/zend_virtual_cwd.h:27,
                 from /usr/local/php/include/php/main/php.h:404,
                 from /home/zlc/php-5.6.12/ext/mysqli/mysqli_api.c:29:
/usr/local/php/include/php/main/../main/php_config.h:2192:0: 附注:这是先前定义的位置
#define PACKAGE_NAME ""
^
In file included from /usr/local/mysql/include/mysql/my_global.h:68:0,
                 from /home/zlc/php-5.6.12/ext/mysqli/php_mysqli_structs.h:63,
                 from /home/zlc/php-5.6.12/ext/mysqli/mysqli_api.c:34:
/usr/local/mysql/include/mysql/my_config.h:652:0: 警告:“PACKAGE_STRING”重定义 [默认启用]
#define PACKAGE_STRING "MySQL Server 5.6.25"
^
In file included from /usr/local/php/include/php/TSRM/tsrm_config.h:1:0,
                 from /usr/local/php/include/php/TSRM/tsrm_config_common.h:13,
                 from /usr/local/php/include/php/Zend/zend_virtual_cwd.h:27,
                 from /usr/local/php/include/php/main/php.h:404,
                 from /home/zlc/php-5.6.12/ext/mysqli/mysqli_api.c:29:
/usr/local/php/include/php/main/../main/php_config.h:2195:0: 附注:这是先前定义的位置
#define PACKAGE_STRING ""
^
In file included from /usr/local/mysql/include/mysql/my_global.h:68:0,
                 from /home/zlc/php-5.6.12/ext/mysqli/php_mysqli_structs.h:63,
                 from /home/zlc/php-5.6.12/ext/mysqli/mysqli_api.c:34:
/usr/local/mysql/include/mysql/my_config.h:653:0: 警告:“PACKAGE_TARNAME”重定义 [默认启用]
#define PACKAGE_TARNAME "mysql"
^
In file included from /usr/local/php/include/php/TSRM/tsrm_config.h:1:0,
                 from /usr/local/php/include/php/TSRM/tsrm_config_common.h:13,
                 from /usr/local/php/include/php/Zend/zend_virtual_cwd.h:27,
                 from /usr/local/php/include/php/main/php.h:404,
                 from /home/zlc/php-5.6.12/ext/mysqli/mysqli_api.c:29:
/usr/local/php/include/php/main/../main/php_config.h:2198:0: 附注:这是先前定义的位置
#define PACKAGE_TARNAME ""
^
In file included from /usr/local/mysql/include/mysql/my_global.h:68:0,
                 from /home/zlc/php-5.6.12/ext/mysqli/php_mysqli_structs.h:63,
                 from /home/zlc/php-5.6.12/ext/mysqli/mysqli_api.c:34:
/usr/local/mysql/include/mysql/my_config.h:654:0: 警告:“PACKAGE_VERSION”重定义 [默认启用]
#define PACKAGE_VERSION "5.6.25"
^
In file included from /usr/local/php/include/php/TSRM/tsrm_config.h:1:0,
                 from /usr/local/php/include/php/TSRM/tsrm_config_common.h:13,
                 from /usr/local/php/include/php/Zend/zend_virtual_cwd.h:27,
                 from /usr/local/php/include/php/main/php.h:404,
                 from /home/zlc/php-5.6.12/ext/mysqli/mysqli_api.c:29:
/usr/local/php/include/php/main/../main/php_config.h:2204:0: 附注:这是先前定义的位置
#define PACKAGE_VERSION ""
^
/home/zlc/php-5.6.12/ext/mysqli/mysqli_api.c:36:47: 致命错误:ext/mysqlnd/mysql_float_to_double.h:没有那个文件或目录
#include "ext/mysqlnd/mysql_float_to_double.h"
                                               ^
编译中断。
make: *** [mysqli_api.lo] 错误 1

论坛徽章:
0
2 [报告]
发表于 2015-08-22 20:28 |只看该作者
使用同样的方法,生成了mysql.so和mbstring.so。phpMyAdmin已经工作。就是无法生成mysqli.so

论坛徽章:
0
3 [报告]
发表于 2015-08-22 20:44 |只看该作者
网上很多代码我都试验过了。我觉得我的配置参数也没错,为什么单单就是无法生成mysqli的扩展,不会就我一个人出现这个问题吧

论坛徽章:
0
4 [报告]
发表于 2015-08-22 22:29 |只看该作者
另外,我的apache,php,和mysql都是源码编译安装的,目录分别在/usr/local/apache,/usr/local/php./usr/local/mysql

论坛徽章:
0
5 [报告]
发表于 2015-08-22 22:32 |只看该作者
其实我在另一台电脑的虚拟机上已经生成了mysqil,刚开始出现了上述问题,但是后来不知道我重新设置了哪里,后来就能make通过了。有没有人知道原因和解决方式呢?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP