Bug 161

Summary: [toolchain] Cannot build LTP with ppc/arm toolchain
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Jiajun Xu <jiajun.xu>
Component: devtools / tool chainAssignee: Nitin Kamble <nitin.a.kamble>
Status: VERIFIED FIXED QA Contact:
Severity: critical    
Priority: High CC: kevin.tian, meta.mr.watcher, meta.watcher, sgw
Version: 0.9   
Target Milestone: 0.9 M2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Program Management Documentation change: ---

Description Jiajun Xu 2010-07-29 06:40:09 UTC
Testing Env:    
Host: Ubuntu 10.04 LTS
Kernel: 2.6.32-21-generic-pae
Poky gitinfo(used to build qemu-native):
faf6b2d33e8ce7fe7fdf5d8379b19c2e49b8c997 (git://git.pokylinux.org/poky.git)
Toolchain tarball location: http://yoctobuild01.jf.intel.com/milestone/20100725-1/

With the toolchain tarballs for ppc and arm from M2 20100725 build, LTP (20100430) cannot be built successfully.

With ppc toolchain, error is like following:
#########
root@vt-nhm4:/home/jxu49/test/M2-20100725/images/tmp/ppc/ltp-full-20100430# make
make -C "lib" \
                -f "/home/jxu49/test/M2-20100725/images/tmp/ppc/ltp-full-20100430/lib/Makefile" all
make[1]: Entering directory `/home/jxu49/test/M2-20100725/images/tmp/ppc/ltp-full-20100430/lib'
powerpc-poky-linux-gcc -mcpu=603e -mhard-float -g -O2 -fno-strict-aliasing -pipe -Wall  -I../include -I../include  -c -o databin.o databin.c
In file included from /opt/poky/sysroots/powerpc-poky-linux/usr/include/sys/param.h:26,
                 from databin.c:33:
/opt/poky/sysroots/i586-pokysdk-linux/usr/lib/gcc/powerpc-poky-linux/4.3.3/include-fixed/limits.h:11:23: error: syslimits.h: No such file or directory
make[1]: *** [databin.o] Error 1
make[1]: Leaving directory `/home/jxu49/test/M2-20100725/images/tmp/ppc/ltp-full-20100430/lib'
make: *** [lib-all] Error 2
#########

With arm toolchain, error is like following:
#########
root@vt-nhm4:/home/jxu49/test/M2-20100725/images/tmp/arm/ltp-full-20100430# make
make -C "lib" \
                -f "/home/jxu49/test/M2-20100725/images/tmp/arm/ltp-full-20100430/lib/Makefile" all
make[1]: Entering directory `/home/jxu49/test/M2-20100725/images/tmp/arm/ltp-full-20100430/lib'
arm-poky-linux-gnueabi-gcc -march=armv5te -mtune=arm926ej-s -g -O2 -fno-strict-aliasing -pipe -Wall  -I../include -I../include  -c -o databin.o databin.c
In file included from /opt/poky/sysroots/arm-poky-linux-gnueabi/usr/include/sys/param.h:26,
                 from databin.c:33:
/opt/poky/sysroots/arm-poky-linux-gnueabi/usr/include/limits.h:125:26: error: no include path in which to search for limits.h
make[1]: *** [databin.o] Error 1
make[1]: Leaving directory `/home/jxu49/test/M2-20100725/images/tmp/arm/ltp-full-20100430/lib'
make: *** [lib-all] Error 2
#########
Comment 1 Nitin Kamble 2010-07-29 17:32:36 UTC
how to reproduce this issue ?
are there steps to follow for reproducing ?
Comment 2 Jiajun Xu 2010-07-29 17:42:37 UTC
What I did is:
1. Download ppc/arm toolchain tarball from http://yoctobuild01.jf.intel.com/milestone/20100725-1/toolchain/i586/
2. extract toolchain tarball to /opt/poky
3. Download LTP from http://sourceforge.net/projects/ltp/files/LTP%20Source/ltp-20100430/ltp-full-20100430.tgz/download
4. extract LTP and cd into LTP folder
5. For ARM, Run 
"source /opt/poky/environment-setup-arm-poky-linux-gnueabi"
"./configure --host=arm-poky-linux-gnueabi && make"
For PPC, Run
"source /opt/poky/environment-setup-powerpc-poky-linux"
"./configure --host=powerpc-poky-linux"

Then you can see the error.
BTW, i586 and mips toolchain has no such compile issue.
Comment 3 Nitin Kamble 2010-07-30 09:33:41 UTC
Has this worked before? if yes what revision of poky tree?
Comment 4 Nitin Kamble 2010-07-30 14:01:19 UTC
This is root caused as a limits.h filename (with others) getting truncated to limi . This is identified as opkg unarchive bug.
Comment 5 Nitin Kamble 2010-07-30 16:09:07 UTC
sent a patch to opkg to fix this issue. 
commit is here: 

http://git.pokylinux.org/cgit.cgi/poky/commit/?id=983b094ed0b774c73f51a24b79f85f3b2c9f91be
Comment 6 Nitin Kamble 2010-07-30 16:10:35 UTC
verified ltp can built with newer toolchain tarball.

Nitin
Comment 8 Jiajun Xu 2010-08-03 06:22:15 UTC
Verified with M2-20100731 build, the bug is fixed.