I came across the following error while “make” process during custom compilation of PHP. This is bug in its release which can rectified by applying a patch.
/usr/local/src/php_sources/php-5.4.5/ext/dom/node.c: In function dom_canonicalization:
/usr/local/src/php_sources/php-5.4.5/ext/dom/node.c:1898: error: dereferencing pointer to incomplete
Download the patch “php1.patch” from the below URL.
and execute the following command in the php source directory.
@Host [/usr/src/php-5.2.17]# chmod 755 php1.patch
@Host [/usr/src/php-5.2.17]# patch -p0 < php1.patch
patching file ext/dom/node.c
Hunk #1 succeeded at 1950 (offset 55 lines).
patching file ext/dom/documenttype.c
Hunk #1 succeeded at 215 (offset 10 lines).
patching file ext/simplexml/simplexml.c
Hunk #1 succeeded at 1343 (offset -74 lines).
Now do compilation again, error is corrected 🙂