Building MySql 5.5.14 at Mac Os X 10.7 Lion with Xcode 4

Building MySql 5.5.14 at Mac Os X 10.7 Lion with Xcode 4

When I updated my Mac Os X to the 10.7 version, I have two very dispointed surprises:
First, the “old” Xcode 4 was not running, it is necessary to update to a newer version, a very nice 3 Gb download.
Second, you open the Xcode, choice to build/install and when you run the mysqld, seg fault!

You spend 1 hours trying to figure out what happend, checking configuration, debugging, and you find and weird error when using pthread.

What is happened:
Xcode 4.1 pthread library was a bug (or feature) that the pthread_init function is not exported or exists, I do not know very well.

How to fix:
Open the configure.cmake file from the MySql source, go to the line 394, that should be:

change it to:


Generate again the configurations for Xcode:
cmake . -G “Xcode”

Open the project at the Xcode, build install or run the mysqld and be happy :-)

Ps: I tested with MySql 5.5.14 and Xcode 4.1


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s