Percona server 5.7 cmake failed on centos 7

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

– 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