Bug 339 - on qemumips, "bitbake poky-image-minimal" will fail if eglibc is used.
Summary: on qemumips, "bitbake poky-image-minimal" will fail if eglibc is used.
Status: CLOSED DUPLICATE of bug 226
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: 0.9
Hardware: x86 mips
: High major
Target Milestone: 0.9 M4
Assignee: Dexuan Cui
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2010-09-17 21:04 UTC by Dexuan Cui
Modified: 2010-12-21 06:07 UTC (History)
6 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dexuan Cui 2010-09-17 21:04:10 UTC
I use the M3 build (commit 14830c80)plus cherry picking the latest Nitin's
eglibc fix (commit d6e8013a8c1c43) and plus my patch
fix_Conflicting_PREFERRED_PROVIDER_for_glibc-gconv.patch (see comment 3 of Bug
329)

eglibc is enabled in the following way:
diff meta/conf/distro/poky.conf
-POKYLIBC ?= "glibc"
+POKYLIBC ?= "eglibc"

First, I tried "bitbake poky-image-sdk" and it failed:

NOTE: package eglibc-2.12-r6: task do_package: Started
NOTE: preparing tree for binary locale generation
NOTE: generating locale es_NI (UTF-8)
NOTE: cmd:
NOTE: PATH="/distro/dcui/dexuan-mips/build/tmp/sysroots/i686-linux/usr/bin/mips-poky-linux:/distro/dcui/dexuan-mips/build/tmp/sysroots/mips-poky-linux/usr/bin/crossscripts:/distro/dcui/dexuan-mips/build/tmp/sysroots/i686-linux/usr/sbin:/distro/dcui/dexuan-mips/build/tmp/sysroots/i686-linux/usr/bin:/distro/dcui/dexuan-mips/build/tmp/sysroots/i686-linux/sbin:/distro/dcui/dexuan-mips/build/tmp/sysroots/i686-linux//bin:/distro/dcui/dexuan-mips/build/tmp/sysroots/i686-linux/usr/bin/mips-poky-linux:/distro/dcui/dexuan-mips/build/tmp/sysroots/mips-poky-linux/usr/bin/crossscripts:/distro/dcui/dexuan-mips/build/tmp/sysroots/i686-linux/usr/sbin:/distro/dcui/dexuan-mips/build/tmp/sysroots/i686-linux/usr/bin:/distro/dcui/dexuan-mips/build/tmp/sysroots/i686-linux/sbin:/distro/dcui/dexuan-mips/build/tmp/sysroots/i686-linux//bin:/distro/dcui/dexuan-mips/scripts/..//bitbake//bin/:/distro/dcui/dexuan-mips/scripts/..//scripts:/distro/dcui/dexuan-arm/scripts/..//bitbake//bin/:/distro/dcui/dexuan-arm/scripts/..//scripts:/distro/dcui/dexuan/scripts/..//bitbake//bin/:/distro/dcui/dexuan/scripts/..//scripts:/distro/dcui/dexuan/scripts/..//bitbake//bin/:/distro/dcui/dexuan/scripts/..//scripts:/distro/dcui/dexuan/scripts/..//bitbake//bin/:/distro/dcui/dexuan/scripts/..//scripts:/osel/dcui/nt/pc/scripts/..//bitbake//bin/:/osel/dcui/nt/pc/scripts/..//scripts:/osel/dcui/nt/pc/scripts/..//bitbake//bin/:/osel/dcui/nt/pc/scripts/..//scripts:/home/dcui/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/distro/dcui/dexuan/scripts:/distro/dcui/dexuan/scripts" I18NPATH="/distro/dcui/dexuan-mips/build/tmp/work/mips-poky-linux/eglibc-2.12-r6/locale-tree/usr/share/i18n" qemu-mips -L /distro/dcui/dexuan-mips/build/tmp/work/mips-poky-linux/eglibc-2.12-r6/locale-tree          -E LD_LIBRARY_PATH=/distro/dcui/dexuan-mips/build/tmp/work/mips-poky-linux/eglibc-2.12-r6/locale-tree/lib  /distro/dcui/dexuan-mips/build/tmp/work/mips-poky-linux/eglibc-2.12-r6/locale-tree/bin/localedef --force --old-style --no-archive --prefix=/distro/dcui/dexuan-mips/build/tmp/work/mips-poky-linux/eglibc-2.12-r6/locale-tree            --inputfile=/usr/share/i18n/locales/es_NI --charmap=UTF-8 es_NI
NOTE: stdout:
NOTE:
NOTE: stderr:
NOTE:
ERROR: Task failed: localedef returned an error
NOTE: package eglibc-2.12-r6: task do_package: Failed
ERROR: Task 475 (/distro/dcui/dexuan/meta/recipes-core/eglibc/eglibc_2.12.bb, do_package) failed with 1
Waiting for 1 active tasks to finish:
1: eglibc-2.12-r6 do_populate_sysroot (pid 6676)
NOTE: package eglibc-2.12-r6: task do_populate_sysroot: Succeeded
ERROR: '/distro/dcui/dexuan/meta/recipes-core/eglibc/eglibc_2.12.bb' failed


Later, I tried "bitbake poky-image-minimal" and it also failed in the same way.
Comment 1 Dexuan Cui 2010-09-21 01:12:18 UTC
> ERROR: Task failed: localedef returned an error

The failure occurs here:

 def output_locale_binary(name, pkgname, locale, encoding):
        ...
        cmd = "PATH=\"%s\" I18NPATH=\"%s\" %s -L %s \
            -E LD_LIBRARY_PATH=%s %s %s/bin/localedef %s" % \
            (path, i18npath, qemu, treedir, ldlibdir, qemu_options, treedir, localedef_opts)
        bb.note("generating locale %s (%s)" % (locale, encoding))
        import subprocess
        process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        if process.wait() != 0:
        ...
        raise bb.build.FuncFailed("localedef returned an error")

After adding log for process.wait(), it's -11 every time.
-11 is -SIGSEGV. It means the qemu-mips in the variable cmd crash with a segfault.

However, when I run manually the long cmd string in shell, it is ok!
This is really strange... looking into this.
Comment 2 Dexuan Cui 2010-09-25 21:26:53 UTC
The issue has been worked around -- see the commit info in Bug 226.

*** This bug has been marked as a duplicate of bug 226 ***
Comment 3 Jessica 2010-10-14 16:21:22 UTC
close as a dup