Bug 1231

Summary: nativesdk recipes seem to have problems finding standard C++ headers
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Paul Eggleton <bluelightning>
Component: devtools / tool chainAssignee: Kai Kang <kai.kang>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: liang.li2, liangliang.wang, meta.mr.watcher, meta.watcher, sgw, song.liu, yi.zhao
Version: unspecified   
Target Milestone: 1.2   
Hardware: All   
OS: Multiple   
Whiteboard: post 1.1
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Paul Eggleton 2011-07-08 09:34:53 UTC
In the qt4-tools-nativesdk (and soon cmake-nativesdk) recipes we have some nasty include hacks to allow g++ to find standard C++ headers (e.g. iostream) that it doesn't seem to be able to find by itself. There must be some underlying path misconfiguration causing this issue, and ideally we would fix that rather than having to add these hacks every time we inherit nativesdk.
Comment 1 Robert Yang 2011-08-16 20:36:55 UTC
Hi Paul,

Would you please add more info:
1) where is the nasty hacks
2) How to reproduce the "doesn't seem to be able to find by itself"

thank you very much!
Comment 2 Paul Eggleton 2011-08-17 03:36:18 UTC
1) We have the following added to EXTRA_OECONF in meta/recipes-qt/qt4-tools-nativesdk.inc:

                -I${STAGING_DIR_HOST}${SDKPATHNATIVE}/usr/include/c++ \
                -I${STAGING_DIR_HOST}${SDKPATHNATIVE}/usr/include/c++/${TARGET_SYS} \
                -L${STAGING_DIR_HOST}${SDKPATHNATIVE}/lib \
                -L${STAGING_DIR_HOST}${SDKPATHNATIVE}/usr/lib"


Normally the compiler and linker should be able to find things in these standard paths by themselves, but for some reason with nativesdk.bbclass they can't.

2) Just remove the lines above and you'll find the build of qt4-tools-nativesdk will fail to find basic stuff like iostream.
Comment 3 Kai Kang 2011-08-23 02:18:52 UTC
post 1.1
Comment 4 Kai Kang 2011-09-07 19:17:33 UTC
I have send a commit to fix this bug, just because includedir_nativesdk is not set.

commit
9ce2cc6e14270c94d97f1bb3ede8e9321a8192b8
Comment 5 liang li 2011-09-08 18:25:19 UTC
now in meta/recipes-qt/qt4/qt4-tools-nativesdk.inc, no lines described in Comment 2, and run "bitbake qt4-tools-nativesdk", no error met,so verified it.
git info :52835dd30110d51a839872f198eef3b12e369850
git branch : poky/master

test env:
host : ubuntu 10.10 x86_64
kernel :2.6.35-30-generic #56-Ubuntu SMP