From: Hongxu Jia <hongxu.jia@windriver.com>
To: <openembedded-core@lists.openembedded.org>, <ross.burton@intel.com>
Subject: Re: [PATCH 0/1] fix IMAGE_LINGUAS did not support multilib correctly
Date: Thu, 14 Jan 2016 14:48:15 +0800 [thread overview]
Message-ID: <569744AF.5060009@windriver.com> (raw)
In-Reply-To: <cover.1449743618.git.hongxu.jia@windriver.com>
Hi Ross,
I found you added this patch to 'Consolidated Pull', but not merged finally.
Did it cause build failure or introduce trouble?
//Hongxu
On 12/10/2015 06:41 PM, Hongxu Jia wrote:
> Test steps:
>
> 1. Make use of service in meta-skeleton to test the issue.
> The app invoke setlocale(LC_CTYPE, "en_US.UTF-8") in C.
>
> --- a/meta-skeleton/recipes-skeleton/service/service/skeleton_test.c
> +++ b/meta-skeleton/recipes-skeleton/service/service/skeleton_test.c
> @@ -1,12 +1,13 @@
> -#include <unistd.h>
> -
> -/* This demo does nothing except for testing /etc/init.d/skeleton */
> +#include <locale.h>
> +#include <stdio.h>
> +#include <errno.h>
> +#include <string.h>
>
> int main(int argc, char *argv[])
> {
> - daemon(0, 0);
> - while (1) {
> - sleep(1);
> - }
> - return 0;
> + char *p = setlocale (LC_CTYPE, "en_US.UTF-8");
> + if (p == NULL)
> + printf("setlocale failed: %s\n", strerror(errno));
> + else
> + printf("p %s\n", p);
> }
>
> --- a/meta-skeleton/recipes-skeleton/service/service_0.1.bb
> +++ b/meta-skeleton/recipes-skeleton/service/service_0.1.bb
> @@ -1,4 +1,4 @@
> -SUMMARY = "The canonical example of init scripts"
> +SUMMARY = "The example to test multilib of setlocale"
> SECTION = "base"
> LICENSE = "GPLv2"
> LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYRIGHT;md5=349c872e0066155e1818b786938876a4"
> @@ -8,24 +8,14 @@ SRC_URI = "file://skeleton \
> file://COPYRIGHT \
> "
>
> +FILES_${PN} += "${libdir}/setlocale"
> +
> do_compile () {
> - ${CC} ${WORKDIR}/skeleton_test.c -o ${WORKDIR}/skeleton-test
> + ${CC} ${WORKDIR}/skeleton_test.c -o ${WORKDIR}/setlocale
> }
>
> do_install () {
> - install -d ${D}${sysconfdir}/init.d
> - cat ${WORKDIR}/skeleton | \
> - sed -e 's,/etc,${sysconfdir},g' \
> - -e 's,/usr/sbin,${sbindir},g' \
> - -e 's,/var,${localstatedir},g' \
> - -e 's,/usr/bin,${bindir},g' \
> - -e 's,/usr,${prefix},g' > ${D}${sysconfdir}/init.d/skeleton
> - chmod a+x ${D}${sysconfdir}/init.d/skeleton
> -
> - install -d ${D}${sbindir}
> - install -m 0755 ${WORKDIR}/skeleton-test ${D}${sbindir}/
> + install -d ${D}${libdir}
> + install -m 0755 ${WORKDIR}/setlocale ${D}${libdir}/
> }
>
> -RDEPENDS_${PN} = "initscripts"
> -
> -CONFFILES_${PN} += "${sysconfdir}/init.d/skeleton"
>
>
> 2. On qemux86-64, enable multilib, add non-multilib and
> multilib service to image, assign 'en-us' to IMAGE_LINGUAS
> vim local.conf
> ...
> MACHINE ?= "qemux86-64"
>
> require conf/multilib.conf
> MULTILIBS = "multilib:lib32"
> DEFAULTTUNE_virtclass-multilib-lib32 = "core2-32"
>
> IMAGE_INSTALL_append = " file service lib32-service"
> IMAGE_LINGUAS_append = " en-us"
> ...
>
> vim bblayers.conf
> ...
> BBLAYERS ?= " \
> /buildarea/raid0/hjia/poky/meta \
> /buildarea/raid0/hjia/poky/meta-yocto \
> /buildarea/raid0/hjia/poky/meta-skeleton \
> "
> ...
>
> 2. Build non-multilib image
> $ bitbake core-image-minimal
>
> 3. Run qemu
> $ runqemu qemux86-64 core-image-minimal slirp nographic
>
> 4. In qemu, invoke multilib /usr/lib/setlocale and non-multilib
> /usr/lib64/setlocale success
>
> root@qemux86-64:~# file /usr/lib/setlocale
> /usr/lib/setlocale: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=0caa404112fe8963dd1418757fc4bdee0cab272d, stripped
> root@qemux86-64:~# /usr/lib/setlocale
> p en_US.UTF-8
>
> root@qemux86-64:~# file /usr/lib64/setlocale
> /usr/lib64/setlocale: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=b8c88222213ffbd4603b34337b3db71aba43c968, stripped
> root@qemux86-64:~#
> root@qemux86-64:~# /usr/lib64/setlocale
> p en_US.UTF-8
>
> 5. Both locale-base-en-us and lib32-locale-base-en-us installed
> root@qemux86-64:~# ls /usr/lib64/locale/en_US/
> LC_ADDRESS LC_CTYPE LC_MEASUREMENT LC_MONETARY LC_NUMERIC LC_TELEPHONE
> LC_COLLATE LC_IDENTIFICATION LC_MESSAGES
>
> root@qemux86-64:~# ls /usr/lib/locale/en_US/
> LC_ADDRESS LC_CTYPE LC_MEASUREMENT LC_MONETARY LC_NUMERIC LC_TELEPHONE
> LC_COLLATE LC_IDENTIFICATION LC_MESSAGES
>
> 6. Build multilib image
> $ bitbake lib32-core-image-minimal
>
> 7. Run qemu
> $ runqemu qemux86-64 lib32-core-image-minimal slirp nographic
>
> 8. Both locale-base-en-us and lib32-locale-base-en-us installed
> root@qemux86-64:~# ls /usr/lib64/locale/en_US/
> LC_ADDRESS LC_CTYPE LC_MEASUREMENT LC_MONETARY LC_NUMERIC LC_TELEPHONE
> LC_COLLATE LC_IDENTIFICATION LC_MESSAGES
>
> root@qemux86-64:~# ls /usr/lib/locale/en_US/
> LC_ADDRESS LC_CTYPE LC_MEASUREMENT LC_MONETARY LC_NUMERIC LC_TELEPHONE
> LC_COLLATE LC_IDENTIFICATION LC_MESSAGES
>
> 9. Disable multilib and build core-image-minimal
> only locale-base-en-us is installed
>
> root@qemux86-64:~# /usr/lib/setlocale
> p en_US.UTF-8
>
> root@qemux86-64:~# file /usr/lib/setlocale
> /usr/lib/setlocale: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=bc6d1a23619ad5629f8e064ce8e426d5d8b20434, stripped
>
> root@qemux86-64:~# ls /usr/lib/locale/en_US/
> LC_ADDRESS LC_CTYPE LC_MEASUREMENT LC_MONETARY LC_NUMERIC LC_TELEPHONE
> LC_COLLATE LC_IDENTIFICATION LC_MESSAGES LC_NAME LC_PAPER LC_TIME
>
> //Hongxu
>
> The following changes since commit 5e3e2e0cbb0a49986f4653e64c4c8d2b5461645e:
>
> poky.conf: Bump for 2.1 development (2015-12-10 00:13:13 +0000)
>
> are available in the git repository at:
>
> git://git.pokylinux.org/poky-contrib hongxu/fix-locale
> http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/fix-locale
>
> Hongxu Jia (1):
> image/multilib bbclass: install multilib and non-multilib language
> pkgs for image recipes
>
> meta/classes/image.bbclass | 20 +++++++++++++++++++-
> meta/classes/multilib.bbclass | 9 +++++++++
> 2 files changed, 28 insertions(+), 1 deletion(-)
>
prev parent reply other threads:[~2016-01-14 6:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-10 10:41 [PATCH 0/1] fix IMAGE_LINGUAS did not support multilib correctly Hongxu Jia
2015-12-10 10:41 ` [PATCH 1/1] image/multilib bbclass: install multilib and non-multilib language pkgs for image recipes Hongxu Jia
2016-01-14 6:54 ` Robert Yang
2016-01-14 7:08 ` Hongxu Jia
2016-01-14 6:48 ` Hongxu Jia [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=569744AF.5060009@windriver.com \
--to=hongxu.jia@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=ross.burton@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.