Building PHP in Mac OS 10.5.3
Just like every other Mac user out there, I installed 10.5.3 when it dropped last week. And, like so many times before this, the os x update broke my local build of PHP. This time, after rebuilding PHP & Apache, I was still unable to start apache, being told that libphp5.so was the wrong architecture.
This time apparently php was building as i386, but httpd was running as x86_64 (I’ve got a SR MacBook pro as my build environment, your mileage may vary.) So, instead of figuring out how to cajole php into building as x86_64, I fell back on my friend lipo to make sure httpd was running i386. Here’s what I did:
sudo apachectl stop
cd /usr/sbin
sudo mv httpd httpd_old
sudo lipo -thin i386 httpd_old -output httpd
sudo rm -f httpd_old
sudo apachectl start
This looks like it solved all of my problems. I might keep this in mind for when 10.5.4 drops, to make my life a good bit easier.
In the mean time, if you can tell me how to convince php to build x86_64, I won’t mind. ./configure detects the following about my system:
checking host system type... i686-apple-darwin9.3.0
checking target system type... i686-apple-darwin9.3.0
Maybe i’m destined to run as i386, which I don’t mind, so long as it runs.
Cheers!