cmake.bbclass sets OECMAKE_C_FLAGS and OECMAKE_C_FLAGS to include ${TOOLCHAIN_OPTIONS}, and TOOLCHAIN_OPTIONS is set to "--sysroot=${STAGING_DIR_TARGET}"; however for a native recipe STAGING_DIR_TARGET is not valid and is in fact empty, so the option passed to the compiler is "--sysroot=" which causes builds to fail due to not being able to find standard headers. Clearing TOOLCHAIN_OPTIONS within the recipe works, however ideally this would be handled within the cmake recipe (in a way that does not break non-native builds).
Sorry that should have been OECMAKE_CXX_FLAGS rather than OECMAKE_C_FLAGS in the second instance above.
Paul, how to reproduce this issue ?
Paul, I am not able to reproduce this issue. so please send steps to reproduce this issue. Thanks, Nitin
Paul, Nitin is waiting for your inputs
FYI I emailed Nitin some information on this over the holidays - basically it needs an additional layer to reproduce which I have uploaded to a contrib git layer on yoctoproject.org.
Duplicated to 2124 *** This bug has been marked as a duplicate of bug 2124 ***