Error installing PHP5 on mac os x 10.3.9

jsn

Registered
Hi all

I am getting an error message when I try to install PHP5 in my mac os x 10.3.9

I am following the steps indicated in this page:
http://www.phpmac.com/articles.php?view=221

and I get several error messages, it ends with :make: *** [ext/libxml/libxml.lo] Error 1


[J-Computer:~/desktop/php-5.0.5] josesanc% make
gcc -Iext/libxml/ -I/Users/josesanc/desktop/php-5.0.5/ext/libxml/ -DPHP_ATOM_INC -I/Users/josesanc/desktop/php-5.0.5/include -I/Users/josesanc/desktop/php-5.0.5/main -I/Users/josesanc/desktop/php-5.0.5 -I/usr/include/libxml2 -I/usr/local/include -I/usr/local/mysql/include -I/Users/josesanc/desktop/php-5.0.5/TSRM -I/Users/josesanc/desktop/php-5.0.5/Zend -no-cpp-precomp -g -O2 -c /Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c -o ext/libxml/libxml.o && echo > ext/libxml/libxml.lo
cc1: warning: changing search order for system directory "/usr/local/include"
cc1: warning: as it has already been specified as a non-system directory
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:38:27: libxml/parser.h: No such file or directory
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:39:36: libxml/parserInternals.h: No such file or directory
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:40:25: libxml/tree.h: No such file or directory
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:41:24: libxml/uri.h: No such file or directory
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:42:29: libxml/xmlerror.h: No such file or directory
In file included from /Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:47:
/Users/josesanc/desktop/php-5.0.5/ext/libxml/php_libxml.h:36:25: libxml/tree.h: No such file or directory
In file included from /Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:47:
/Users/josesanc/desktop/php-5.0.5/ext/libxml/php_libxml.h:50: parse error before "xmlNodePtr"
/Users/josesanc/desktop/php-5.0.5/ext/libxml/php_libxml.h:50: warning: no semicolon at end of struct or union
/Users/josesanc/desktop/php-5.0.5/ext/libxml/php_libxml.h:53: parse error before '}' token
/Users/josesanc/desktop/php-5.0.5/ext/libxml/php_libxml.h:53: warning: data definition has no type or storage class
/Users/josesanc/desktop/php-5.0.5/ext/libxml/php_libxml.h:57: parse error before "php_libxml_node_ptr"
/Users/josesanc/desktop/php-5.0.5/ext/libxml/php_libxml.h:57: warning: no semicolon at end of struct or union
/Users/josesanc/desktop/php-5.0.5/ext/libxml/php_libxml.h:60: parse error before '}' token
/Users/josesanc/desktop/php-5.0.5/ext/libxml/php_libxml.h:60: warning: data definition has no type or storage class
/Users/josesanc/desktop/php-5.0.5/ext/libxml/php_libxml.h:66: parse error before '*' token
/Users/josesanc/desktop/php-5.0.5/ext/libxml/php_libxml.h:67: parse error before '*' token
/Users/josesanc/desktop/php-5.0.5/ext/libxml/php_libxml.h:68: parse error before '*' token
/Users/josesanc/desktop/php-5.0.5/ext/libxml/php_libxml.h:69: parse error before '*' token
/Users/josesanc/desktop/php-5.0.5/ext/libxml/php_libxml.h:70: parse error before "php_libxml_import_node"
/Users/josesanc/desktop/php-5.0.5/ext/libxml/php_libxml.h:70: warning: data definition has no type or storage class
/Users/josesanc/desktop/php-5.0.5/ext/libxml/php_libxml.h:73: parse error before "node"
/Users/josesanc/desktop/php-5.0.5/ext/libxml/php_libxml.h:75: parse error before '*' token
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:108: parse error before '*' token
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c: In function `php_libxml_dec_node':
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:112: `nodeptr' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:112: (Each undeclared identifier is reported only once
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:112: for each function it appears in.)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:114: `XML_DOCUMENT_NODE' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c: At top level:
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:126: parse error before '*' token
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c: In function `php_libxml_clear_object':
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:128: `object' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c: At top level:
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:135: parse error before "nodep"
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c: In function `php_libxml_unregister_node':
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:137: `wrapper' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:139: `nodeptr' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:139: `nodep' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c: At top level:
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:153: parse error before "node"
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c: In function `php_libxml_node_free':
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:155: `node' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:157: parse error before ')' token
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:160: `XML_ATTRIBUTE_NODE' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:161: `xmlAttrPtr' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:161: parse error before "node"
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:163: `XML_ENTITY_DECL' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:164: `XML_ELEMENT_DECL' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:165: `XML_ATTRIBUTE_DECL' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:167: `XML_NOTATION_NODE' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:172: `xmlEntityPtr' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:172: parse error before "node"
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:173: parse error before "node"
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:175: parse error before "node"
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:176: parse error before "node"
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:180: `XML_NAMESPACE_DECL' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:185: `XML_ELEMENT_NODE' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c: At top level:
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:192: parse error before "node"
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c: In function `php_libxml_node_free_list':
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:194: `xmlNodePtr' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:194: parse error before "curnode"
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:196: `node' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:197: `curnode' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:202: `XML_NOTATION_NODE' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:204: `XML_ENTITY_REF_NODE' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:205: parse error before "node"
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:207: `XML_ATTRIBUTE_DECL' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:208: `XML_DTD_NODE' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:209: `XML_DOCUMENT_TYPE_NODE' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:210: `XML_ENTITY_DECL' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:211: `XML_ATTRIBUTE_NODE' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:212: `XML_NAMESPACE_DECL' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:217: parse error before "node"
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c: In function `php_libxml_streams_IO_match_wrapper':
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:252: warning: assignment makes pointer from integer without a cast
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c: In function `php_libxml_streams_Io_Open_wrapper':
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:271: warning: assignment makes pointer from integer without a cast
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c: In function `php_libxml_ctx_error_level':
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:330: `xmlParserCtxtPtr' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:330: parse error before "parser"
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:332: `parser' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:332: parse error before "ctx"
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c: In function `zm_info_libxml':
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:496: `LIBXML_DOTTED_VERSION' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c: At top level:
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:559: parse error before "php_libxml_import_node"
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c: In function `php_libxml_import_node':
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:562: `xmlNodePtr' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:562: parse error before "node"
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:571: `node' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c: At top level:
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:579: parse error before '*' token
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c: In function `php_libxml_increment_node_ptr':
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:583: `object' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:583: `node' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:596: `private_data' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c: At top level:
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:611: parse error before '*' token
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c: In function `php_libxml_decrement_node_ptr':
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:613: `obj_node' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:615: `object' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:616: parse error before ')' token
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c: At top level:
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:630: parse error before '*' token
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c: In function `php_libxml_increment_doc_ref':
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:633: `object' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:636: `docp' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c: At top level:
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:647: parse error before '*' token
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c: In function `php_libxml_decrement_doc_ref':
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:650: `object' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:654: `xmlDoc' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:654: parse error before ')' token
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c: At top level:
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:667: parse error before "node"
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c: In function `php_libxml_node_free_resource':
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:669: `node' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:674: `XML_DOCUMENT_NODE' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:675: `XML_HTML_DOCUMENT_NODE' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:678: `XML_NAMESPACE_DECL' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:679: `xmlNodePtr' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:679: parse error before "node"
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:682: `XML_ATTRIBUTE_DECL' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:683: `XML_DTD_NODE' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:684: `XML_DOCUMENT_TYPE_NODE' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:685: `XML_ENTITY_DECL' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:686: `XML_ATTRIBUTE_NODE' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:690: parse error before "node"
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c: At top level:
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:702: parse error before '*' token
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c: In function `php_libxml_node_decrement_resource':
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:705: `xmlNodePtr' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:705: parse error before "nodep"
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:706: `obj_node' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:708: `object' undeclared (first use in this function)
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:709: parse error before ')' token
/Users/josesanc/desktop/php-5.0.5/ext/libxml/libxml.c:710: `nodep' undeclared (first use in this function)
make: *** [ext/libxml/libxml.lo] Error 1
 
The compiler can't find the libxml2 libraries needed for --with-xml

Two options:
1) change --with-xml to --disable-xml (actually, --with-xml is superflous according to http://dk.php.net/manual/en/ref.xml.php)
2) change --with-xml to --with-libxml-dir=/usr/include/libxml2/libxml . If you take a look at the first lines of your output you'll see you've only got -I/usr/include/libxml2

I'm 99% sure this should fix your problem
 
Well, if he is following all of the instructions given on the website he's also building Apache2, and the Marc Liyanage packages seem to only supports the Apache 1.3.x that's comming with Mac OS X or the Apache 2.0.x that's in Mac OS X Server.

Also, PHP it up to version 5.0.5 which is the version he is building.

Learning to build from source is a good experience if you are at all serious about keeping your servers up-to-date ;-)
 
Back
Top