[OE-core] glibc-devel requirement for yocto host development system

Tudor Florea Tudor.Florea at enea.com
Mon Aug 11 13:45:09 UTC 2014


Hi,
I'd like to reach a broader audience on an issue I had and request your opinion about what could be done to prevent similar issue in the future, or at least add an appropriate note note in the yocto manual about this.

I was using a Centos 6.4  64 bit host machine to create an yocto (based) image. The host machine contained glibc-headers-2.12-1.107.el6.x86_64 and kernel-headers-2.6.32-358.el6.x86_64.rpm
Accoding to yocto manual (http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#required-packages-for-the-host-development-system) I've run the command "sudo yum install glibc-devel"
This updated glibc-header to glibc-headers-2.12-1.132.el6_5.2 (which is actually the glibc-header for the latest  Centos 6.5 available) without updating accordingly the kernel (headers).

The new glib-header define:
/usr/include/bits/syscall.h:220:#define SYS_setns __NR_setns
However the kernel symbol __NR_setns is only added on kernel-2.6.32-431.el6.x86_64.rpm (the kernel headers for Centos 6.5)

The result is: when "bitbake util-linux-native" as part of building the image I got the following error:
"/path/to/build/tmp/work/x86_64-linux/util-linux-native/2.24.1-r0/util-linux-2.24.1/include/namespace.h:40: error: '__NR_setns' undeclared (first use in this function)"

The culprit code was:
# if !defined(HAVE_SETNS) && defined(SYS_setns)
static inline int setns(int fd, int nstype)
{
        return syscall(SYS_setns, fd, nstype);
}
# endif

I managed to alleviate the issue above but I'd like to know what should be the generic solution for the issues like this that may appear again in future (e.g. when newer host distro are released).
I assume a requirement to update the kernel to be back in in sync with glibc(-header) is not feasible.
Is it a simple way to "yum_install_without_update" the required packages to avoid having the host kernel and glibc out of sync. Should something be changed (or added) in yocto manual?  
Is this a bug of Centos distro after all, cause yum command leave the host into an inconsistent state? 
Thank you,
   Tudor.




More information about the Openembedded-core mailing list