# building Percona server on osx

**URL:** <https://forums.percona.com/t/building-percona-server-on-osx/4695>\
**Category:** Other MySQL® Questions\
**Created:** [January 29, 2016, 9:56am UTC](https://forums.percona.com/t/building-percona-server-on-osx/4695 "2016-01-29T09:56:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![robertmeyer](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@robertmeyer](https://forums.percona.com/u/robertmeyer)\
**Post date:** [January 29, 2016, 9:56am UTC](https://forums.percona.com/t/building-percona-server-on-osx/4695/1 "2016-01-29T09:56:56Z")

</div>

I’m trying to build Percona server on osx, using ‘cmake’ (something I’m not familar with),  
and having issues.

using the command line specified in the documentation:

cmake . -DCMAKE\_BUILD\_TYPE=RelWithDebInfo -DBUILD\_CONFIG=mysql\_release -DFEATURE\_SET=community

I get the following errors from the cmake phase:

– Performing Test HAVE\_C\_-Wno-error=tautological-constant-out-of-range-compare - Failed  
– Performing Test HAVE\_CXX\_-Wno-error=tautological-constant-out-of-range-compare - Failed  
– Performing Test HAVE\_C\_-Wno-error=extern-c-compat - Failed  
– Performing Test HAVE\_CXX\_-Wno-error=extern-c-compat - Failed

and I get the following errors when attempting to build (there are more, but I’m just posting  
a few since they’re similar):

/Users/bobmeyer/Devel/tools/percona/percona-server-5.6.28-76.1/storage/tokudb/tokudb\_thread.h:211:13: error: use of  
undeclared identifier ‘pthread\_mutex\_timedlock’  
int r = pthread\_mutex\_timedlock(&\_mutex, &waittime);

/Users/bobmeyer/Devel/tools/percona/percona-server-5.6.28-76.1/storage/tokudb/tokudb\_thread.h:260:17: error: use of  
undeclared identifier ‘pthread\_rwlock\_timedrdlock’  
while ((r = pthread\_rwlock\_timedrdlock(&\_rwlock, &waittime)) != 0) {

In file included from /Users/bobmeyer/Devel/tools/percona/percona-server-5.6.28-76.1/storage/tokudb/ha\_tokudb.cc:31:  
In file included from /Users/bobmeyer/Devel/tools/percona/percona-server-5.6.28-76.1/storage/tokudb/ha\_tokudb.h:31:  
/Users/bobmeyer/Devel/tools/percona/percona-server-5.6.28-76.1/storage/tokudb/tokudb\_background.h:30:10: fatal error:  
‘atomic’ file not found

#include   
^  
7 warnings and 6 errors generated.  
make[2]: \*\*\* [storage/tokudb/CMakeFiles/tokudb.dir/ha\_tokudb.cc.o] Error 1  
make[1]: \*\*\* [storage/tokudb/CMakeFiles/tokudb.dir/all] Error 2  
make: \*\*\* [all] Error 2

I’m running osx 10.7.5, with xcode 4.6.3, and gcc 4.9.1

thanks in advance for any assistance.

rm.

---

<div class="post-metadata">

**Author:** ![George\_Lorch](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/george_lorch/32/1108_2.png) [@George\_Lorch](https://forums.percona.com/u/George_Lorch)\
**Post date:** [February 22, 2016, 10:22pm UTC](https://forums.percona.com/t/building-percona-server-on-osx/4695/2 "2016-02-22T22:22:25Z")

</div>

Percona Server and TokuDB are not supported on OS/X. This build error is TokuDB specific and can be avoided by not building TokuDB, add “-DWITHOUT\_TOKUDB=1” to your cmake and you will progress further.

–  
George O. Lorch III  
Software Engineer, Percona
