配置和制作 qemu 时出错

配置和制作 qemu 时出错

我是 ubuntu 新手,我正在使用 ubuntu 16.04,在安装 qemu 时,运行 sudo make 后出现此错误

vl.c: In function ‘main’:

vl.c:2857:5: error: ‘g_mem_set_vtable’ is deprecated [-Werror=deprecated-declarations]

     g_mem_set_vtable(&mem_trace);
     ^

In file included from /usr/include/glib-2.0/glib/glist.h:32:0,

                 from /usr/include/glib-2.0/glib/ghash.h:33,
                 from /usr/include/glib-2.0/glib.h:50,
                 from /home/hsrf7/xv6/qemu/include/glib-compat.h:17,
                 from /home/hsrf7/xv6/qemu/include/qemu-common.h:43,
                 from /home/hsrf7/xv6/qemu/include/qemu/bitmap.h:15,
                 from vl.c:31:
/usr/include/glib-2.0/glib/gmem.h:357:7: note: declared here

 void  g_mem_set_vtable (GMemVTable *vtable);
       ^

cc1: all warnings being treated as errors

/home/hsrf7/xv6/qemu/rules.mak:25: recipe for target 'vl.o' failed

make: *** [vl.o] Error 1

我使用了以下步骤。

  1. 克隆 IAP 6.828 QEMU git 存储库 git clonehttps://github.com/geofft/qemu.git -b 6.828-1.7.0

2.配置源代码

Linux: ./configure --disable-kvm --prefix=/home/hsrf7/qemu --target-list="i386-softmmu x86_64-softmmu"
  1. sudo make && sudo make install

答案1

您可以在运行 ./configure 时添加 --disable-werror --enable-mc。这不会解决问题,但您将能够编译。运行 VM 时,您会收到错误 - “不支持自定义内存分配 vtable”,但对我来说一切似乎都正常

相关内容