make: *** [ext/dom/node.lo] Error 1

Got the following error while running make command in a custom php-5.3 installation in a server.

/usr/src/php-5.3.10/ext/dom/node.c: In function ‘dom_canonicalization’:
/usr/src/php-5.3.10/ext/dom/node.c:1898: error: dereferencing pointer to incomplete type
/usr/src/php-5.3.10/ext/dom/node.c:1900: error: dereferencing pointer to incomplete type
make: *** [ext/dom/node.lo] Error 1

Fix:

It is a bug with php and can be corrected using a simple patch.

Download the patch file to the extracted php directory.

# cd /usr/src/php-5.3.10
# wget http://cpanelstuffs.linuxcabin.com/downloads/php1.patch
# chmod 755 php1.patch
# patch -p0 < php1.patch

patching file ext/dom/node.c
patching file ext/dom/documenttype.c
patching file ext/simplexml/simplexml.c
Hunk #1 succeeded at 1387 (offset -30 lines).

Now, run configure again and then make. It will complete with no errors 🙂

Comments: 14

  1. Manu March 22, 2014 at 11:37 PM Reply

    Great Sir!!, Polichu mone..

  2. cpanelstuffs March 25, 2014 at 9:14 AM Reply

    @Manu, thanks dude.

    😉

  3. Hari August 6, 2014 at 2:44 PM Reply

    Thank you KP 🙂

  4. cpanelstuffs August 9, 2014 at 9:08 PM Reply

    @Hari, you are welcome!!

  5. hardik September 9, 2014 at 4:02 PM Reply

    great…great sir..salute!! thank you

  6. cpanelstuffs September 26, 2014 at 1:29 AM Reply

    You are welcome Hardik

  7. stack November 19, 2014 at 10:50 PM Reply

    Thank’s dude !

  8. cpanelstuffs November 29, 2014 at 1:00 AM Reply

    np stack 😉

  9. Ali December 11, 2015 at 5:07 PM Reply

    Awesome!!

    worked for me while compiling php5.2 on Ubuntu 14.04

    • December 15, 2015 at 5:37 PM Reply

      Awesome !!.

  10. Mark December 14, 2015 at 8:34 AM Reply

    Thank you for posting this information. I installed php-5.4.0 and had an error; make: *** [ext/dom/node.lo] Error 1. I installed the php1 patch and make build was complete.

    • December 15, 2015 at 5:37 PM Reply

      Hi Mark, glad to hear that it worked.

  11. jude June 2, 2016 at 9:07 PM Reply

    it works!!! thanks

    • June 6, 2016 at 1:09 PM Reply

      Glad that it worked 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *