CMake时候出错排查

CMAKE的时候容易出现的报错:

cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_EXTRA_CHARSETS=all -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_READLINE=1 -DENABLED_LOCAL_INFILE=1 -DMYSQL_DATADIR=/data -DMYSQL_USER=mysql

容易出现的报错:
– MySQL 5.5.53
– Packaging as: mysql-5.5.53-Linux-x86_64
– 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:31 (MESSAGE):
no suitable type found
Call Stack (most recent call first):
configure.cmake:523 (TEST_BIG_ENDIAN)
CMakeLists.txt:350 (INCLUDE)

解决办法:[root@xinsz08 mysql-5.5.53]# rm -rf CMakeCache.txt

CMAKE编译参数说明
参数说明:
-DCMAKE_INSTALL_PREFIX 数据文件存放目录
-DMYSQL_UNIX_ADDR sock文件路径
-DDEFAULT_CHARSET 默认字符集
-DDEFAULT_COLLATION 默认字符校对
-DWITH_EXTRA_CHARSETS 扩展字符支持 默认all
-DWITH_storage_STORAGE_ENGINE 存储引擎的支持,默认支持MyISAM,MERGE,MEMORY,CVS存储引擎
-DENABLED_LOCAL_INFILE=1 启用加载本地数据
-DMYSQL_DATADIR 数据存放目录
-DMYSQL_USER mysql运行用户

上一篇:RabbitMQ安装(centos7)


下一篇:shell脚本实战之编译mysql