Bug 307

Summary: cstlib is not found with latest sdk image running in netbook
Product: [Build System, Metadata & Runtime] OE-Core Reporter: liping Ke <liping.ke>
Component: coreAssignee: Nitin Kamble <nitin.a.kamble>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: Medium CC: jessica.zhang, kevin.tian, lianhao.lu, meta.mr.watcher, meta.watcher, richard.purdie, sgw
Version: 0.9   
Target Milestone: 0.9 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Program Management Documentation change: ---

Description liping Ke 2010-09-10 03:01:47 UTC
After we install latest poky/master sdk image into netbook, when compiling c++ program sudoku,  cstlib is not found. We did not found this problem with c++4.3 version.

I attached the test c++ project.

Please help to make sure that the attached project could be compiled with sdk-live image running in netbook.

Thanks a lot for your help!
criping
Comment 1 Lianhao Lu 2010-09-10 03:17:28 UTC
This is caused by the different settings of include file search directory between g++ and the actually installed include files on the netbook.

The g++ is configured to search the default include directory as /usr/include/c++/4.5.0/, but the include files actually got installed on the netbook is at /usr/include/c++.
Comment 2 Nitin Kamble 2010-09-27 08:44:13 UTC
Is the netbook machine specific issue? Is it present on qemux86 machine ?

thanks,
Nitin
Comment 3 Nitin Kamble 2010-09-28 15:46:22 UTC
I did not find the /usr/include/c++/4.5.0/ directory in the qemux86 sdk image also. 
  Also I was trying sudoku sources from this location: http://linux.softpedia.com/get/GAMES-ENTERTAINMENT/Puzzle/GNOME-Sudoku-3478.shtml

And those sources are failing to configure on the sdk image with this error:
configure: error: Your intltool is too old. You need intltool 0.7.0 or later.

I would need more precise steps to reproduce the failure.

g++ on the target is configured with /usr/include/c++/4.5.0 as gxx-include, so that may be the issue Lianhao is taking.

- nitin
Comment 4 Nitin Kamble 2010-09-28 17:54:37 UTC
Jessica, Liping,

I have a fix for this issue based on the comments from Liping and Lianhao and recipe code review. I have pushed the fix to nitin/misc branch on poky-contrib tree. Can you please build an sdk image with that branch and test if it fixes the issue? I don't have a netbook to test this.


URL: http://git.pokylinux.org/cgit/cgit.cgi/poky-contrib/log/?h=nitin/misc


- Nitin
Comment 5 Nitin Kamble 2010-09-28 17:58:42 UTC
jessca, can you get some help in verifying this issue.

Thanks,
Nitin
Comment 6 liping Ke 2010-09-28 18:11:53 UTC
Hi, Nitin

Recently we met some build issues. Once we successfully built a image on netbook, I will verify your fix. 

Thanks!

Regards,
criping
Comment 7 liping Ke 2010-09-29 23:18:05 UTC
Hi, Nitin and Jessica

Seems this  bug fix is still not in the poky master?
Yet Lianhao is now cherry-picking this fix and applied to poky master...

Thanks& Regards,
criping
Comment 8 Richard Purdie 2010-10-07 02:59:34 UTC
This fix looks like exactly the opposite to what we need. I did some research with grep in the gcc directory:

grep gxx-include * -r
gcc-configure-cross.inc:		      --with-gxx-include-dir=${STAGING_DIR_TARGET}/${target_includedir}/c++ \
gcc-configure-runtime.inc:    --with-gxx-include-dir=${includedir}/c++/ \
gcc-configure-sdk.inc:                      --with-gxx-include-dir=${SDKPATH}/sysroots/${TARGET_SYS}${target_includedir}/c++ \
gcc-configure-target.inc:    --with-gxx-include-dir=${includedir}/c++/${BINV}/"

and as you can see, everything uses /usr/include/c++ apart from gcc-configure-target.inc. This corresponds to the gcc that would run in target images as reported in this bug report.

We need to remove the ${BINV} from gcc-configure-target.inc
Comment 9 Richard Purdie 2010-10-07 03:02:30 UTC
Also, the issue can be easily reproduced in qemu images:

echo "#include <iostream>" > test.cpp
g++ test.cpp

and if it errors unable to find iostream, its broken.
Comment 10 Richard Purdie 2010-10-07 03:07:36 UTC
I've pushed a fix in http://git.pokylinux.org/cgit.cgi/poky/commit/?id=fafb40364dfc3951a1d62a49a412f0e15e284d03 which I'm fairly sure will fix this but please verify.
Comment 11 Jessica 2010-10-11 22:52:15 UTC
Verified with latest RC1 branch