When using the sstate cache, mklibs fails. Steps to reproduce: . ./oe-init-build-env o1 Use the sstate-cache directory of ${TOPDIR}/../sstate-cache build an image (core-image-minimal is fine) cd .. rm -rf o1 . ./oe-init-build-env o2 Use the same configuration as before and enable mklibs: Enable mklibs in local.conf: MKLIBS_OPTIMIZED_IMAGES ?= "all" build an image (same as before) You should get an error: | reducing libutil.so.1 | Command failed with status 1 : i586-wrs-linux-gcc -nostdlib -nostartfiles -shared -Wl,-soname=libutil.so.1 -uopenpty -o /space/jw/5/o2/bitbake_build/tmp/work/common_pc-wrs-linux/wrlinux-image-glibc-small-1.0-r0/mklibs/dest/libutil.so.1-so /space/jw/5/o2/bitbake_build/tmp/sysroots/common-pc/usr/lib//libutil_pic.a -Wl,--version-script=/space/jw/5/o2/bitbake_build/tmp/sysroots/common-pc/usr/lib//libutil_pic.map -lgcc -L/space/jw/5/o2/bitbake_build/tmp/work/common_pc-wrs-linux/wrlinux-image-glibc-small-1.0-r0/mklibs/dest -L/space/jw/5/o2/bitbake_build/tmp/sysroots/common-pc/usr/X11R6/lib/ -lc | With output: | ERROR: Function failed: do_rootfs (see /space/jw/5/o2/bitbake_build/tmp/work/common_pc-wrs-linux/wrlinux-image-glibc-small-1.0-r0/temp/log.do_rootfs.15750 for further information)
So I dug into this and it seems that gcc has internally cached the sysroot from the prior build, so when mklibs calls gcc with no --sysroot set, it defaults to the one from the o1 build and fails. If I changed change the call to mklibs scripts to include a --gcc-options with --sysroot=o2/..., then it works correctly since the --sysroot option is passed on to gcc via mklibs. At this point, I think its a mklibs.bbclass or a mklib (the script_ bug that it does not pass --sysroot on the --gcc-options or use the --sysroot that is set on the mklibs to pass on to gcc, I am not sure.
A patch to master has already been incorporated that should fix this: oe-core: d2cd2ccea8bc4d110647ba3bd202772e5407000a
Nope, I just tested this yesterday and this issue still exists, that might have solved a different issue, but not this particular one.
i have been debugging this issue today, and came up with the same conclusion as Saul. I have submitted the following patch http://lists.openembedded.org/pipermail/openembedded-core/2013-November/086887.html I could verify it solved the problem on my setup. the patch applies to dylan, dora and master (i haven't tried older release). Since it's a bug, i hope we can get it merged on dylan and dora since i am using both for products.
(In reply to comment #4) > i have been debugging this issue today, and came up with the same conclusion > as Saul. I have submitted the following patch > > http://lists.openembedded.org/pipermail/openembedded-core/2013-November/ > 086887.html This patch look ok to me. > > I could verify it solved the problem on my setup. > > the patch applies to dylan, dora and master (i haven't tried older release). > Since it's a bug, i hope we can get it merged on dylan and dora since i am > using both for products.
This was fixed with http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=6cdecac4ef4b43917935aa0f5fb80548237ea92b