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

Hans Beckérus hans.beckerus at gmail.com
Thu Aug 22 08:41:55 PDT 2013


On Thu, Aug 22, 2013 at 5:19 PM, Leon Woestenberg
<sidebranch.openembedded at gmail.com> wrote:
>
> 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.
>
Yes, you have a point there ;) That's it of course! It is my host
compiler that is incorrectly setup not the Yocto toolchain. Thanks for
the pointer! Funny how easy it is to overlook the obvious :)

> 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.



More information about the yocto mailing list