| Summary: | uclibc as alternative libc for a multilib no longer works | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] BitBake | Reporter: | Paul Eggleton <bluelightning> |
| Component: | bitbake | Assignee: | Richard Purdie <richard.purdie> |
| Status: | VERIFIED FIXED | QA Contact: | Bogdan Alexandru Voiculescu <bogdanx.a.voiculescu> |
| Severity: | normal | ||
| Priority: | Medium | CC: | bogdanx.a.voiculescu, poky.bs.watcher, poky.watcher |
| Version: | 1.7 | ||
| Target Milestone: | 1.9 M1 | ||
| Hardware: | All | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
Paul Eggleton
2015-04-14 14:26:16 UTC
First observation is that if you comment out the "raise bb.parse.SkipPackage" anonymous python functions in the glibc recipe, the build at least doesn't abort. There are then PREFERRED_PROVIDER warnings. I think there is something odd going on with the multilib selection and BBCLASSEXTEND. I've debugged this. I thought some background on how may be useful. Commenting out the SkipParse messages meant "bitbake core-image-minimal -g" could run. If you then grep task-depends.dot, you find:
"core-image-minimal.do_configure" -> "lib32-ncurses.do_populate_sysroot"
"core-image-minimal.do_configure" -> "lib32-glibc.do_populate_sysroot"
which is a smoking gun. The question then becomes why is an image do_configure depending on those two things. This comes from TOOLCHAIN_NEED_CONFIGSITE_CACHE in toolchain-scripts. Unfortunately the value is hard to override however if you patch the class:
diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index 0e849e4..8809ec2 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -98,7 +98,7 @@ EOF
#we get the cached site config in the runtime
TOOLCHAIN_CONFIGSITE_NOCACHE = "${@siteinfo_get_files(d, True)}"
TOOLCHAIN_CONFIGSITE_SYSROOTCACHE = "${STAGING_DIR}/${MLPREFIX}${MACHINE}/${target_datadir}/${TARGET_SYS}_config_site.d"
-TOOLCHAIN_NEED_CONFIGSITE_CACHE = "${TCLIBC} ncurses"
+TOOLCHAIN_NEED_CONFIGSITE_CACHE ??= "${TCLIBC} ncurses"
#This function create a site config file
toolchain_create_sdk_siteconfig () {
then set TOOLCHAIN_NEED_CONFIGSITE_CACHE = "" in local.conf, the build will proceed correctly (even once the SkipParse is reinstated, that isn't the issue, just helps with debugging).
How we fix TOOLCHAIN_NEED_CONFIGSITE_CACHE properly needs more thought. The issue is the TCLIBC is not being used correctly in the multilib context.
To give a status update, the aforementioned workaround has been merged: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=59c09e3755f3ceabc7fc31af9346da3524e365e2 Ideally though what we really still need is a better way of handling this so you don't need to set TOOLCHAIN_NEED_CONFIGSITE_CACHE. I've also filed bug #7623 to avoid having to disable the SkipPackage/SkipRecipe when debugging situations like this in future. verified on commit: 71b0568fa43285f0946fae93fb43cea5f3bbecec no build errors found on "bitbake core-image-minimal", after enabling multilib that uses uclibc |