ubuntu 11.10 x64編譯安裝bochs2.5.1

來源:互聯網
上載者:User

眾所周知Apt-get安裝的bochs是不帶調試功能的,必須通過源碼編譯加上--enable-debugger才行。
 
現在ubuntu源上的bochs版本是2.4.6,但是bochs網站已經發布了2.5.1(http://bochs.sourceforge.net/ ),因此我們直接編譯安裝bochs2.5.1。
 
 
 
編譯源碼
從http://bochs.sourceforge.net/ 下載最新的源碼並解壓
./configure --with-x11 --with-wx --enable-debugger --enable-disasm --enable-all-optimizations --enable-readline --enable-long-phy-address --enable-debugger-gui
如果是64位系統上編譯bochs,一定要加上--enable-long-phy-address選項,否則運行中會出現bochs exception(): 3rd (13) exception with no resolution, shutdown status is
make
$cp bochs bochsdbg,編譯沒有產生bochsdbg,所以這裏手動拷貝一份
sudo make install
編譯bochs源碼報錯的處理
checking for C compiler default output file name… configure: error: C compiler cannot create       executables
sudo apt-get install  build-essential libc6-dev
ERROR: X windows gui was selected, but X windows libraries were not found.
sudo apt-get install xorg-dev libgtk2.0-dev
install: cannot stat `./bios/VGABIOS*':
在源碼的bios目錄下(/xxxx/bochs-2.5.1/bios),建立符號連結ln -s /usr/share/vgabios/vgabios.bin VGABIOS-lgpl-latest
undefined reference to 'XStringToKeysym'
configure時加上--with-x11,--with-x11 --with-wx --enable-debugger --enable-disasm --enable-all-optimizations --enable-readline --enable-long-phy-address --enable-debugger-gui
如果configure時,提示--with-wx有問題,sudo apt-get install libwxgtk2.8-dev libx11-xcb-dev
因為帶debug的bochs,每次啟動都會開啟調試視窗,有時我們只是想看看程式的執行結果,因此源碼make install以後,再通過sudo apt-get install bochs安裝普通bochs
普通安裝的bochs在/usr/bin/bochs,而源碼安裝的在/usr/local/bin/bochs,/usr/local/bin在PATH中的優先順序比/usr/bin高,因此每次執行bochs實際執行的是源碼安裝的那個,我們可以把/usr/local/bin/bochs重新命名。
這樣保證我們執行bochs時是普通安裝的,執行bochsdbg是源碼安裝的。
源碼安裝使用中遇到的問題
(.:7444): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
sudo apt-get install gtk2-engines-pixbuf  解決
使用過程中死機(-_-!)
config_interface和display_library注釋掉
或者config_interface = textconfig,display_library=x, options="gui_debug" ,總之別用wx
dlopen failed for module 'x': file not found
sudo apt-get install bochs-x
 
 
bochs2.5.1設定檔的樣本是源碼目錄下的.bochsrc


摘自 如煙海的專欄

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.