操作系统:ubuntu13.04
内核: 3.8.6
$ tar zxvf bochs-2.6.2.tar.gz
$ ./configure --enable-debugger --enable-disasm ## 打开编译功能和反汇编
$ make
$ sudo make install
关于make报错:
1,没有多线程库
/usr/bin/ld: gui/libgui.a(gtk_enh_dbg_osdep.o): undefined reference to symbol 'pthread_create@@GLIBC_2.1'
/usr/bin/ld: note: 'pthread_create@@GLIBC_2.1' is defined in DSO /lib/libpthread.so.0 so try adding it to the linker command line
/lib/libpthread.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make: *** [bochs] Error 1
解决方法:
打开Makefile,在92行左右找到 LIBS = 。。。一行,在这一行最后面添加 -lpthread
(注意修改完成之后不能重新configure,不然添加的-lpthread会消失,添加后直接make就可以了)
可能遇到下面的问题:
1.ERROR: X windows gui was selected, but X windows libraries were not found.解决办法: sudo apt-get install xorg-dev
2.ERROR: pkg-config was not found, or unable to access the gtk+-2.0 package.
解决办法:sudo apt-get install libgtk2.0-dev