MySQL 5.6源码编译碰到的一个问题
2014-11-05 10:38
731 查看
MySQL 5.6使用CMake作为编译配置工具,笔者在CentOS 6.5上进行MySQL 5.6.21 Community Server源码编辑时,碰到了一个初级问题,现在重新回顾一下整个过程。
首先,笔者使用以下命令执行编译配置。
cmake -DCMAKE_INSTALL_PREFIX=/u01/mysql
因为gcc和gcc-c++编辑器没有安装,直接报错。
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error: your C compiler: "CMAKE_C_COMPILER-NOTFOUND" was not found. Please set CMAKE_C_COMPILER to a valid compiler path or name.
CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
接着,安装gcc和gcc-c++编辑器。
yum install gcc gcc-c++
接着,报另外一个错误。
-- Running cmake version 2.8.12.2
-- The CXX compiler identification is GNU 4.4.7
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- MySQL 5.6.21
-- Packaging as: mysql-5.6.21-Linux-i686
-- Could NOT find Threads (missing: Threads_FOUND)
-- Could NOT find Threads (missing: Threads_FOUND)
-- Check if the system is big endian
-- Searching 16 bit integer
CMake Error at /usr/share/cmake/Modules/TestBigEndian.cmake:44 (message):
no suitable type found
Call Stack (most recent call first):
configure.cmake:647 (TEST_BIG_ENDIAN)
CMakeLists.txt:416 (INCLUDE)
-- Configuring incomplete, errors occurred!
摸不到头脑,上网查了一下,说源码文件删除之后重新解压可以解决这个问题。这么做之后,CMake的运行日志比之前长,报错信息也不同了。
-- Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)
CMake Error at cmake/readline.cmake:85 (MESSAGE):
Curses library not found. Please install appropriate package,
看到是缺少另外一个软件包。
yum install ncurses-devel
再次运行CMake,报错信息还是依旧。这时,发现有报错信息中还有以下信息。
remove CMakeCache.txt and rerun cmake.On Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivates it is ncurses-devel.
按照指示,删除CMakeCache.txt之后,重新CMake即可成功。删除CMakeCache.txt即告诉CMake重新进行编译配置,其实,前面删除源码也不是必须的,只要删除CMakeCache.txt即可。
首先,笔者使用以下命令执行编译配置。
cmake -DCMAKE_INSTALL_PREFIX=/u01/mysql
因为gcc和gcc-c++编辑器没有安装,直接报错。
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error: your C compiler: "CMAKE_C_COMPILER-NOTFOUND" was not found. Please set CMAKE_C_COMPILER to a valid compiler path or name.
CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
接着,安装gcc和gcc-c++编辑器。
yum install gcc gcc-c++
接着,报另外一个错误。
-- Running cmake version 2.8.12.2
-- The CXX compiler identification is GNU 4.4.7
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- MySQL 5.6.21
-- Packaging as: mysql-5.6.21-Linux-i686
-- Could NOT find Threads (missing: Threads_FOUND)
-- Could NOT find Threads (missing: Threads_FOUND)
-- Check if the system is big endian
-- Searching 16 bit integer
CMake Error at /usr/share/cmake/Modules/TestBigEndian.cmake:44 (message):
no suitable type found
Call Stack (most recent call first):
configure.cmake:647 (TEST_BIG_ENDIAN)
CMakeLists.txt:416 (INCLUDE)
-- Configuring incomplete, errors occurred!
摸不到头脑,上网查了一下,说源码文件删除之后重新解压可以解决这个问题。这么做之后,CMake的运行日志比之前长,报错信息也不同了。
-- Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)
CMake Error at cmake/readline.cmake:85 (MESSAGE):
Curses library not found. Please install appropriate package,
看到是缺少另外一个软件包。
yum install ncurses-devel
再次运行CMake,报错信息还是依旧。这时,发现有报错信息中还有以下信息。
remove CMakeCache.txt and rerun cmake.On Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivates it is ncurses-devel.
按照指示,删除CMakeCache.txt之后,重新CMake即可成功。删除CMakeCache.txt即告诉CMake重新进行编译配置,其实,前面删除源码也不是必须的,只要删除CMakeCache.txt即可。
相关文章推荐
- 使用Maven 编译 storm 源码可能碰到下载依赖jar 的问题
- Eclipse编译Launcher源码遇到的一个问题
- Mysql 源码编译安装 ( 5.5 、5.6 共存 )
- 分布式架构高可用架构篇_06_MySQL源码编译安装(CentOS-6.7+MySQL-5.6)
- MySQL5.6源码编译安装(CentOS-6.6+MySQL-5.6)(一)
- CentOS 6.5源码编译安装MySQL 5.6
- 编译mysql 5.7 源码安装常见问题
- 源码编译安装mysql5.6报错及解决方法
- 源码编译mysql5.6
- SUSE Linux下源码编译方式安装MySQL 5.6过程分享
- Cygwin下编译MySQL源码遇到的问题解决方法
- 源码编译安装mysql5.6
- 分布式架构高可用架构篇_06_MySQL源码编译安装(CentOS-6.7+MySQL-5.6)
- mysql5.6源码编译安装
- SUSE Linux下源码编译方式安装MySQL 5.6过程分享
- ubuntu 源码MySQL 5.6安装后链接不上mysql.sock的问题
- 生产环境下 Spark1.3.1 源码编译 thrift功能 及碰到的问题
- centos6源码编译安装MySQL5.6