[yocto] cross-compilation of kernel does not work with the generated toolchain?

Leon Woestenberg sidebranch.openembedded at gmail.com
Thu Aug 22 08:19:31 PDT 2013


Hello Hans,

On Thu, Aug 22, 2013 at 5:10 PM, Hans Beckérus <hans.beckerus at gmail.com>wrote:

> Hi. I am trying to build a kernel using our bitbaked and populated
> toolchain. It works fine for user-space application but when trying to
> compile the kernel we get
> ...
>   HOSTCC  scripts/dtc/srcpos.o
> In file included from scripts/dtc/dtc.h:25,
>                  from scripts/dtc/srcpos.c:24:
> /usr/include/string.h:546: error: expected declaration specifiers or
> '...' before '__locale_t'
> /usr/include/string.h:547: error: nonnull argument with out-of-range
> operand number (argument 1, operand 3)
> /usr/include/string.h:550: error: expected declaration specifiers or
> '...' before '__locale_t'
> /usr/include/string.h:551: error: nonnull argument with out-of-range
> operand number (argument 1, operand 4)
> make[2]: *** [scripts/dtc/srcpos.o] Error 1
> make[1]: *** [scripts/dtc] Error 2
> make: *** [scripts] Error 2
>
> /usr/include/string.h ??? That must be wrong, or? I expected it to
> pickup the standard headerfiles from our toolchain, not the ones on
> the build host. That will surely clash with the version of the
> compiler being used.
>
> Any ideas what might be wrong here?
>
> Note that the scripts/dtc/dtc tool is not built for the target, but is a
build host native tool to compile a device tree.

So it is expected it uses host includes.

Just to be sure, you are building the kernel outside  of Yocto, just using
the cross toolchain from Yocto?

Regards,

Leon.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20130822/7f18073c/attachment.html>


More information about the yocto mailing list