如何解决修补Linux / C ++代码中的错误的一些帮助
我想通过xen将集成的gpu从主机os(ubuntu 20.04)传递到Windows 10 guest os。这是因为xen对我而言非常有效,对于我的特定需求,它比qemu-kvm更好,并且因为我只有两张图形卡。我已经传递给来宾的nvidia rtx 2080 ti和Intel UHD 630,可以从主机复制到来宾,以便可以在两个地方使用而不会受到干扰。因此,我正在尝试构建此存储库:
https://github.com/intel/gvt-linux/wiki/GVTg_Setup_Guide#332-build-qemu--xen-for-xengt
我不得不说,本指南的编写完全不够好。并且代码中充满了未修复的错误。我正在努力工作一个月,试图修复从2015年至今出现的错误。这不是我的工作。这是我的爱好。但是,我需要激活集成GPU的传递功能,以免放弃。
现在我正在尝试修复错误n。 434544,您可以在下面看到。
> CC util/qemu-error.o
> /etc/xen/igvtg-xen/tools/qemu-xen-dir/util/qemu-error.c: In function
> ‘vreport’:
> /etc/xen/igvtg-xen/tools/qemu-xen-dir/util/qemu-error.c:201:5: error:
> ‘GTimeVal’ is deprecated: Use 'GDateTime' instead
> [-Werror=deprecated-declarations] 201 | GTimeVal tv; | ^~~~~~~~ In
> file included from /usr/include/glib-2.0/glib/galloca.h:32,from
> /usr/include/glib-2.0/glib.h:30,from
> /etc/xen/igvtg-xen/tools/qemu-xen-dir/include/glib-compat.h:19,from
> /etc/xen/igvtg-xen/tools/qemu-xen-dir/include/qemu/osdep.h:107,from
> /etc/xen/igvtg-xen/tools/qemu-xen-dir/util/qemu-error.c:13:
> /usr/include/glib-2.0/glib/gtypes.h:547:8: note: declared here 547 |
> struct GTimeVal | ^~~~~~~~~
> /etc/xen/igvtg-xen/tools/qemu-xen-dir/util/qemu-error.c:205:9: error:
> ‘g_get_current_time’ is deprecated: Use 'g_get_real_time' instead
> [-Werror=deprecated-declarations] 205 | g_get_current_time(&tv); |
> ^~~~~~~~~~~~~~~~~~ In file included from
> /usr/include/glib-2.0/glib/giochannel.h:33,from
> /usr/include/glib-2.0/glib.h:54,from
> /etc/xen/igvtg-xen/tools/qemu-xen-dir/util/qemu-error.c:13:
> /usr/include/glib-2.0/glib/gmain.h:679:8: note: declared here 679 |
> void g_get_current_time (GTimeVal result); | ^~~~~~~~~~~~~~~~~~
> /etc/xen/igvtg-xen/tools/qemu-xen-dir/util/qemu-error.c:206:9: error:
> ‘g_time_val_to_iso8601’ is deprecated: Use 'g_date_time_format'
> instead [-Werror=deprecated-declarations] 206 | timestr =
> g_time_val_to_iso8601(&tv); | ^~~~~~~ In file included from
> /usr/include/glib-2.0/glib.h:88,from
> /etc/xen/igvtg-xen/tools/qemu-xen-dir/util/qemu-error.c:13:
> /usr/include/glib-2.0/glib/gtimer.h:73:10: note: declared here 73 |
> gchar g_time_val_to_iso8601 (GTimeVal *time) G_GNUC_MALLOC; |
> ^~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors
此补丁可以解决此问题:
到现在为止,我已经能够手动修复错误,但是这次此补丁更加复杂,无法解决。我可以使用命令:
patch originalfile patchfile
但是我意识到要修补的文件和修补文件的编号不匹配。因此,需要手动修复。您可以在下面查看要修补的文件:
有人可以向我解释我该怎么做吗?谢谢。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。