Re: rocko cmake buld cstdlib:75:15: fatal error: stdlib.h: No such file or directory

Måns Zigher <mans.zigher@...>

Hi Dennis,

This makes me a bot confused in cmake_do_configure we have

          ${EXTRA_OECMAKE} \

I would think that I am using this cmake_do_configure so then the -DCMAKE_NO_SYSTEM_FROM_IMPORTED=1 should already be called correct?

Mans Zigher

2018-04-17 20:31 GMT+02:00 Måns Zigher <mans.zigher@...>:


I actually managed to locate the problem to the cmake project where it added include_directories(SYSTEM which then is translated into -isystem this call was not included when building in the SDK so that explained why this was only triggered when building with bitbake. Thanks for the tip I will try it out and see what "cmake_do_configure()" can offer. 

Mans Zigher

On Tue, Apr 17, 2018, 19:57 Dennis Menschel <menschel-d@...> wrote:
Hi Mans,

Am 17.04.2018 um 13:15 schrieb Måns Zigher:
> Hi all,
> Have anyone experienced this error message before?
>     c++/7.3.0/cstdlib:75:15: fatal error: stdlib.h: No such file or
>     directory                       
>     |  #include_next <stdlib.h>                                         
>     |                ^~~~~~~~~~                                         
> I am not seeing this error when cross compiling using the sdk. I can see
> in the output that the -isystem is added which when googling the error
> appears to be a problem when cross compiling. Since the sdk works I am
> guessing this flag is added by OE/poky. Any pointers on how to go
> forward is appreciated.
> BR
> Mans Zigher

if I recall correctly, the problem can be circumvented by adding the
option "-DCMAKE_NO_SYSTEM_FROM_IMPORTED=1" when invoking cmake.

You can find a reference in the function "cmake_do_configure()" located
inside "poky/meta/classes/cmake.bbclass"

Best regards,

Join to automatically receive all group messages.