LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 2053|回复: 18

[求助[编译QEMU出错。

[复制链接]
发表于 2006-4-2 14:10:44 | 显示全部楼层 |阅读模式
我在  http://fabrice.bellard.free.fr/qemu/download.html 下载了 qemu-0.8.0.tar.gz 和 kqemu-0.7.2.tar.gz
然后这样做了:
tar zxvf qemu-0.8.0.tar.gz
tar zxvf kqemu-0.7.2.tar.gz
cp -R kqemu qemu-0.8.0/
cd qemu-0.8.0
./configure

出现如下信息:

ERROR: "gcc" looks like gcc 4.x
QEMU is known to have problems when compiled with gcc 4.x
It is recommended that you use gcc 3.x to build QEMU
To use this compiler anyway, configure with --disable-gcc-check

然后,我运行:

./configure --disable-gcc-check

输出信息的最后部分是:

KQEMU Linux module configuration:
kernel sources    /lib/modules/2.6.8-2-386/build
kbuild type       2.6

然后:

make

出现错误如下:
p -c -o op.o /root/qemu-0.8.0/target-i386/op.c
../dyngen -o op.h op.o
dyngen: ret or jmp expected at the end of op_bsfw_T0_cc
make[1]: *** [op.h] 错误 1
make[1]: Leaving directory `/root/qemu-0.8.0/i386-user'
make: *** [all] 错误 1

怎么回事?后来我下载了0.7.2,也不行!

另外,在 Debian 里可以通过 apt-get qemu 安装,也成功了,但不知道这样安装的有没有kqemu,听说有了它会快很多!

我的系系统是 Debian
内核是   2.6.8-2
升级到了sid.
昨天晚上弄了一个晚上,没成功,郁闷!
发表于 2006-4-2 15:52:28 | 显示全部楼层
我没装郭qemu
不过看样子好象是qemu不能用gcc4.0以上的版本编译
看一下你的电脑上还有没有其它版本的gcc
或者下一个
然后
CC=gcc-version ./configure
gcc-version是你另外版本的gcc
回复 支持 反对

使用道具 举报

发表于 2006-4-2 17:41:46 | 显示全部楼层
ERROR: "gcc" looks like gcc 4.x
QEMU is known to have problems when compiled with gcc 4.x
It is recommended that you use gcc 3.x to build QEMU
To use this compiler anyway, configure with --disable-gcc-check

为啥不按照推荐的方法呢?
回复 支持 反对

使用道具 举报

发表于 2006-4-2 17:57:48 | 显示全部楼层
装gcc-3.4-base
然后./configure --cc=gcc-3.4
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-4-2 18:15:29 | 显示全部楼层
谢了,试一下!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-4-2 23:20:04 | 显示全部楼层
完成了。
apt-get install gcc-3.3-base gcc-3.4
./configure --cc=gcc-3.4
第一次 make  没有成功,后来安装了 linux-source 就可以了
apt-get install linux-source-2.6.16
然后再
./configure --cc=gcc-3.4
make
make install

最后成功,多谢大家指点!
回复 支持 反对

使用道具 举报

发表于 2006-4-4 10:39:14 | 显示全部楼层
#gcc-3.3 --version
gcc-3.3 (GCC) 3.3.6 (Debian 1:3.3.6-13)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#./configure --cc=gcc-3.3
big/little test failed
ERROR: "gcc-3.3" looks like gcc 4.x
QEMU is known to have problems when compiled with gcc 4.x
It is recommended that you use gcc 3.x to build QEMU
To use this compiler anyway, configure with --disable-gcc-check
请高手指点一下
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-4-4 22:36:06 | 显示全部楼层
试一下  gcc-3.4
我是这样装上去的:
apt-get install gcc-3.4 gcc-3.4-base
./configure
make
make install

可能还要安装 kernel-source
我的是:
apt-get linux-source-2.6.16
回复 支持 反对

使用道具 举报

发表于 2006-4-5 09:02:05 | 显示全部楼层
我想应改是linux-source-2.6.16 没有装好
我是这样装的:
#aptitude install gcc-3.4 gcc-3.4-base
#aptitude install inux-source-2.6.16
会产生:/usr/src/linux-source-2.6.16.tar.bz2
#cd /usr/src
#tar jxvf /usr/src/linux-source-2.6.16.tar.bz2
#ln -s /usr/src/linux-source-2.6.16 linux
#cd ~/qemu-0.8.0
#./configure --cc=gcc-3.4
big/little test failed
ERROR: "gcc-3.4" looks like gcc 4.x
QEMU is known to have problems when compiled with gcc 4.x
It is recommended that you use gcc 3.x to build QEMU
To use this compiler anyway, configure with --disable-gcc-check
#./configure --cc=gcc-3.4 --disable-gcc-check
big/little test failed
Install prefix    /usr/local
BIOS directory    /usr/local/share/qemu
binary directory  /usr/local/bin
Manual directory  /usr/local/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path       /info/infocenter/download/qemu-0.8.0
C compiler        gcc-3.4
Host C compiler   gcc
make              make
host CPU          i386
host big endian   no
target list       i386-user arm-user armeb-user sparc-user ppc-user mips-user mipsel-user i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu mips-softmmu arm-softmmu
gprof enabled     no
static build      no
SDL support       no
mingw32 support   no
Adlib support     no
CoreAudio support no
ALSA support      no
DSound support    no
FMOD support      no
kqemu support     yes

KQEMU Linux module configuration:
kernel sources    /usr/src/linux
kbuild type       2.6
ERROR: QEMU requires SDL or Cocoa for graphical output
To build QEMU with graphical output configure with --disable-gfx-check
Note that this will disable all output from the virtual graphics card.
回复 支持 反对

使用道具 举报

发表于 2006-4-5 19:49:25 | 显示全部楼层
要装 SDL 或者 Cocoa。。。。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表