Bug 714

Summary: Missing linux kernel header files sdk-images causes posixtestsuite test to fail
Product: [Yocto Project Subprojects] Kernel Reporter: Yi Zhao <yi.zhao>
Component: kernel-toolingAssignee: Lianhao Lu <lianhao.lu>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: High CC: bruce.ashfield, dexuan.cui, jessica.zhang, jiajun.xu, liang.li2, liangliang.wang, lianhao.lu, liping.ke, sgw, yi.zhao, yp.kernel.watcher, yp.watcher
Version: 1.0   
Target Milestone: 1.0 M4   
Hardware: x86   
OS: arm   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Program Management Documentation change: ---

Description Yi Zhao 2011-02-13 23:48:21 UTC
Testing Env:    
Host: Ubuntu 10.10 x86_64
Kernel: 2.6.35-25-generic

qemuxarm sdk image from weekly build 20110212
http://autobuilder.pokylinux.org/nightly/20110212-1/qemu/qemuarm/

When I perform posixtestsuite, some cases failed and I got error log like this:

######################
conformance/interfaces/mlock/5-1: build: FAILED: Compiler output:
In file included from /usr/include/errno.h:36:0,
                 from conformance/interfaces/mlock/5-1.c:16:
/usr/include/bits/errno.h:25:26: fatal error: linux/errno.h: No such file or directory
compilation terminated.
conformance/interfaces/mlock/speculative/12-1: build: FAILED: Compiler output:
In file included from /usr/include/errno.h:36:0,
                 from conformance/interfaces/mlock/speculative/12-1.c:20:
/usr/include/bits/errno.h:25:26: fatal error: linux/errno.h: No such file or directory
compilation terminated.
conformance/interfaces/mlock/10-1: build: FAILED: Compiler output:
In file included from /usr/include/errno.h:36:0,
                 from conformance/interfaces/mlock/10-1.c:19:
/usr/include/bits/errno.h:25:26: fatal error: linux/errno.h: No such file or directory
compilation terminated.
conformance/interfaces/mlock/8-1: build: FAILED: Compiler output:
In file included from /usr/include/errno.h:36:0,
                 from conformance/interfaces/mlock/8-1.c:20:
/usr/include/bits/errno.h:25:26: fatal error: linux/errno.h: No such file or directory
compilation terminated.
############################

There is no 'linux' directory under /usr/include/ directory.

And this also causes LTP compile faild.
Comment 1 liping Ke 2011-02-15 01:23:17 UTC
PPC should have the same problem, any file include <errno.h> will meet the problem. linux headers under target rootfs /usr/include/linux are missing for the latest changeset.
Comment 2 liping Ke 2011-02-15 01:25:20 UTC
Also, it's missing in meta-toolchain-sdk tarball, besides target rootfs. We meet the problem in ppc build.

Thanks,
criping
Comment 3 liping Ke 2011-02-15 01:49:41 UTC
This bug is there, not sure whether I have done a wrong ops to mark it as "fixed". So reopen it.
Comment 4 Dexuan Cui 2011-02-15 02:58:52 UTC
Lianhao has got the root cause and will send out the patch:

diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers-yocto_git.bb b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers-yocto_git.bb
index 0d58354..14e6b60 100644
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers-yocto_git.bb
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers-yocto_git.bb
@@ -6,6 +6,8 @@ B = "${S}"
 INHIBIT_DEFAULT_DEPS = "1"
 DEPENDS += "unifdef-native"
 PROVIDES = "linux-libc-headers"
+RPROVIDES_${PN}-dev = "linux-libc-headers-dev"
+
 PV = "2.6.37+git-${SRCPV}"
 PR = "r2"
Comment 5 Lianhao Lu 2011-02-16 17:16:22 UTC
Fixed in commits http://git.pokylinux.org/cgit/cgit.cgi/poky/commit/?id=afd4169bd24d4a14f59df5622efdcf5c6eb08eb2. 

Added RPROVIDES_${PN}-dev and RPROVIDES_${PN}-dbg for
linux-libc-headers-yocto to provides "linux-libc-headers-dev" and
"linux-libc-headers-dbg" respectively.

This resolved the dependency issue of libc6-dev depending upon
linux-libc-headers-dev. Package linux-libc-headers-yocto-dev will be
installed as linux-libc-headers-dev.
Comment 6 Lianhao Lu 2011-02-20 22:00:52 UTC
*** Bug 694 has been marked as a duplicate of this bug. ***
Comment 7 Yi Zhao 2011-03-07 21:22:48 UTC
Verified on nightly build 20110305
http://autobuilder.yoctoproject.org/nightly/20110305-4/machines/