Bug 1505 - cmake.bbclass sets invalid sysroot for native recipes
Summary: cmake.bbclass sets invalid sysroot for native recipes
Status: RESOLVED DUPLICATE of bug 2124
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.2
Assignee: Nitin Kamble
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2011-09-21 03:46 UTC by Paul Eggleton
Modified: 2012-03-22 01:54 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggleton 2011-09-21 03:46:03 UTC
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).
Comment 1 Paul Eggleton 2011-09-21 03:48:56 UTC
Sorry that should have been OECMAKE_CXX_FLAGS rather than OECMAKE_C_FLAGS in the second instance above.
Comment 2 Nitin Kamble 2011-09-21 10:40:55 UTC
Paul,
  how to reproduce this issue ?
Comment 3 Nitin Kamble 2011-09-23 13:56:35 UTC
 Paul, I am not able to reproduce this issue. so please send steps to reproduce this issue.

Thanks,
Nitin
Comment 4 Jessica 2012-01-03 10:33:04 UTC
Paul, Nitin is waiting for your inputs
Comment 5 Paul Eggleton 2012-01-03 14:41:09 UTC
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.
Comment 6 Robert Yang 2012-03-22 01:54:14 UTC
Duplicated to 2124

*** This bug has been marked as a duplicate of bug 2124 ***