Bug 3835 - meta-toolchain is failing to build
Summary: meta-toolchain is failing to build
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 1.4
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.4
Assignee: Bogdan Marinescu
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-02-03 18:31 UTC by Khem Raj
Modified: 2013-02-06 23:39 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments
patch which fixes issue seen with undefined src (1.25 KB, patch)
2013-02-06 21:58 UTC, Khem Raj
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Khem Raj 2013-02-03 18:31:00 UTC
With recent commits meta-toolchain is failing to build. It was building fine until
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=33c6c411ea7ada066122b758b05abf7472ca0a16

| Configuring libc6.
| Configuring eglibc-localedata-translit-fraction.
| Configuring eglibc-extra-nss.
| Configuring eglibc-localedata-iso14651-t1-common.
| Configuring eglibc-localedata-iso14651-t1.
| Configuring libgcc1.
| Configuring libstdc++6.
| Configuring libthread-db1.
| Configuring libcidn1.
| Configuring libc6-dev.
| Configuring libgcc-s-dev.
| Configuring libstdc++-dev.
| Configuring eglibc-gconv.
| Configuring eglibc-gconv-iso8859-1.
| Configuring eglibc-utils.
| Configuring eglibc-localedata-translit-small.
| Configuring eglibc-localedata-translit-circle.
| Configuring eglibc-localedata-translit-cjk-compat.
| Configuring eglibc-localedata-translit-compat.
| Configuring eglibc-localedata-translit-narrow.
| Configuring eglibc-localedata-translit-wide.
| Configuring eglibc-localedata-translit-font.
| Configuring eglibc-localedata-translit-neutral.
| Configuring eglibc-gconv-cp1252.
| Configuring eglibc-gconv-ibm850.
| Configuring eglibc-localedata-i18n.
| Configuring libsegfault.
| Configuring libc6-dbg.
| Configuring eglibc-gconv-iso8859-15.
| Configuring packagegroup-core-standalone-sdk-target.
| Collected errors:
|  * satisfy_dependencies_for: Cannot satisfy the following dependencies for packagegroup-core-standalone-sdk-target-dbg:
|  *    libc6 (= 2.17-r2) *
|  * opkg_install_cmd: Cannot install package packagegroup-core-standalone-sdk-target-dbg.
| DEBUG: Python function do_populate_sdk finished
| ERROR: Function failed: populate_sdk_image (see /b/kraj/angstrom/build/tmp-angstrom_next-eglibc/work/armv5te-angstrom-linux-gnueabi/meta-toolchain/1.0-r7/temp/log.do_populate_sdk.1496 for further information)
ERROR: Task 7 (/b/kraj/angstrom/sources/openembedded-core/meta/recipes-core/meta/meta-toolchain.bb, do_populate_sdk) failed with exit code '1'
Comment 1 Khem Raj 2013-02-03 20:39:51 UTC
git bisect shows below commit to be faulty

244f107c1f11bb74b5a489e4f24eac93706aa584 is the first bad commit
commit 244f107c1f11bb74b5a489e4f24eac93706aa584
Author: Richard Purdie <richard.purdie@linuxfoundation.org>
Date:   Tue Jan 29 14:10:30 2013 +0000

    package: Create global package file list and use throughout PACKAGEFUNCS

    Currently we do a signficant amount of tree traversal in many different places
    which in inefficient. We can assume that the files don't change and cache the
    file list which gives an efficiency improvement which this patch does using
    a global variable.

    (From OE-Core rev: 2d7608842d2dab07065e60aab729a5c8fd6b7907)

    (From OE-Core rev: 5c7c8347eb1bc25d194be6f4be142ba0924e2600)

    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Comment 2 Richard Purdie 2013-02-04 11:45:32 UTC
meta-toolchain is working fine on the autobuilder and fine locally. We're therefore missing some key part of what the problem is here, even if that commit does cause it :/.
Comment 3 Khem Raj 2013-02-04 19:04:46 UTC
It works fine with OE-Core default setup true.
I have angstrom setup where it fails like below
and there is another poky setup where I have multilib enabled in local.conf
and it fails in same way.
Comment 4 Saul Wold 2013-02-06 04:07:08 UTC
I attempted to build from the same commit and was able to build the meta-toolchain with Poky and Multilib enabled, can you verify your local.conf and possibly provide a diff?
Comment 5 Khem Raj 2013-02-06 05:30:08 UTC
since I had two distros, angstrom and poky derived distros both failing, it took me a while to get to the cause of issue. It happens when you enable PR server

set

PRSERV_HOST = "localhost:0"

in your local.conf and then

bitbake meta-toolchain 

from scratch

and you will be able to reproduce it.
Comment 6 Richard Purdie 2013-02-06 14:46:12 UTC
My local build with PR server enabled worked...
Comment 7 Richard Purdie 2013-02-06 16:54:50 UTC
Please retest with the package.bbclass change related to the PR service that just merged to master. This could well solve the issues.
Comment 8 Khem Raj 2013-02-06 18:49:32 UTC
OK I think this could have been fixed as I see but I could not verify all cases I have here since now I am stumbling into new error. While building luajit-2.0 recipe from meta-oe which was all good until yerterday so some progress some regress. I use to get this "already stripped, this will prevent future debugging" warning for this recipe but thats all. Now its failing

UnboundLocalError: local variable 'src' referenced before assignment

ERROR: The stack trace of python calls that resulted in this exception/failure was:
ERROR:   File "split_and_strip_files", line 206, in <module>
ERROR:
ERROR:   File "split_and_strip_files", line 99, in split_and_strip_files
ERROR:
ERROR: The code that was being executed was:
ERROR:      0202:    # End of strip
ERROR:      0203:    #
ERROR:      0204:
ERROR:      0205:
ERROR:  *** 0206:split_and_strip_files(d)
ERROR:      0207:
ERROR: [From file: 'split_and_strip_files', lineno: 206, function: <module>]
ERROR:      0095:                    # ...but is it ELF, and is it already stripped?
ERROR:      0096:                    elf_file = isELF(file)
ERROR:      0097:                    if elf_file & 1:
ERROR:      0098:                        if elf_file & 2:
ERROR:  *** 0099:                            bb.warn("File '%s' from %s was already stripped, this will prevent future debugging!" % (src, pn))
ERROR:      0100:                            continue
ERROR:      0101:                        # Check if it's a hard link to something else
ERROR:      0102:                        if s.st_nlink > 1:
ERROR:      0103:                            file_reference = "%d_%d" % (s.st_dev, s.st_ino)
ERROR: [From file: 'split_and_strip_files', lineno: 99, function: split_and_strip_files]
ERROR: Function failed: split_and_strip_files
Comment 9 Khem Raj 2013-02-06 21:58:44 UTC
Created attachment 1064 [details]
patch which fixes issue seen with undefined src

This patch fixes the intermediate problem.
Comment 10 Khem Raj 2013-02-06 22:30:57 UTC
with the above fix applied I have now confirm that the original issue does not exist anymore so the commits with Richard mentioned must have fixed it. But we still need the above fix for different reason.