免费注册 查看新帖 |

Chinaunix

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

php编译出错,请高手帮忙诊断下 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-07-17 16:39 |只看该作者 |倒序浏览
php-5.2.14 编译的时候,一大堆错误
/bin/sh /data/src/php-5.2.14/libtool --silent --preserve-dup-deps --mode=compile /data/src/php-5.2.14/meta_ccld -Iext/date/lib -Iext/date/ -I/data/src/php-5.2.14/ext/date/ -DPHP_ATOM_INC -I/data/src/php-5.2.14/include -I/data/src/php-5.2.14/main -I/data/src/php-5.2.14 -I/data/src/php-5.2.14/ext/date/lib -I/usr/include/libxml2 -I/usr/kerberos/include -I/usr/include/freetype2 -I/usr/local/include -I/data/src/php-5.2.14/ext/mbstring/oniguruma -I/data/src/php-5.2.14/ext/mbstring/libmbfl -I/data/src/php-5.2.14/ext/mbstring/libmbfl/mbfl -I/usr/local/mysql/include/mysql -I/data/src/php-5.2.14/TSRM -I/data/src/php-5.2.14/Zend  -D_REENTRANT  -I/usr/local/include -g -O2 -pthread -DZTS  -c /data/src/php-5.2.14/ext/date/php_date.c -o ext/date/php_date.lo
In file included from /data/src/php-5.2.14/main/php.h:34,
                 from /data/src/php-5.2.14/ext/date/php_date.c:21:
/data/src/php-5.2.14/Zend/zend.h:53:26: error: zend_config.h: No such file or directory
In file included from /data/src/php-5.2.14/Zend/zend_alloc.h:27,
                 from /data/src/php-5.2.14/Zend/zend.h:242,
                 from /data/src/php-5.2.14/main/php.h:34,
                 from /data/src/php-5.2.14/ext/date/php_date.c:21:
/data/src/php-5.2.14/Zend/../TSRM/TSRM.h:20:26: error: tsrm_config.h: No such file or directory
In file included from /data/src/php-5.2.14/Zend/zend_alloc.h:27,
                 from /data/src/php-5.2.14/Zend/zend.h:242,
                 from /data/src/php-5.2.14/main/php.h:34,
                 from /data/src/php-5.2.14/ext/date/php_date.c:21:
/data/src/php-5.2.14/Zend/../TSRM/TSRM.h:108: error: expected declaration specifiers or ‘...’ before ‘THREAD_T’
/data/src/php-5.2.14/Zend/../TSRM/TSRM.h:126: error: expected ‘)’ before ‘thread_id’
/data/src/php-5.2.14/Zend/../TSRM/TSRM.h:127: error: expected ‘)’ before ‘thread_id’
/data/src/php-5.2.14/Zend/../TSRM/TSRM.h:134: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘tsrm_thread_id’
/data/src/php-5.2.14/Zend/../TSRM/TSRM.h:135: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘tsrm_mutex_alloc’
/data/src/php-5.2.14/Zend/../TSRM/TSRM.h:136: error: expected ‘)’ before ‘mutexp’
/data/src/php-5.2.14/Zend/../TSRM/TSRM.h:137: error: expected ‘)’ before ‘mutexp’
/data/src/php-5.2.14/Zend/../TSRM/TSRM.h:138: error: expected ‘)’ before ‘mutexp’
/data/src/php-5.2.14/Zend/../TSRM/TSRM.h:140: error: expected ‘)’ before ‘new_thread_begin_handler’
/data/src/php-5.2.14/Zend/../TSRM/TSRM.h:141: error: expected ‘)’ before ‘new_thread_end_handler’
In file included from /data/src/php-5.2.14/Zend/zend.h:242,
                 from /data/src/php-5.2.14/main/php.h:34,
                 from /data/src/php-5.2.14/ext/date/php_date.c:21:
/data/src/php-5.2.14/Zend/zend_alloc.h:34: error: expected specifier-qualifier-list before ‘uint’
/data/src/php-5.2.14/Zend/zend_alloc.h:41: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘char’
/data/src/php-5.2.14/Zend/zend_alloc.h:43: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
/data/src/php-5.2.14/Zend/zend_alloc.h:44: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
/data/src/php-5.2.14/Zend/zend_alloc.h:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
/data/src/php-5.2.14/Zend/zend_alloc.h:46: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
/data/src/php-5.2.14/Zend/zend_alloc.h:47: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
/data/src/php-5.2.14/Zend/zend_alloc.h:48: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
/data/src/php-5.2.14/Zend/zend_alloc.h:49: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
/data/src/php-5.2.14/Zend/zend_alloc.h:50: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
/data/src/php-5.2.14/Zend/zend_alloc.h:51: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘char’
/data/src/php-5.2.14/Zend/zend_alloc.h:52: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘char’
/data/src/php-5.2.14/Zend/zend_alloc.h:53: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘size_t’
/data/src/php-5.2.14/Zend/zend_alloc.h: In function ‘__zend_malloc’:
/data/src/php-5.2.14/Zend/zend_alloc.h:81: warning: incompatible implicit declaration of built-in function ‘malloc’
/data/src/php-5.2.14/Zend/zend_alloc.h:86: warning: incompatible implicit declaration of built-in function ‘exit’
/data/src/php-5.2.14/Zend/zend_alloc.h: In function ‘__zend_calloc’:
/data/src/php-5.2.14/Zend/zend_alloc.h:91: warning: initialization makes pointer from integer without a cast
/data/src/php-5.2.14/Zend/zend_alloc.h:92: warning: incompatible implicit declaration of built-in function ‘memset’
/data/src/php-5.2.14/Zend/zend_alloc.h: In function ‘__zend_realloc’:
/data/src/php-5.2.14/Zend/zend_alloc.h:98: warning: assignment makes pointer from integer without a cast
/data/src/php-5.2.14/Zend/zend_alloc.h:103: warning: incompatible implicit declaration of built-in function ‘exit’
/data/src/php-5.2.14/Zend/zend_alloc.h: At top level:
/data/src/php-5.2.14/Zend/zend_alloc.h:128: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/data/src/php-5.2.14/Zend/zend_alloc.h:130: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
/data/src/php-5.2.14/Zend/zend_alloc.h:131: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
/data/src/php-5.2.14/Zend/zend_alloc.h:132: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/data/src/php-5.2.14/Zend/zend_alloc.h:145: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘size_t’
/data/src/php-5.2.14/Zend/zend_alloc.h:146: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘size_t’
/data/src/php-5.2.14/Zend/zend_alloc.h:193: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘zend_mm_heap’
/data/src/php-5.2.14/Zend/zend_alloc.h:194: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
/data/src/php-5.2.14/Zend/zend_alloc.h:195: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
/data/src/php-5.2.14/Zend/zend_alloc.h:196: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
/data/src/php-5.2.14/Zend/zend_alloc.h:197: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
/data/src/php-5.2.14/Zend/zend_alloc.h:198: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘size_t’
/data/src/php-5.2.14/Zend/zend_alloc.h:232: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘zend_mm_heap’
/data/src/php-5.2.14/Zend/zend_alloc.h:233: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘zend_mm_heap’
/data/src/php-5.2.14/Zend/zend_alloc.h:234: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘zend_mm_storage’
In file included from /data/src/php-5.2.14/main/php.h:34,
                 from /data/src/php-5.2.14/ext/date/php_date.c:21:
/data/src/php-5.2.14/Zend/zend.h:265:2: error: #error "Unknown SIZEOF_LONG"
In file included from /data/src/php-5.2.14/Zend/zend.h:276,
                 from /data/src/php-5.2.14/main/php.h:34,
                 from /data/src/php-5.2.14/ext/date/php_date.c:21:

真是很郁闷,不知道怎样处理,请高手帮我看下,先谢谢了!

论坛徽章:
0
2 [报告]
发表于 2011-07-17 16:47 |只看该作者
代码肯定没有问题,我没动过【不懂,也不敢动
看是不是依赖性问题,要装什么套件,或者版本的兼容性问题。
请各位大侠发表下意见,现在一点头绪都没有。

论坛徽章:
0
3 [报告]
发表于 2011-07-17 16:48 |只看该作者
这是我的编译参数:
./configure  --prefix=/usr/local/php --with-config-file-path=/data/conf/php --with-mysql=/usr/local/mysql --with-pdo-mysql=/usr/local/mysql/bin/mysql_config --with-mysqli=/usr/local/mysql/bin/mysql_config --with-iconv=/usr/local/libiconv --with-freetype-dir --with-jpeg-dir --with-png-dir --with-ttf --enable-zip --with-zlib --with-gd --disable-debug --disable-rpath --enable-discard-path --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --disable-ipv6 --enable-static --enable-maintainer-zts --enable-zend-multibyte --enable-sockets --enable-soap --with-openssl --no-create --no-recursion

论坛徽章:
0
4 [报告]
发表于 2011-07-17 22:07 |只看该作者
没看出为什么,换个版本的php试试吧

论坛徽章:
0
5 [报告]
发表于 2011-07-18 21:07 |只看该作者
谢谢,已经解决了,是编译参数不正确!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP