Error 1 :
/usr/src/php-5.2.9/ext/dom/node.c:in function ' dom_canonicalization ':
/usr/src/php-5.2.9/ext/dom/node.c:1950:21:error:dereferencingpointer to incomplete type
RET = buf->buffer->use;
^
Infile included from/usr/src/php-5.2.9/main/php.h:38:0,
FROM/USR/SRC/PHP-5.2.9/EXT/DOM/NODE.C:26:
/usr/src/php-5.2.9/ext/dom/node.c:1952:40:error:dereferencing pointer to incomplete type
Retval_stringl ((char *) buf->buffer->content, ret, 1);
^
/usr/src/php-5.2.9/zend/zend_api.h:472:14:note:in definition of macro ' Zval_stringl '
Char *__s= (s); int __l=l; \
^
/usr/src/php-5.2.9/ext/dom/node.c:1952:5:note:in expansion of macro ' Retval_stringl '
Retval_stringl ((char *) buf->buffer->content, ret, 1);
make:*** [Ext/dom/node.lo] error 1
[[Email protected]]#
Error 2 :
/usr/src/php-5.2.9/ext/dom/documenttype.c:in function ' Dom_documenttype_internal_subset_read ':
/usr/src/php-5.2.9/ext/dom/documenttype.c:219:42:error:dereferencing pointer to incomplete type
Strintsubset =xmlstrndup (buff->buffer->content, buff->buffer->use);
^
/usr/src/php-5.2.9/ext/dom/documenttype.c:219:65:error:dereferencing pointer to incomplete type
Strintsubset =xmlstrndup (buff->buffer->content, buff->buffer->use);
^
make:*** [Ext/dom/documenttype.lo] error 1
[[Email protected]]#
Workaround:
Download Https://mail.gnome.org/archives/xml/2012-August/txtbgxGXAvz4N.txt Patch Program
Edit /usr/src/php-5.2.9/ext/dom/node.c file, replace the source snippet with the corresponding patch snippet (the purple part of the table)
---ext/dom/node.c 2012-08-06 17:49:48.826716692+0800
+++EXT/DOM/NODE.C 2012-08-0617:52:47.633484660 +0800
@@-1895,9 +1895,17 @@ static void Dom_canonicalization (INTERNA
Retval_false;
} else {
if (mode = = 0) {
#ifdef Libxml2_new_buffer
RET =xmloutputbuffergetsize (BUF);
#else
RET = buf->buffer->use;
#endif
if (Ret > 0) {
#ifdef Libxml2_new_buffer
Retval_stringl ((char *) xmloutputbuffergetcontent (BUF), RET, 1);
+ #else
Retval_stringl ((char *) Buf->buffer->content,ret, 1);
#endif
} else {
Retval_empty_string ();
}
3. Similarly edit the /usr/src/php-5.2.9/ext/dom/documenttype.c file to replace the source snippet with the corresponding patch snippet (the purple part of the table)
---ext/dom/documenttype.c 2012-08-0618:02:16.019640870 +0800
+++EXT/DOM/DOCUMENTTYPE.C 2012-08-06 18:06:16.612228905+0800
@@-205,7 +205,13 @@ int Dom_documenttype_internal_subset_rea
if (buff! = NULL) {
Xmlnodedumpoutput (Buff, NULL, (xmlnodeptr) intsubset, 0, 0, NULL);
Xmloutputbufferflush (Buff);
#ifdef Libxml2_new_buffer
Zval_stringl (*retval,xmloutputbuffergetcontent (Buff),
Xmloutputbuffergetsize (Buff), 1);
#else
Zval_stringl (*retval, Buff->buffer->content,buff->buffer->use, 1);
#endif
(void) xmloutputbufferclose (buff);
return SUCCESS;
}
This article from "Dosom" blog, declined reprint!
Redhat compile php-5.2.9 error dereferencing pointer to incomplete type