使用 Toaster 构建 Yocto 食谱时如何解决 "do_compile ERROR"?

How can I solve a "do_compile ERROR" when building a Yocto recipe with Toaster?

每次我想构建 rpi-basic-image 时,我都会收到以下错误:

  DEBUG: Executing shell function do_compile
  CHK     include/config/kernel.release
  GEN     ./Makefile
  CHK     include/generated/uapi/linux/version.h
  Using /home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source as source for kernel
  CHK     include/generated/utsrelease.h
  CC      scripts/mod/devicetable-offsets.s
In file included from /home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/include/linux/compiler.h:54:0,
                 from /home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/include/uapi/linux/stddef.h:1,
                 from /home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/include/linux/stddef.h:4,
                 from /home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/include/uapi/linux/posix_types.h:4,
                 from /home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/include/uapi/linux/types.h:13,
                 from /home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/include/linux/types.h:5,
                 from /home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/include/linux/mod_devicetable.h:11,
                 from /home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/scripts/mod/devicetable-offsets.c:2:
/home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/include/linux/compiler-gcc.h:121:30: fatal error: linux/compiler-gcc6.h: No such file or directory
 #include gcc_header(__GNUC__)
                              ^
compilation terminated.
/home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/scripts/Makefile.build:153: recipe for target 'scripts/mod/devicetable-offsets.s' failed
make[4]: *** [scripts/mod/devicetable-offsets.s] Error 1
/home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/scripts/Makefile.build:403: recipe for target 'scripts/mod' failed
make[3]: *** [scripts/mod] Error 2
/home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/Makefile:555: recipe for target 'scripts' failed
make[2]: *** [scripts] Error 2
Makefile:146: recipe for target 'sub-make' failed
make[1]: *** [sub-make] Error 2
Makefile:24: recipe for target '__sub-make' failed
make: *** [__sub-make] Error 2
WARNING: exit code 1 from a shell command.
ERROR: Function failed: do_compile (log file is located at /home/dennis/poky/build-toaster-3/tmp/work/raspberrypi2-poky-linux-gnueabi/linux-raspberrypi/1_4.1.21+gitAUTOINC+ff45bc0e89-r0/temp/log.do_compile.11315)

有谁知道怎么解决的,是什么原因造成的?

谢谢

这已在 yocto@yoctoproject.org 邮件列表中注意到。

似乎可以通过补丁解决,但我没有测试它 - 我只是转发对话,希望这会有所帮助。

来自线程的最后一封邮件: http://article.gmane.org/gmane.linux.embedded.yocto.general/30168/match=gcc+6.1+raspi

使用的补丁:http://article.gmane.org/gmane.linux.embedded.yocto.general/30093/