Bug 5773 - Recipes fail to rebuild from sstate-cache
Summary: Recipes fail to rebuild from sstate-cache
Status: VERIFIED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 1.6
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 1.6 M4
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-01-30 13:11 UTC by Stoicescu Cornel
Modified: 2014-04-01 14:05 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
dpkg-nativegit do_configure error (10.93 KB, text/plain)
2014-02-28 09:55 UTC, Stoicescu Cornel
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stoicescu Cornel 2014-01-30 13:11:48 UTC
The following recipes failed the below test: libtool-cross eglibc-initial gcc-cross-initial iptables make e2fsprogs-native dpkg-native oprofile

1) set MACHINE = "qemux86-64" in local.conf
2) 'bitbake core-image-sato-sdk'
3) 'rm -R tmp'
4) 'bitbake -ccleansstate <recipe>'
5) 'bitbake <recipe>'

NOTE 1: All recipes are dependencies of core-image-sato-sdk

NOTE 2: The issue was found using sstate stress testing and oe-selftest:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=464c120036011f2d8e5ce5f33a5d449fa0fefc83
Comment 1 Richard Purdie 2014-02-24 15:11:57 UTC
Patch out for review which likely fixes libtool-cross eglibc-initial gcc-cross-initial.

iptables make e2fsprogs-native dpkg-native oprofile remain as needing investigation
Comment 2 Richard Purdie 2014-02-24 15:47:01 UTC
It appears all the other packages listed are fixed by this patch too!
Comment 3 Richard Purdie 2014-02-24 17:02:10 UTC
Mark as in review.
Comment 4 Richard Purdie 2014-02-25 09:54:20 UTC
Fixed in master, http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=e4ef6bbc21949957d9009757fe24ffd57bcd83b9. We probably need to retest this now as this was a significant change.
Comment 5 Stoicescu Cornel 2014-02-27 08:30:04 UTC
I ran the tests and indeed most packages have been fixed but one remains: dpkg-native. 

For the record, this is my test environment:
Distro: Ubuntu 13.10
poky master:72576e2d04dc8b43ae0d7f31cddd74318f52103e

Command used: 'oe-selftest _sstatetests_noauto'
NOTE: the above command takes a lot of time, aprox. 1.5 days on my case on a i7 system, as it checks 2 scenarios and a lot of packages.
Comment 6 Richard Purdie 2014-02-27 23:39:57 UTC
I am admittedly testing this outside of the script since I don't have 1.5 days of build time to spare. Can you:

a) confirm if this can be reproduced outside the script by cleansstate of dpkg-native then rebuilding

b) Attach the error log of the failed build to this bug so we can see how it failed

I've tried to reproduce locally and cannot. It may be there is a specific sequence that has to be used to reproduce it.
Comment 7 Richard Purdie 2014-02-28 00:03:50 UTC
I did notice one odd thing about dpkg-native, it has a RDEPENDS on the target xz (not the native one). I've sent out a patch for this, it may or may not be the issue, unsure.
Comment 8 Richard Purdie 2014-02-28 08:59:13 UTC
I'm wondering if xz is missing on your test machine yet its installed on the one I'm testing on. That would explain the different behaviour, at least potentially.
Comment 9 Stoicescu Cornel 2014-02-28 09:54:58 UTC
The steps to reproduce this are:
1) set MACHINE = "qemux86" in local.conf
2) 'bitbake dpkg-native'
3) 'rm -R tmp'
4) 'bitbake -ccleansstate dpkg-native'
5) 'bitbake dpkg-native'

See attached text output.
Comment 10 Stoicescu Cornel 2014-02-28 09:55:33 UTC
Created attachment 1789 [details]
dpkg-nativegit do_configure error
Comment 11 Stoicescu Cornel 2014-02-28 10:22:33 UTC
Issue is still present on latest master:

commit 5ab9d7e28f987fba8bab03bb7851c263f746c208
Author: Richard Purdie <richard.purdie@linuxfoundation.org>
Date:   Wed Feb 26 13:40:41 2014 +0000

    security-flags: Avoid lttng-tools issue on arm

    (From OE-Core rev: 010d5b437413156c3f4dc90a14698231bb195c2e)

    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Comment 12 Stoicescu Cornel 2014-02-28 10:25:20 UTC
Also I have xz-utils installed. Do you need further information?
Comment 13 Richard Purdie 2014-02-28 14:10:16 UTC
The log helps *massively*, its bzip2-native which is the problem, mainly due to it being in ASSUME_PROVIDED.

We probably need something like:

diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
index c0c897c..471151e 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -6,7 +6,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/d/dpkg/dpkg_${PV}.tar.xz \
            file://ignore_extra_fields.patch"
 
 DEPENDS = "zlib bzip2 perl ncurses"
-DEPENDS_class-native = "bzip2-native zlib-native virtual/update-alternatives-native gettext-native perl-native"
+DEPENDS_class-native = "bzip2-replacement-native zlib-native virtual/update-alternatives-native gettext-native perl-native"
 RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} xz"
 RDEPENDS_${PN}_class-native = "xz-native"
Comment 14 Richard Purdie 2014-02-28 15:49:48 UTC
Patch in review on the mailing list.
Comment 15 Alexandru Palalau 2014-03-21 13:07:29 UTC
I have the same behavior for glib-2.0-native.
Master branch, Commit ID: 49aad7da07e187f206e963001844605731b01247
This was tested also outside the oe-selftest script.
Comment 16 Richard Purdie 2014-03-24 14:00:59 UTC
I've posted a patch for this. In future, please do include the logs of the failure. This bug shouldn't get reopened each time we have one of these kinds of failures either, they should move to new specific bugs in future.
Comment 18 Stoicescu Cornel 2014-04-01 14:05:12 UTC
Verified in poky master:8210928e847fda7dbc145a94372b0beaf653a4f9