针对 ARM 的 Linux 内核 4.10.8 的编译错误

Compile error for Linux kernel 4.10.8 targeting ARM

我正在尝试为 arm 交叉编译 Linux 内核 4.10.8,但出现此错误:

      CC [M]  drivers/vhost/vhost.o
In file included from ./include/uapi/linux/stddef.h:1:0,
                 from ./include/linux/stddef.h:4,
                 from ./include/uapi/linux/posix_types.h:4,
                 from ./include/uapi/linux/types.h:13,
                 from ./include/linux/types.h:5,
                 from ./include/uapi/asm-generic/fcntl.h:4,
                 from ./arch/arm/include/uapi/asm/fcntl.h:9,
                 from ./include/uapi/linux/fcntl.h:4,
                 from ./include/linux/fcntl.h:4,
                 from ./include/linux/eventfd.h:11,
                 from drivers/vhost/vhost.c:14:
drivers/vhost/vhost.c: In function ‘vhost_vring_ioctl’:
./include/linux/compiler.h:518:38: error: call to ‘__compiletime_assert_1357’ declared with attribute error: BUILD_BUG_ON failed: __alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE
  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)enter 

知道如何解决这个问题吗? 我不知道这个模块是做什么用的,所以我不知道我是否真的需要编译它,但是我在 menuconfig 中找不到禁用这个模块的地方?

此模块 (CONFIG_VHOST) 通常在您需要 virtualization 支持时需要。如果您不需要它,请在 make menuconfig 中禁用它。

如果您不需要虚拟化,您可以忽略它并继续构建。