我想将集成的 gpu 从主机操作系统(ubuntu 20.04)传递到带有 xen 的 windows 10 guest 操作系统。这是因为 xen 非常适合我,比 qemu-kvm 更适合我的特定需求,而且我只有两张显卡。我已经传给guest的nvidia rtx 2080 ti,和intel UHD 630,可以从host复制到guest,这样就可以在两个地方都使用,不会中断。所以我正在尝试构建这个存储库:
https://github.com/intel/gvt-linux/wiki/GVTg_Setup_Guide#332-build-qemu--xen-for-xengt
探索日志,我看到这种情况:
config-temp/qemu-conf.c:1:10: fatal error: sys/endian.h: File o directory non esistente
1 | #include <sys/endian.h>
| ^~~~~~~~~~~~~~
compilation terminated.
/usr/bin/ld: /tmp/cc6WBNSk.o: in function `main':
/etc/xen/igvtg-xen/tools/qemu-xen-build/config-temp/qemu-conf.c:2: undefined reference to `sin'
collect2: error: ld returned 1 exit status
/usr/bin/ld: /tmp/ccEQrVtw.o: in function `main':
/etc/xen/igvtg-xen/tools/qemu-xen-build/config-temp/qemu-conf.c:4: undefined reference to `timer_create'
collect2: error: ld returned 1 exit status
config-temp/qemu-conf.c: In function ‘main’:
config-temp/qemu-conf.c:2:25: warning: null argument where non-null required (argument 1) [-Wnonnull]
2 | int main(void) { return sem_timedwait(0, 0); }
| ^~~~~~~~~~~~~
config-temp/qemu-conf.c:2:25: warning: null argument where non-null required (argument 2) [-Wnonnull]
config-temp/qemu-conf.c: In function ‘main’:
config-temp/qemu-conf.c:2:25: error: null argument where non-null required (argument 1) [-Werror=nonnull]
2 | int main(void) { return sem_timedwait(0, 0); }
| ^~~~~~~~~~~~~
config-temp/qemu-conf.c:2:25: error: null argument where non-null required (argument 2) [-Werror=nonnull]
似乎编译停止是因为:config-temp/qemu-conf.c:1:10: fatal error: sys/endian.h: File o directory non esistente
1 | #include <sys/endian.h>
| ^~~~~~~~~~~~~~
compilation terminated.
这是 qemu-conf.c 文件:root@ziomario-z390aoruspro:/etc/xen/igvtg-xen/tools/qemu-xen-build/config-temp# nano qemu-conf.c
include <semaphore.h>
int main(void) { return sem_timedwait(0, 0); }
有人可以帮我修复这个错误吗?谢谢。
最佳答案
endian.h
通常位于linux中的includes/下。
您必须安装 glibc 头文件并将源文件更改为 #include <endian.h>
反而。
关于config-temp/qemu-conf.c :1:10: fatal error: sys/endian. h:找不到文件或目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63604660/