Search code examples
raspberry-piyoctobitbake

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


everytime I want to build the rpi-basic-image I get the following error:

  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)

Does anybody know how to solve it and what's the reason for it?

Thanks


Solution

  • This has been noticed on the yocto@yoctoproject.org mailing list.

    Seems to be resolved with a patch, but I did not test it- I'm only forwarding the conversation and hoping this will help.

    Last mail from the thread: http://article.gmane.org/gmane.linux.embedded.yocto.general/30168/match=gcc+6.1+raspi

    Patch used: http://article.gmane.org/gmane.linux.embedded.yocto.general/30093/