Install bochs in centos

Source: Internet
Author: User
Tags gpg

Yum install GCC bochs is written in C ++ and GCC is used for source code compilation.

yum groupinstall "Development Tools"yum install ncurses-devel zlib-devel texinfo gtk+-devel gtk2-devel qt-devel tcl-devel tk-devel kernel-headers kernel-devel

Otherwise there will be an error in configure and make (refer to the http://www.cnblogs.com/dczsf/archive/2011/03/08/1977019.html)

Because centos is server-oriented, some graphic desktop software is not displayed when you use Yum to install it. In this case, you can add an unofficial software library, such as rpmforge:

Download and install the rpmforge RPM package

1. Download The rpmforge RPM package

[Root @ centos ~] # Wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm

2. Install the PGP key of the Dag.

[Root @ centos ~] # Rpm -- import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt

3. Verify rpmforge's RPM file package

[Root @ centos ~] # Rpm-k/home/downloads/rpmforge-release-0.5.2-2.el6.rf.i686.rpm

4. Install rpmforge's RPM package

[Root @ centos ~] # Rpm-I/homedownloads/rpmforge-release-0.5.2-2.el6.rf.i686.rpm

 

5. Set the source level in the/etc/yum. Repos. d/rpmforge. Repo file to add priority = 12.

 

For example, the content of my rpmforge. Repo file:

### Name: rpmforge RPM repository for Red Hat Enterprise 5-Dag

### URL: http://rpmforge.net/

[Rpmforge]

Name = Red Hat Enterprise $ releasever-rpmforge.net-Dag

Baseurl = http://apt.sw.be/redhat/el5/en/?basearch/rpmforge

Using list = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge

# Prepare list = file: // etc/yum. Repos. d/mirrors-rpmforge

Enabled = 1

Protect = 0

Gpgkey = file: // etc/pki/rpm-GPG-key-rpmforge-Dag

Gpgcheck = 1

Priority = 12

When make has the following error:

When debugger of bochs is enabled, make will see the following error After configuring./configure -- enable-Debugger:

GUI/libgui. A (gtk_enh_dbg_osdep.o): In function 'maketkthreads ()':
/Home/bcos/desktop/bochs-test/bochs-2.4.pre1/GUI/gtk_enh_dbg_osdep.cc: 2120: Undefined reference to 'pthread _ create'
Collect2: LD returned 1 exit status
Make: *** [bochs] Error 1

Solution 1: Change "makefile. In" 92 and 93 to "cc = @ CC @-pthread" and "cxx = @ cxx @-pthread"

Solution 2: lines 183 in makefile. In

Bochs @ EXE @: @ iodev_lib_var @ debugger_var @\
CPU/libcpu. A memory/libmemory. a gui/libgui. \
@ Disasm_var @ instrument_var @ $ (bx_objs )\
$ (Simx86_objs) @ fpu_var @ gdbstub_var @ plugin_var @
@ Link @ export_dynamic @ $ (bx_objs) $ (simx86_objs )\
@ Iodev_lib_var @ debugger_var @ CPU/libcpu. A memory/libmemory. a gui/libgui. \
@ Disasm_var @ instrument_var @ plugin_var @\
@ Gdbstub_var @ fpu_var @\
@ Nonplugin_gui_link_opts @\
$ (Mch_link_flags )\
$ (Simx86_link_flags )\
$ (Readline_lib )\
$ (Extra_link_opts )\
$ (Libs)

Add \-lpthread to the end of $ (libs) as follows:

Bochs @ EXE @: @ iodev_lib_var @ debugger_var @\
CPU/libcpu. A memory/libmemory. a gui/libgui. \
@ Disasm_var @ instrument_var @ $ (bx_objs )\
.
.
.
$ (Libs )\
-Lpthread

It can be compiled.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.