【问题标题】:Compiling qemu neo with gcc3.4用gcc3.4编译qemu neo
【发布时间】:2012-12-28 07:20:58
【问题描述】:

我意识到用 gcc4 编译 qemu 非常麻烦和痛苦, 所以我在我的 linux 机器上安装了 gcc-3.2 工具链,现在我正在编译 qemu, 这些是我遵循并发出输出的步骤。

root@sandun-Aspire-4741:/src/openmoko/qemu-neo1973# ./configure --target-list=arm-softmmu  --cc=gcc-3.4 --disable-sdl --disable-gfx-check --extra-cflags='-isystem=\usr\include'
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       /src/openmoko/qemu-neo1973
C compiler        gcc-3.4
Host C compiler   gcc
make              make
install           install
host CPU          i386
host big endian   no
target list       arm-softmmu
gprof enabled     no
profiler          no
static build      no
-Werror enabled   no
SDL support       no
mingw32 support   no
Adlib support     no
AC97 support      no
GUS support       no
CoreAudio support no
ALSA support      no
EsounD support    no
DSound support    no
FMOD support      no 
OSS support       yes
VNC TLS support   no
kqemu support     yes
Documentation     no
root@sandun-Aspire-4741:/src/openmoko/qemu-neo1973# make
gcc-3.4 -isystem=\usr\include -Wall -O2 -g -fno-strict-aliasing -I. -I/src/openmoko/qemu-neo1973 -MMD -MP -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/src/openmoko/qemu-neo1973/slirp    -c -o qemu-img.o qemu-img.c
qemu-img.c: In function `read_password':
qemu-img.c:178: error: `EAGAIN' undeclared (first use in this function)
qemu-img.c:178: error: (Each undeclared identifier is reported only once
qemu-img.c:178: error: for each function it appears in.)
qemu-img.c:178: error: `EINTR' undeclared (first use in this function)
qemu-img.c: In function `img_create':
qemu-img.c:307: error: `EOPNOTSUPP' undeclared (first use in this function)
qemu-img.c: In function `img_commit':
qemu-img.c:359: error: `ENOENT' undeclared (first use in this function)
qemu-img.c:362: error: `EACCES' undeclared (first use in this function)
qemu-img.c:365: error: `EOPNOTSUPP' undeclared (first use in this function)
qemu-img.c: In function `img_convert':
qemu-img.c:481: error: `EOPNOTSUPP' undeclared (first use in this function)
make: *** [qemu-img.o] Error 1

但是编译停止并出现这些错误消息,听起来好像没有正确的 系统包含路径,所以我用 -isystem 开关明确给出了它。但仍然没有编译 正确。

有什么解决方法吗?

--先谢谢了--

【问题讨论】:

  • 请有人帮帮我。

标签: qemu gcc3


【解决方案1】:

哪个版本的qemu?操作系统?我们需要更多黄金信息。

例如在我的 ubuntu 12.04 和 git 版本的 qemu 上:

$ git clone git://git.qemu.org/qemu.git > /dev/null
...
$ cd qemu/
$ ./configure --target-list=arm-softmmu --disable-sdl
Install prefix    /usr/local
BIOS directory    /usr/local/share/qemu
binary directory  /usr/local/bin
library directory /usr/local/lib
libexec directory /usr/local/libexec
include directory /usr/local/include
config directory  /usr/local/etc
local state directory   /usr/local/var
Manual directory  /usr/local/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path       /home/user/qemu
C compiler        cc
Host C compiler   cc
Objective-C compiler cc
CFLAGS            -O2 -D_FORTIFY_SOURCE=2 -g 
QEMU_CFLAGS       -Werror -fPIE -DPIE -m32 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64        -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing  -fstack-protector-all -Wendif-labels -Wmissing- include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -I/usr/include/p11-kit-1    -I/usr/include/libpng12   -I/usr/include/pixman-1  
LDFLAGS           -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie -m32 -g 
make              make
install           install
python            python
smbd              /usr/sbin/smbd
host CPU          i386
host big endian   no
target list       arm-softmmu
tcg debug enabled no
gprof enabled     no
sparse enabled    no
strip binaries    yes
profiler          no
static build      no
-Werror enabled   yes
pixman            system
SDL support       no
curses support    yes
curl support      yes
mingw32 support   no
Audio drivers     oss
Extra audio cards ac97 es1370 sb16 hda
Block whitelist   
Mixer emulation   no
VirtFS support    no
VNC support       yes
VNC TLS support   yes
VNC SASL support  yes
VNC JPEG support  no
VNC PNG support   yes
xen support       no
brlapi support    yes
bluez  support    yes
Documentation     yes
NPTL support      yes
GUEST_BASE        yes
PIE               yes
vde support       yes
Linux AIO support no
ATTR/XATTR support yes
Install blobs     yes
KVM support       yes
TCG interpreter   no
fdt support       yes
preadv support    yes
fdatasync         yes
madvise           yes
posix_madvise     yes
sigev_thread_id   yes
uuid support      yes
libcap-ng support no
vhost-net support yes
Trace backend     nop
Trace output file trace-<pid>
spice support     no (/)
rbd support       no
xfsctl support    no
nss used          no
usb net redir     no
OpenGL support    yes
libiscsi support  no
build guest agent yes
seccomp support   no
coroutine backend ucontext
GlusterFS support no
virtio-blk-data-plane no
gcov              gcov
gcov enabled      no
$ make -j3 >/dev/null
$

所以一切都很好......

【讨论】:

  • 我会试试这个。并尽快反馈。
  • 这也适用于我的机器。我不知道为什么它在前面的路上坏了。谢谢!
  • 现在我有了一个可以工作的虚拟机。现在我需要一些乐趣。我可以在聊天中问吗?
猜你喜欢
  • 2022-11-09
  • 2015-11-27
  • 2010-10-25
  • 2022-10-07
  • 2023-03-29
  • 1970-01-01
  • 1970-01-01
  • 2018-06-17
  • 2015-06-14
相关资源
最近更新 更多