Bug 1505

Summary: cmake.bbclass sets invalid sysroot for native recipes
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Paul Eggleton <bluelightning>
Component: devtools / tool chainAssignee: Nitin Kamble <nitin.a.kamble>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: Medium CC: jessica.zhang, liezhi.yang, meta.mr.watcher, meta.watcher, sgw, stephan.binner
Version: unspecified   
Target Milestone: 1.2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

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