一、环境
操作系统:lubuntu
mysql版本:mysql5.1.34
二、问题
1、No curses/termcap library found
原因:缺少ncurses库
解决方法:apt-get install libncurses5-dev
2、configure: error: C++ preprocessor "/lib/cpp" fails sanity check
原因:C++编译器相关的package没有安装
解决办法:apt-get install build-essential
注:其他版本linux可以用yum install glibc-headers gcc-c++
3、do_abi_check错误
原因:mysql的bug,mysql 5.1.14以上版本跟gcc 4.5不太兼容导致的,而且lubuntu上安装的就是gcc4.5
解决方法:打开Makefile,删除红色部分
do_abi_check:
set -ex; \
for file in $(abi_headers); do \
gcc -E -nostdinc -dI \
-I$(top_srcdir)/include \
-I$(top_srcdir)/include/mysql \
-I$(top_srcdir)/sql \
-I$(top_builddir)/include \
-I$(top_builddir)/include/mysql \
-I$(top_builddir)/sql \
file 2>/dev/null | \
/bin/sed -e '/^# /d' \
-e '/^[ ]*
/d' \
-e '/^#pragma GCC set_debug_pwd/d' \
-e '/^#ident/d' > \
$(top_builddir)/abi_check.out; \
/usr/bin/diff -w $$file.pp $(top_builddir)/abi_check.out; \
/bin/rm $(top_builddir)/abi_check.out; \
done
4、Wrong formatspecifier of error message string for error 'ER_READY' in language 'est'
Failed to parse input file ../sql/share/errmsg.txt
Makefile:1117: recipe for target '../include/mysqld_error.h' failed
make[1]: *** [../include/mysqld_error.h] Error 1
原因:mysql的bug,parse_text_line()函数中使用的strmov(pos - 1, pos)在linux下映射到stpcpy()函数,该函数要求源字符串和目标字符串内存不能重叠,并且要求目标字符串数组空间足够大,而恰好mysql中恰好两个字符串内存重叠了。
解决方法:mysql补丁内容