# Percona server 5.7 cmake failed on centos 7

**URL:** <https://forums.percona.com/t/percona-server-5-7-cmake-failed-on-centos-7/7487>\
**Category:** Percona Server for MySQL 5.7\
**Created:** [June 23, 2018, 11:00am UTC](https://forums.percona.com/t/percona-server-5-7-cmake-failed-on-centos-7/7487 "2018-06-23T11:00:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jacklee](https://avatars.discourse-cdn.com/v4/letter/j/7cd45c/32.png) [@jacklee](https://forums.percona.com/u/jacklee)\
**Post date:** [June 23, 2018, 11:00am UTC](https://forums.percona.com/t/percona-server-5-7-cmake-failed-on-centos-7/7487/1 "2018-06-23T11:00:37Z")

</div>

I get the source code of percona-server from github. And I install boost 1.59 and gcc gcc-c ncurses-devel. I enter the directory of percona-server and run “cmake --DWITH\_BOOST=/data/boost” but get the following error. I cannot find some solution so I came to here. Thanks!!

– Performing Test HAVE\_UNUSED\_PARAMETER - Success

– Googletest was not found. gtest-based unit tests will be disabled. You can run cmake . -DENABLE\_DOWNLOADS=1 to automatically download and build required components from source.

– If you are inside a firewall, you may need to use an https proxy: export https\_proxy=[http://example.com:80](http://example.com:80)

– Performing Test HAVE\_MISLEADING\_INDENTATION

– Performing Test HAVE\_MISLEADING\_INDENTATION - Failed

– executable target mysqld debug\_target /home/teg/Downloads/debug/sql/mysqld

– Library mysqlserver depends on OSLIBS -lpthread;/usr/lib64/libz.so;m;rt;crypt;dl;aio;uma

– MERGE\_CONVENIENCE\_LIBRARIES TARGET mysqlserver

– MERGE\_CONVENIENCE\_LIBRARIES LIBS dbug;strings;regex;mysys;mysys\_ssl;vio;/usr/lib64/libz.so;yassl;taocrypt;crypt;dl;archive\_embedded;b lackhole\_embedded;csv\_embedded;federated\_embedded; heap\_embedded;innobase\_embedded;lz4\_lib;uma;myisa m\_embedded;myisammrg\_embedded;partition\_embedded; gram\_parser\_embedded;sql\_embedded

– MERGE\_CONVENIENCE\_LIBRARIES MYLIBS dbug;strings;regex;mysys;mysys\_ssl;vio;yassl;taocr ypt;archive\_embedded;blackhole\_embedded;csv\_embedd ed;federated\_embedded;heap\_embedded;innobase\_embed ded;lz4\_lib;myisam\_embedded;myisammrg\_embedded;par tition\_embedded;gram\_parser\_embedded;sql\_embedded

– library target mysqlserver debug\_target /home/teg/Downloads/debug/archive\_output\_directory/libmysqld.a

– INSTALL perconaserverclient.pc lib/pkgconfig

– Skipping deb packaging on unsupported platform Core.

– CMAKE\_BUILD\_TYPE: RelWithDebInfo

– COMPILE\_DEFINITIONS: \_GNU\_SOURCE;\_FILE\_OFFSET\_BITS=64;HAVE\_CONFIG\_H;HAV E\_LIBEVENT1

– CMAKE\_C\_FLAGS: -Wall -Wextra -Wformat-security -Wvla -Wwrite-strings -Wdeclaration-after-statement

– CMAKE\_CXX\_FLAGS: -std=gnu++03 -Wall -Wextra -Wformat-security -Wvla -Woverloaded-virtual -Wno-unused-parameter

– CMAKE\_C\_LINK\_FLAGS:

– CMAKE\_CXX\_LINK\_FLAGS:

– CMAKE\_C\_FLAGS\_RELWITHDEBINFO: -O3 -D\_FORTIFY\_SOURCE=2 -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -DDBUG\_OFF -DNDEBUG

– CMAKE\_CXX\_FLAGS\_RELWITHDEBINFO: -O3 -D\_FORTIFY\_SOURCE=2 -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -DDBUG\_OFF -DNDEBUG

– Configuring incomplete, errors occurred!

See also “/home/teg/Downloads/percona-server-5.7/CMakeFiles/CMakeOutput.log”.

See also “/home/teg/Downloads/percona-server-5.7/CMakeFiles/CMakeError.log”.

… …

And I open the /home/teg/Downloads/percona-server-5.7/CMakeFiles/CMakeError.log and find the following errors. There are too many errors and I only list part of it.

Run Build Command:/usr/bin/gmake “cmTryCompileExec1295500228/fast”  
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec1295500228.dir/build.make CMakeFiles/cmTryCompileExec1295500228.dir/build  
gmake[1]: Entering directory `/home/teg/Downloads/percona-server-5.7/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /home/teg/Downloads/percona-server-5.7/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec1295500228.dir/CheckSymbolExists.c.o /usr/bin/cc -o CMakeFiles/cmTryCompileExec1295500228.dir/CheckSymbolExists.c.o -c /home/teg/Downloads/percona-server-5.7/CMakeFiles/CMakeTmp/CheckSymbolExists.c Linking C executable cmTryCompileExec1295500228 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec1295500228.dir/link.txt --verbose=1 /usr/bin/cc CMakeFiles/cmTryCompileExec1295500228.dir/CheckSymbolExists.c.o -o cmTryCompileExec1295500228 -rdynamic CMakeFiles/cmTryCompileExec1295500228.dir/CheckSymbolExists.c.o: In function `main’:  
CheckSymbolExists.c:(.text+0x16): undefined reference to `pthread_create' collect2: error: ld returned 1 exit status gmake[1]: Leaving directory `/home/teg/Downloads/percona-server-5.7/CMakeFiles/CMakeTmp’  
gmake[1]: \*\*\* [cmTryCompileExec1295500228] Error 1  
gmake: \*\*\* [cmTryCompileExec1295500228/fast] Error 2

File /home/teg/Downloads/percona-server-5.7/CMakeFiles/CMakeTmp/CheckSymbolExists.c:

Run Build Command:/usr/bin/gmake “cmTryCompileExec1916958743/fast”  
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec1916958743.dir/build.make CMakeFiles/cmTryCompileExec1916958743.dir/build  
gmake[1]: Entering directory `/home/teg/Downloads/percona-server-5.7/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /home/teg/Downloads/percona-server-5.7/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec1916958743.dir/CheckFunctionExists.c.o /usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTryCompileExec1916958743.dir/CheckFunctionExists.c.o -c /usr/share/cmake/Modules/CheckFunctionExists.c Linking C executable cmTryCompileExec1916958743 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec1916958743.dir/link.txt --verbose=1 /usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTryCompileExec1916958743.dir/CheckFunctionExists.c.o -o cmTryCompileExec1916958743 -rdynamic -lpthreads /usr/bin/ld: cannot find -lpthreads collect2: error: ld returned 1 exit status gmake[1]: Leaving directory `/home/teg/Downloads/percona-server-5.7/CMakeFiles/CMakeTmp’  
gmake[1]: \*\*\* [cmTryCompileExec1916958743] Error 1  
gmake: \*\*\* [cmTryCompileExec1916958743/fast] Error 2

Determining if the function floor exists failed with the following output:  
Change Dir: /home/teg/Downloads/percona-server-5.7/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/gmake “cmTryCompileExec1596718479/fast”  
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec1596718479.dir/build.make CMakeFiles/cmTryCompileExec1596718479.dir/build  
gmake[1]: Entering directory `/home/teg/Downloads/percona-server-5.7/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /home/teg/Downloads/percona-server-5.7/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec1596718479.dir/CheckFunctionExists.c.o /usr/bin/cc -DCHECK_FUNCTION_EXISTS=floor -o CMakeFiles/cmTryCompileExec1596718479.dir/CheckFunctionExists.c.o -c /usr/share/cmake/Modules/CheckFunctionExists.c <command-line>:0:23: warning: conflicting types for built-in function ‘floor’ [enabled by default] /usr/share/cmake/Modules/CheckFunctionExists.c:3:6: note: in expansion of macro ‘CHECK_FUNCTION_EXISTS’ char CHECK_FUNCTION_EXISTS(); ^ Linking C executable cmTryCompileExec1596718479 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec1596718479.dir/link.txt --verbose=1 /usr/bin/cc -DCHECK_FUNCTION_EXISTS=floor CMakeFiles/cmTryCompileExec1596718479.dir/CheckFunctionExists.c.o -o cmTryCompileExec1596718479 -rdynamic CMakeFiles/cmTryCompileExec1596718479.dir/CheckFunctionExists.c.o: In function `main’:  
CheckFunctionExists.c:(.text+0x15): undefined reference to `floor' collect2: error: ld returned 1 exit status gmake[1]: Leaving directory `/home/teg/Downloads/percona-server-5.7/CMakeFiles/CMakeTmp’  
gmake[1]: \*\*\* [cmTryCompileExec1596718479] Error 1  
gmake: \*\*\* [cmTryCompileExec1596718479/fast] Error 2
