ITPub博客

首页 > 数据库 > MySQL > 使用ddd编译mysql源代码

使用ddd编译mysql源代码

原创 MySQL 作者:Michael_DD 时间:2015-08-27 11:08:56 0 删除 编辑
使用ddd编译mysql源代码


环境:
linux 6.4  64
ddd-3.3.12.tar.gz
gcc 4.4


1.下载ddd
http://ftp.gnu.org/gnu/ddd/
下载最新版本的,不然会有很多乱七八糟的问题,之前3.3的一堆问题。


2.安装rpm包
yum install flex
yum install openmotif
yum install openmotif-devel

3.安装
./configure
make
make install

4.使用


报错:
1.
iostream.h:No such file or directory
binders.h: No such file or directory  4.4.4有
看看该装的库也装了,还是不行
将/usr/include/c++/4.2/backward/ 下的东西全复制过去 将就对付着编译过去了(后期会不会有问题不敢保证!)

2.
在64位的机器上, configure 不过去. 错误信息是:
ltconfig: you must specify a host type if you use `--no-verify'
Try `ltconfig --help' for more information.
configure: error: libtool configure failed
其实真正有用的是上面的
checking host system type... Invalid configuration `x86_64-unknown-linux-gnu': machine `x86_64-unknown' not recognized
checking build system type... Invalid configuration `x86_64-unknown-linux-gnu': machine `x86_64-unknown' not recognized
大意是configure认不出系统的类型, 然后出现下面的 you must specify a host type. 解决方法是:
用 /usr/share/libtool/config/config.guess 覆盖(当前编译代码目录下的) config.guess
用 /usr/share/libtool/config/config.sub 覆盖 (当前编译代码目录下的)config.sub
[root@mysqlsource ddd-3.3]# cp /usr/share/libtool/config/config.sub config.sub 
cp: overwrite `config.sub'? y
[root@mysqlsource ddd-3.3]# cp /usr/share/libtool/config/config.guess config.guess 
cp: overwrite `config.guess'? y
[root@mysqlsource ddd-3.3]# 
这样configure就可以猜出系统的类型

3.
报错:
strclass.C:1546: error: ‘EOF’ was not declared in this scope
strclass.C:1559: error: ‘EOF’ was not declared in this scope
strclass.C: In function ‘int readline(std::istream&, string&, char, int)’:
strclass.C:1589: error: ‘EOF’ was not declared in this scope
strclass.C:1602: error: ‘EOF’ was not declared in this scope

解决办法:
[root@mysqlsource ddd-3.3.12]# find -name strclass.C
./ddd/strclass.C
[root@mysqlsource ddd-3.3.12]# cd ddd
[root@mysqlsource ddd]# vi strclass.C

加入头文件:
#include <stdio.h>
因为EOF、stderr等都是在这个文件中定义的

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29500582/viewspace-1783858/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: Linux 配置防火墙
请登录后发表评论 登录
全部评论

注册时间:2014-02-22

  • 博文量
    326
  • 访问量
    2671972