note 16782 deleted from install.macosx by nlopess
| From: | nlopess@php.net | Date: | Thu, 20 Jan 2005 10:29:57 +0000 |
| Subject: | note 16782 deleted from install.macosx by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-83659@lists.php.net to get a copy of this message | ||
Note Submitter: roop at spacelab.net
----
Apple has instructions at http://developer.apple.com/internet/macosx/php.html
for getting PHP to compile under Mac OS X 10.1, but I had no luck with them (getting XML, zlib and
PostgreSQL support, as I require). No matter what I did I seemed to get linking errors, usually:
/usr/bin/ld: -undefined error must be used when -twolevel_namespace is in
effect
After much trial and error I was able to finally build PHP by doing the following.
Whereas Apple suggests modifying the ltconfig file in the following manner...
archive_cmds='$CC -force_flat_namespace -bundle -undefined suppress -o $lib $libobjs $deplibs
$linkopts'
I instead, following a tip from a PostgreSQL mailing list, used this...
archive_cmds='$CC -bundle -bundle_loader /usr/sbin/httpd -o $lib $libobjs $deplibs
$linkopts'
And lo and behold it worked. I can't vouch for the advisability/safety/sanity of this, but it
works. Good luck if you try it.