Compiling PHP extensions using Xcode 4.3 and above

Prior to version 4.3 of Xcode, Apple bundled a load of command line tools with it that are used to compile native binaries, including PHP extensions. However, as of version 4.3, these tools are not bundled by default. Therefore, if you require these tools you need to take one of two actions:

1. If you already have Xcode 4.3 installed, go into the Components tab of the Download preferences panel and make sure Command Line Tools are selected

Xcode CLI tools installation

OR

2. Download and install the command line tools as an independent package from either;

a. Apple (requires Apple ID)
b. GitHub

Once you have the command line tools installed, you are able to compile native binaries.

If you found this post useful, it would be great if you could Like my Facebook page using the button in the sidebar. Thanks!

Glen Scott

I’m a freelance software developer with more than 10 years’ professional experience in web development. I specialise in creating tailor-made, web-based systems that can help your business run like clockwork. I am the Managing Director of Yellow Square Development and the founder of FreelanceDevLeads, a service that sources quality freelance leads for developers.

More Posts

Follow Me:
TwitterFacebookLinkedIn

5 thoughts on “Compiling PHP extensions using Xcode 4.3 and above

  1. Pingback: Install mcrypt PHP extension on Mac OS X Lion | Glen Scott - Keeping it simple

  2. Pingback: Installing Alternative PHP Cache (APC) on Mac OS X Lion | Glen Scott - Keeping it simple

  3. Pingback: mac 10.8에서 mcrypt관련 php오류난 경우 « June

  4. Djive Belmere

    Thank You very much Glen I found how Install mcrypt PHP extension on Mac OS X Lion and how to activate "make" command. All is clear and simply explicate for a french guy who master the english language. Congratulations. Djive

Leave a Reply