我想在 Linux octeon 2.6.32.13 上安装 qemu1.0.1。出于某种原因,我无法使用最新版本的 qemu。它已成功配置 mips64。但在编译时出现以下错误
qemu-ga.o: In function `asprintf':
/usr/include/bits/stdio2.h:158: undefined reference to `__asprintf_chk'
qemu-ga.o: In function `conn_channel_send_buf':
/home/hafiz.shafiq/work_qemu/qemu-1.0.1/qemu-ga.c:220: undefined reference to `g_debug'
qemu-ga.o: In function `process_event':
/home/hafiz.shafiq/work_qemu/qemu-1.0.1/qemu-ga.c:303: undefined reference to `g_debug'
qemu-ga.o: In function `process_command':
/home/kics/hafiz.shafiq/work_qemu/qemu-1.0.1/qemu-ga.c:279: undefined reference to `g_debug'
qemu-timer-common.o: In function `init_get_clock':
/home/hafiz.shafiq/work_qemu/qemu-1.0.1/qemu-timer-common.c:57: undefined reference to `clock_gettime'
qga/guest-agent-commands.o: In function `qmp_guest_file_write':
/home/hafiz.shafiq/work_qemu/qemu-1.0.1/qga/guest-agent-commands.c:249: undefined reference to `g_base64_decode'
qga/guest-agent-commands.o: In function `qmp_guest_file_read':
/home/hafiz.shafiq/work_qemu/qemu-1.0.1/qga/guest-agent-commands.c:224: undefined reference to `g_base64_encode'
collect2: ld returned 1 exit status
make: *** [qemu-ga] Error 1
答案1
当我从头开始编译软件项目时 - 我通常首先安装 Ubuntu 中包含的版本的构建依赖项,方法是:
sudo apt-get build-dep qemu
这可确保您拥有软件包所依赖的所有库和头文件。如果您自己新下载的源代码未使用任何新库,则您应该拥有构建软件包所需的库。
从你的错误来看,你至少需要 libglib2.0-dev