php (node.c:1953:error) 解决办法。

root@---- [/opt/php-5.2.17]# make
/bin/sh /opt/php-5.2.17/libtool --silent --preserve-dup-deps --mode=compile gcc  -Iext/dom/ -I/opt/php-5.2.17/ext/dom/ -DPHP_ATOM_INC -I/opt/php-5.2.17/include -I/opt/
php-5.2.17/main -I/opt/php-5.2.17 -I/opt/php-5.2.17/ext/date/lib -I/opt/xml2/include/libxml2 -I/opt/php-5.2.17/TSRM -I/opt/php-5.2.17/Zend    -I/usr/include -g -O2  -c
/opt/php-5.2.17/ext/dom/node.c -o ext/dom/node.lo
/opt/php-5.2.17/ext/dom/node.c: In function â€کdom_canonicalization’:
/opt/php-5.2.17/ext/dom/node.c:1953: error: dereferencing pointer to incomplete type
/opt/php-5.2.17/ext/dom/node.c:1955: error: dereferencing pointer to incomplete type
make: *** [ext/dom/node.lo] Error 1

 

在国外的一个网站上找到了这个,其他版本的php也同样适用。

$ curl -o php-5.2.17.patch https://mail.gnome.org/archives/xml/2012-August/txtbgxGXAvz4N.txt
$ tar
jxf php-5.2.17.tar.bz2
$ cd php-5.2.17
$ patch -p0 -b <../php-5.2.17.patch
patching file ext/dom/node.c
patching file
ext/dom/documenttype.c
patching file ext/simplexml/simplexml.c
$

 

 

 

posted @ 2013-08-01 18:51  zippyer  阅读(1321)  评论(0编辑  收藏  举报