首页 > 解决方案 > 我想修复在尝试编译 xenGT 时发生的错误

问题描述

我正在尝试按照本教程在 Ubuntu 20.04 上为 XenGT 构建 Qemu 和 Xen:

https://github.com/intel/gvt-linux/wiki/GVTg_Setup_Guide#33​​2-build-qemu--xen-for-xengt

因为我想与 xen VM 共享集成 GPU。

我的 PC 的主要硬件组件如下:

处理器 I9-9900k

Intel Corporation UHD Graphics 630(Desktop 9 系列)(修订版 02)

IVIDIA Corporation TU102 [GeForce RTX 2080 Ti] (rev a1)

到目前为止,编译没有出现错误:

root@ziomario-z390aoruspro:/etc/xen/igvtg-xen# make install-tools

……

make libs
make[5]: ingresso nella directory «/etc/xen/igvtg-xen/tools/libxc»
rm -f _paths.h.tmp; echo "#define sbindir "/usr/sbin"" >>_paths.h.tmp; echo "#define bindir "/usr/bin"" >>_paths.h.tmp; echo "#define LIBEXEC "/usr/lib/xen"" >>_paths.h.tmp; echo "#define LIBEXEC_BIN "/usr/lib/xen/bin"" >>_paths.h.tmp; echo "#define libdir "/usr/lib"" >>_paths.h.tmp; echo "#define SHAREDIR "/usr/share"" >>_paths.h.tmp; echo "#define XENFIRMWAREDIR "/usr/lib/xen/boot"" >>_paths.h.tmp; echo "#define XEN_CONFIG_DIR "/etc/xen"" >>_paths.h.tmp; echo "#define XEN_SCRIPT_DIR "/etc/xen/scripts"" >>_paths.h.tmp; echo "#define XEN_LOCK_DIR "/var/lock"" >>_paths.h.tmp; echo "#define XEN_RUN_DIR "/var/run/xen"" >>_paths.h.tmp; echo "#define XEN_PAGING_DIR "/var/lib/xen/xenpaging"" >>_paths.h.tmp; echo "#define XEN_DUMP_DIR "/var/lib/xen/dump"" >>_paths.h.tmp; echo "#define XEN_LOG_DIR "/var/log/xen"" >>_paths.h.tmp; echo "#define XEN_LIB_DIR "/var/lib/xen"" >>_paths.h.tmp; echo "#define XEN_RUN_STORED "/var/run/xenstored"" >>_paths.h.tmp; if ! cmp -s _paths.h.tmp paths.h; then mv -f paths.h.tmp paths.h; else rm -f paths.h.tmp; fi
gcc -m64 -DBUILD_ID -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement -Wno-unused-but-set-variable -Wno-unused-local-typedefs -O2 -fomit-frame-pointer -D__XEN_INTERFACE_VERSION=XEN_LATEST_INTERFACE_VERSION -MMD -MF .xc_pm.o.d -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -I../../xen/common/libelf -Werror -Wmissing-prototypes -I. -I./include -I/etc/xen/igvtg-xen/tools/libxc/../../tools/include -D__XEN_TOOLS -pthread -I/etc/xen/igvtg-xen/tools/libxc/../../tools/libs/toollog/include -I/etc/xen/igvtg-xen/tools/libxc/../../tools/include -I/etc/xen/igvtg-xen/tools/libxc/../../tools/libs/evtchn/include -I/etc/xen/igvtg-xen/tools/libxc/../../tools/include -I/etc/xen/igvtg-xen/tools/libxc/../../tools/libs/devicemodel/include -I/etc/xen/igvtg-xen/tools/libxc/../../tools/include -include /etc/xen/igvtg-xen/tools/libxc/../../tools/config.h -I/etc/xen/igvtg-xen/tools/libxc/../../tools/libs/call/include -I/etc/xen/igvtg-xen/tools/libxc/../../tools/include -I/etc/xen/igvtg-xen/tools/libxc/../../tools/libs/foreignmemory/include -I/etc/xen/igvtg-xen/tools/libxc/../../tools/include -I/etc/xen/igvtg-xen/tools/libxc/../../tools/libs/gnttab/include -I/etc/xen/igvtg-xen/tools/libxc/../../tools/include -c -o xc_pm.o xc_pm.c
In file included from /usr/include/string.h:495,
from xc_private.h:24,
from xc_pm.c:22:
In function ‘strncpy’,
inlined from ‘xc_set_cpufreq_gov’ at xc_pm.c:308:5:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ specified bound 16 equals destination size [-Werror=stringop-truncation]
106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[5]: *** [/etc/xen/igvtg-xen/tools/libxc/../../tools/Rules.mk:222: xc_pm.o] Errore 1
make[5]: uscita dalla directory «/etc/xen/igvtg-xen/tools/libxc»
make[4]: *** [Makefile:184: build] Errore 2
make[4]: uscita dalla directory «/etc/xen/igvtg-xen/tools/libxc»
make[3]: *** [/etc/xen/igvtg-xen/tools/../tools/Rules.mk:246: subdir-install-libxc] Errore 2
make[3]: uscita dalla directory «/etc/xen/igvtg-xen/tools»
make[2]: *** [/etc/xen/igvtg-xen/tools/../tools/Rules.mk:241: subdirs-install] Errore 2
make[2]: uscita dalla directory «/etc/xen/igvtg-xen/tools»
make[1]: *** [Makefile:74: install] Errore 2
make[1]: uscita dalla directory «/etc/xen/igvtg-xen/tools»
make: *** [Makefile:127: install-tools] Errore 2

这是一个错误吗?我该如何解决?我不是那么熟练。也许这是一个老错误,它已经被修复了,但我没有找到解决方案。有人能帮我吗 ?谢谢。

标签: c++cvirtual-machinevirtualizationxen

解决方案


推荐阅读