Percona5.7 cmake在centos 7上失败

Percona5.7 cmake在centos 7上失败,cmake,percona,Cmake,Percona,我从github获得了percona服务器的源代码。我安装了boost 1.59和gcc-c ncurses-devel。我进入percona服务器的目录并运行“cmake--DWITH_BOOST=/data/BOOST”,但出现以下错误。我找不到解决办法,所以来到这里。谢谢 -- Performing Test HAVE_UNUSED_PARAMETER - Success -- Googletest was not found. gtest-based unit tests will b

我从github获得了percona服务器的源代码。我安装了boost 1.59和gcc-c ncurses-devel。我进入percona服务器的目录并运行“cmake--DWITH_BOOST=/data/BOOST”,但出现以下错误。我找不到解决办法,所以来到这里。谢谢

-- 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;numa

-- 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;numa;myisa m_embedded;myisammrg_embedded;partition_embedded;n 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;ngram_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".

打开/home/teg/Downloads/percona-server-5.7/CMakeFiles/CMakeError.log,发现以下错误。错误太多,我只列出了部分错误。

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
运行构建命令:/usr/bin/gmake“cmTryCompileExec1295500228/fast”
/usr/bin/gmake-f CMakeFiles/cmTryCompileExec1295500228.dir/build.make CMakeFiles/cmTryCompileExec1295500228.dir/build
gmake[1]:进入目录“/home/teg/Downloads/percona-server-5.7/CMakeFiles/cmakemp”
/usr/bin/cmake-E cmake_进度报告/home/teg/Downloads/percona-server-5.7/CMakeFiles/cmakemp/CMakeFiles 1
构建C对象cmakfiles/cmTryCompileExec1295500228.dir/CheckSymbolExists.C.o
/usr/bin/cc-o CMakeFiles/cmTryCompileExec1295500228.dir/CheckSymbolExists.c.o-c/home/teg/Downloads/percona-server-5.7/CMakeFiles/cmakemp/CheckSymbolExists.c
链接C可执行文件cmTryCompileExec1295500228
/usr/bin/cmake-E cmake_link_脚本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:在函数“main”中:
CheckSymbolExists.c.text+0x16):对“pthread_create”的未定义引用
collect2:错误:ld返回了1个退出状态
gmake[1]:离开目录“/home/teg/Downloads/percona-server-5.7/CMakeFiles/cmakemp”
gmake[1]:***[cmTryCompileExec1295500228]错误1
gmake:**[cmTryCompileExec1295500228/fast]错误2
File/home/teg/Downloads/percona-server-5.7/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
运行构建命令:/usr/bin/gmake“cmTryCompileExec1916958743/fast”
/usr/bin/gmake-f CMakeFiles/cmTryCompileExec1916958743.dir/build.make CMakeFiles/cmTryCompileExec1916958743.dir/build
gmake[1]:进入目录“/home/teg/Downloads/percona-server-5.7/CMakeFiles/cmakemp”
/usr/bin/cmake-E cmake_进度报告/home/teg/Downloads/percona-server-5.7/CMakeFiles/cmakemp/CMakeFiles 1
构建C对象cmakfiles/cmTryCompileExec1916958743.dir/CheckFunctionExists.C.o
/usr/bin/cc-DCHECK\u FUNCTION\u EXISTS=pthread\u create-o CMakeFiles/cmTryCompileExec1916958743.dir/CheckFunctionExists.c.o-c/usr/share/cmake/Modules/CheckFunctionExists.c
链接C可执行文件cmTryCompileExec1916958743
/usr/bin/cmake-E cmake_link_脚本CMakeFiles/cmTryCompileExec1916958743.dir/link.txt--verbose=1
/usr/bin/cc-DCHECK\u FUNCTION\u EXISTS=pthread\u创建CMakeFiles/cmTryCompileExec1916958743.dir/CheckFunctionExists.c.o-o cmTryCompileExec1916958743-rdynamic-lpthreads
/usr/bin/ld:找不到-lpthreads
collect2:错误:ld返回了1个退出状态
gmake[1]:离开目录“/home/teg/Downloads/percona-server-5.7/CMakeFiles/cmakemp”
gmake[1]:***[cmTryCompileExec1916958743]错误1
gmake:**[cmTryCompileExec1916958743/fast]错误2
确定功能楼层是否存在失败,输出如下:
更改目录:/home/teg/Downloads/percona-server-5.7/CMakeFiles/CMakeTmp
运行构建命令:/usr/bin/gmake“cmTryCompileExec1596718479/fast”
/usr/bin/gmake-f CMakeFiles/cmTryCompileExec1596718479.dir/build.make CMakeFiles/cmTryCompileExec1596718479.dir/build
gmake[1]:进入目录“/home/teg/Downloads/percona-server-5.7/CMakeFiles/cmakemp”
/usr/bin/cmake-E cmake_进度报告/home/teg/Downloads/percona-server-5.7/CMakeFiles/cmakemp/CMakeFiles 1
构建C对象cmakfiles/cmTryCompileExec1596718479.dir/CheckFunctionExists.C.o
/usr/bin/cc-DCHECK\u FUNCTION\u EXISTS=floor-o CMakeFiles/cmTryCompileExec1596718479.dir/CheckFunctionExists.c.o-c/usr/share/cmake/Modules/CheckFunctionExists.c
:0:23:警告:内置功能“floor”的类型冲突[默认情况下已启用]
/usr/share/cmake/Modules/CheckFunctionExists.c:3:6:注意:在宏“CHECK\u FUNCTION\u EXISTS”的扩展中
char CHECK_函数_EXISTS();
^
链接C可执行文件cmTryCompileExec1596718479
/usr/bin/cmake-E cmake_link_脚本CMakeFiles/cmTryCompileExec1596718479.dir/link.txt--verbose=1
/usr/bin/cc-DCHECK\u FUNCTION\u EXISTS=楼层CMakeFiles/cmTryCompileExec1596718479.dir/CheckFunctionExists.c.o-o cmTryCompileExec1596718479-rdynamic
cmakfiles/cmTryCompileExec1596718479.dir/CheckFunctionExists.c.o:在函数“main”中:
CheckFunctionExists.c.text+0x15):对“floor”的未定义引用
collect2:错误:ld返回了1个退出状态
gmake[1]:离开目录“/home/teg/Downloads/percona-server-5.7/CMakeFiles/cmakemp”
gmake[1]:***[cmTryCompileExec1596718479]错误1
gmake:**[cmTryCompileExec1596718479/fast]错误2

您似乎还没有安装所有需要的依赖项

以下是所需的步骤:

sudo yum install epel-release
sudo yum install git gcc gcc-c++ openssl check cmake bison boost-devel asio-devel 
libaio-devel ncurses-devel readline-devel pam-devel wget perl-Env time numactl-devel 
rpmdevtools rpm-build curl-devel
git clone https://github.com/percona/percona-server.git
cd percona-server
git submodule init
git submodule update
cmake . -DDOWNLOAD_BOOST=1 -DWITH_BOOST=<PATCH_TO_BOOST_DIR>
sudo yum安装epel版本
sudo yum安装git gcc gcc-c++openssl check cmake bison boost devel asio devel
libaio-devel-ncurses-devel-readline-devel-pam-devel-wget-perl-Env-time-numactl-devel
rpmdevtools rpm build curl-devel
git克隆https://github.com/percona/percona-server.git
cd percona服务器
初始化子模块
git子模块更新
克马克-DDOWNLOAD\u BOOST=1-带\u BOOST的数据=

然后boost将自动下载

谢谢您的介绍。我已经解决了我的问题!