ubuntu14.04中安装配置bochs详解(1)
ubuntu14.04中安装配置bochs详解(1)
捣弄了好久了,现在终于有点上路的感觉了。。。嘿嘿
先说下自己的搞的配置:系统是ubuntu14.04LTS64位的,安装的是:bochs-2.4.5,采用的是源码编译的方式来安装的ps:本来想在命令行中直接sudo apt-get install bochs的,试了几次,好像都不行,就没弄了。听说,命令行下安装的没有调试功能)。
不多废话了,开始安装:
1.先去http://nchc.dl.sourceforge.net/project/bochs/bochs/2.4.5/bochs-2.4.5.tar.gz 下载bochs-2.4.5.tar.gz
2.解压下载的源代码:
- sudo tar zxvf bochs-2.4.5.tar.gz
3.进入bochs-2.4.5目录,运行configure脚本,它会测试你的机器,C/C++编译器以及一些库,用来判断何种配置适合于你的机器。运行:
- sudo ./configure --enable-debugger --enable-disasm
上面--enable-debugger --enable-disasm 是可选项,这两个是开启调试和反汇编功能)
4.第3步正确运行后,会产生一个Makefile文件,然后:
- sudo make
5.安装:
- sudo make install
至此,bochs安装已经结束。下面是编译安装过程中可能出现的一些问题及解决方法:
错误A.configure: error: C++ preprocessor "/lib/cpp" fails sanity check
因为Bochs是用C++写的,所以这里要安装GNU gcc/g++编译器。
解决办法:
- sudo apt-get install build-essential
- sudo apt-get install g++
错误B.checking for default gui on this platform... x11
ERROR: X windows gui was selected, but X windows libraries were not found.
解决办法:
- sudo apt-get install xorg-dev
错误C.ERROR: pkg-config was not found, or unable to access the gtk+-2.0 package.
解决办法:
- sudo apt-get install libgtk2.0-dev
错误D.
- make的时候提示 /usr/bin/ld: gui/libgui.a(gtk_enh_dbg_osdep.o): undefined
- reference to symbol pthread_create@@GLIBC_2.1 //
- lib/i386-linux-gnu/libpthread.so.0: error adding symbols: DSO missing
- from command line collect2: error: ld r
解决方法:
在makefile的libs中添加如下内容 :
- lz -lrt -lm -lpthread
很晚了,明天再来写配置方面的东西。。。。
评论暂时关闭