Monday, September 15, 2008

gcc or glibc?

Here is one more story of running into another problem with OpenEmbedded toolchain/SDK feature.

When couple of weeks ago I built a gcc-4.3.1 based SDK (gcc-cross-sdk_4.3.1.bb recipe is being used in this case) and tried to use it to compile something else, I was getting the following error message about not finding limits.h header file:
/usr/include/limits.h:122:61: error: no include path in which to search for limits.h
It appears most of the OE-based SDK-providing distributions I know of (namely, OpenMoko and Poky) are based on older versions of gcc (4.1.2 at the moment for both of those mentioned). And they don't have this problem. In recent versions of gcc they've added a new include-fixed directory with some headers:

GCC trunk now has multiple internal headers directories, one containing the self-contained GCC-provided headers and one containing the (not self-contained but including libc's or a fixed version thereof) and the fixed headers; more such directories may be added in future.

So, I looked at the way non-SDK version of OE gcc-4.3.1 (gcc-cross_4.3.1.bb recipe used for that) solves this and found this hack:
# Hack till we fix *libc properly
do_stage_append() {
    ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/
}
Trying to reproduce it in the SDK recipe as well, I ended up submitting a similar fix to Bugzilla and posted it on the oe-dev mailing list. Which brought up a short discussion about the proper fix in glibc and resulted in it being fixed properly by Khem Raj here.

1 comment:

costlules said...

haah I buy alianware it is really more good than your purchase
watch how I am playing and testing it
https://www.youtube.com/watch?v=WYjqW1ICUWI&feature=youtu.be