Bug 8089 - lib32 sdk is broken
Summary: lib32 sdk is broken
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 1.8
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.0
Assignee: Robert Yang
QA Contact: Bogdan Alexandru Voiculescu
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-08-03 02:47 UTC by Robert Yang
Modified: 2015-10-23 15:00 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

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Yang 2015-08-03 02:47:01 UTC
local.conf:

MACHINE ?= "qemux86-64"

require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"

$ bitbake lib32-core-image-minimal -cpopulate_sdk

$ ./tmp/deploy/sdk/poky-glibc-x86_64-lib32-core-image-minimal-core2-64-toolchain-1.8+snapshot.sh

Install it to ../sdk

$ cd ../sdk

$ source environment-setup-core2-64-poky-linux 
Or environment-setup-x86-pokymllib32-linux'

While hello.c is:
main(){}

We can see that both of them are broken:

$CC hello.c
/buildarea/lyang1/sdk/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/4.9.3/real-ld: cannot find crt1.o: No such file or directory
/buildarea/lyang1/sdk/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/4.9.3/real-ld: cannot find crti.o: No such file or directory
/buildarea/lyang1/sdk/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/4.9.3/real-ld: cannot find crtbegin.o: No such file or directory
/buildarea/lyang1/sdk/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/4.9.3/real-ld: cannot find -lgcc
/buildarea/lyang1/sdk/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/4.9.3/real-ld: cannot find -lgcc_s
/buildarea/lyang1/sdk/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/4.9.3/real-ld: cannot find -lc
/buildarea/lyang1/sdk/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/4.9.3/real-ld: cannot find -lgcc
/buildarea/lyang1/sdk/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/4.9.3/real-ld: cannot find -lgcc_s
/buildarea/lyang1/sdk/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/4.9.3/real-ld: cannot find crtend.o: No such file or directory
/buildarea/lyang1/sdk/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/4.9.3/real-ld: cannot find crtn.o: No such file or directory
collect2: error: ld returned 1 exit status


If we build core-image-minimal -cpopulate_sdk, the 64bit TC works well, but 32bit doesn't.
Comment 1 Huimin She 2015-09-15 07:56:10 UTC
Hi,

I have met the same problem. 
image -c populate_sdk, the 64bit TC works well, but 32bit doesn't.

Is there any progress on this issue?
Comment 2 Robert Yang 2015-09-15 09:11:23 UTC
(In reply to comment #1)
> Hi,
> 
> I have met the same problem. 
> image -c populate_sdk, the 64bit TC works well, but 32bit doesn't.
> 
> Is there any progress on this issue?
There are a few problems of multilib SDK, I'm working on it, will send out patches this week.
Comment 3 Robert Yang 2015-09-15 10:12:59 UTC
(In reply to comment #1)
> Hi,
> 
> I have met the same problem. 
> image -c populate_sdk, the 64bit TC works well, but 32bit doesn't.
> 
> Is there any progress on this issue?

It would be great if you can help test these patches:

  git://git.openembedded.org/openembedded-core-contrib rbt/sdk
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/sdk

Robert Yang (6):
  toolchain-shar-extract.sh: remove checkbashism
  oe-pkgdata-util: avoid returning skipped packages
  package_manager.py: make rpm install mutilib pkgs corectly
  multilib.bbclass: install all bits toochains when populate mlprefix
    SDK 
  populate_sdk_base.bbclass: fix SDKTARGETSYSROOT when populate
    mlprefix SDK 
  meta-environment.bb: fix environment-setup* when populate mlprefix
    SDK 

 meta/classes/multilib.bbclass              |   15 +++++
 meta/classes/populate_sdk_base.bbclass     |    6 +-
 meta/files/toolchain-shar-extract.sh       |    4 +-
 meta/lib/oe/package_manager.py             |   83 +++++++++++++++++++++++++++-
 meta/recipes-core/meta/meta-environment.bb |    4 ++
 scripts/oe-pkgdata-util                    |    5 +-
 6 files changed, 111 insertions(+), 6 deletions(-)
Comment 4 Huimin She 2015-09-16 09:16:04 UTC
Hi Robert,

Thanks for the patches. I adapted them to the dizzy branch and built the TC.
The problems still exist: complained about missing files when cross-compile 32 bit applications

/Huimin
Comment 5 Robert Yang 2015-09-16 09:25:13 UTC
(In reply to comment #4)
> Hi Robert,
> 
> Thanks for the patches. I adapted them to the dizzy branch and built the TC.

Thanks, these patches are based on master branch, we need do more work to backport them to dizzy. I will send a patch for dizzy after this is merged into master.

// Robert

> The problems still exist: complained about missing files when cross-compile
> 32 bit applications
> 
> /Huimin
Comment 6 Huimin She 2015-09-18 11:40:55 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > Hi Robert,
> > 
> > Thanks for the patches. I adapted them to the dizzy branch and built the TC.
> 
> Thanks, these patches are based on master branch, we need do more work to
> backport them to dizzy. I will send a patch for dizzy after this is merged
> into master.
> 

Do you have a rough idea when you will provide a patch for dizzy? Thanks.


> 
> > The problems still exist: complained about missing files when cross-compile
> > 32 bit applications
> > 
> > /Huimin
Comment 7 Robert Yang 2015-09-28 14:06:36 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > (In reply to comment #4)
> > > Hi Robert,
> > > 
> > > Thanks for the patches. I adapted them to the dizzy branch and built the TC.
> > 
> > Thanks, these patches are based on master branch, we need do more work to
> > backport them to dizzy. I will send a patch for dizzy after this is merged
> > into master.
> > 
> 
> Do you have a rough idea when you will provide a patch for dizzy? Thanks.

Hello, it has been fixed on master branch, part of the work are done by Richard, I will talk with him on how to backport them.


> 
> 
> > 
> > > The problems still exist: complained about missing files when cross-compile
> > > 32 bit applications
> > > 
> > > /Huimin
Comment 8 Huimin She 2015-09-28 14:18:56 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > (In reply to comment #5)
> > > (In reply to comment #4)
> > > > Hi Robert,
> > > > 
> > > > Thanks for the patches. I adapted them to the dizzy branch and built the TC.
> > > 
> > > Thanks, these patches are based on master branch, we need do more work to
> > > backport them to dizzy. I will send a patch for dizzy after this is merged
> > > into master.
> > > 
> > 
> > Do you have a rough idea when you will provide a patch for dizzy? Thanks.
> 
> Hello, it has been fixed on master branch, part of the work are done by
> Richard, I will talk with him on how to backport them.

Thanks for the information, Robert.
Great it's fixed on master.

> 
> > 
> > 
> > > 
> > > > The problems still exist: complained about missing files when cross-compile
> > > > 32 bit applications
> > > > 
> > > > /Huimin
Comment 9 Robert Yang 2015-09-28 14:31:42 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > (In reply to comment #6)
> > > (In reply to comment #5)
> > > > (In reply to comment #4)
> > > > > Hi Robert,
> > > > > 
> > > > > Thanks for the patches. I adapted them to the dizzy branch and built the TC.
> > > > 
> > > > Thanks, these patches are based on master branch, we need do more work to
> > > > backport them to dizzy. I will send a patch for dizzy after this is merged
> > > > into master.
> > > > 
> > > 
> > > Do you have a rough idea when you will provide a patch for dizzy? Thanks.
> > 
> > Hello, it has been fixed on master branch, part of the work are done by
> > Richard, I will talk with him on how to backport them.
> 
> Thanks for the information, Robert.
> Great it's fixed on master.

Hello Huimin She,

After talked with Richard, I'm sorry to say that we can't or too difficult to backport this to dizzy, the problem is that bitbake's datastore changes in master are needed so its too difficult.

Here are the part of oe-core:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=eb7b1a58ceaab7fde4dc954eb4df4247d6c7c6d8


> 
> > 
> > > 
> > > 
> > > > 
> > > > > The problems still exist: complained about missing files when cross-compile
> > > > > 32 bit applications
> > > > > 
> > > > > /Huimin
Comment 10 Huimin She 2015-09-28 14:48:03 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > (In reply to comment #7)
> > > (In reply to comment #6)
> > > > (In reply to comment #5)
> > > > > (In reply to comment #4)
> > > > > > Hi Robert,
> > > > > > 
> > > > > > Thanks for the patches. I adapted them to the dizzy branch and built the TC.
> > > > > 
> > > > > Thanks, these patches are based on master branch, we need do more work to
> > > > > backport them to dizzy. I will send a patch for dizzy after this is merged
> > > > > into master.
> > > > > 
> > > > 
> > > > Do you have a rough idea when you will provide a patch for dizzy? Thanks.
> > > 
> > > Hello, it has been fixed on master branch, part of the work are done by
> > > Richard, I will talk with him on how to backport them.
> > 
> > Thanks for the information, Robert.
> > Great it's fixed on master.
> 
> Hello Huimin She,
> 
> After talked with Richard, I'm sorry to say that we can't or too difficult
> to backport this to dizzy, the problem is that bitbake's datastore changes
> in master are needed so its too difficult.
> 

Do you have suggestions for work-around? 

I tried with manually copying the missing files to the correponding SDK folders, and managed to cross-compile a 32-bit c hello_world, and it runs fine on the target. However, it failed with compiling c++. 
I did not try further, since I am not sure how many more packages are missing.

Do you know which packages are NOT correctly installed?


> Here are the part of oe-core:
> 
> http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/
> ?id=eb7b1a58ceaab7fde4dc954eb4df4247d6c7c6d8
> 

In the comment of the patch, you mentioned "Use bitbake to expand the RDEPENDS will fix the problem since bitbake knows mlprefix and handle it well, but rpm doesn't."

Can you explain more on this? For example, where should I put the RDEPENDS?


Thanks.

/Huimin

> > 
> > > 
> > > > 
> > > > 
> > > > > 
> > > > > > The problems still exist: complained about missing files when cross-compile
> > > > > > 32 bit applications
> > > > > > 
> > > > > > /Huimin
Comment 11 Robert Yang 2015-09-28 15:11:19 UTC
    (In reply to comment #10)
> (In reply to comment #9)
> > (In reply to comment #8)
> > > (In reply to comment #7)
> > > > (In reply to comment #6)
> > > > > (In reply to comment #5)
> > > > > > (In reply to comment #4)
> > > > > > > Hi Robert,
> > > > > > > 
> > > > > > > Thanks for the patches. I adapted them to the dizzy branch and built the TC.
> > > > > > 
> > > > > > Thanks, these patches are based on master branch, we need do more work to
> > > > > > backport them to dizzy. I will send a patch for dizzy after this is merged
> > > > > > into master.
> > > > > > 
> > > > > 
> > > > > Do you have a rough idea when you will provide a patch for dizzy? Thanks.
> > > > 
> > > > Hello, it has been fixed on master branch, part of the work are done by
> > > > Richard, I will talk with him on how to backport them.
> > > 
> > > Thanks for the information, Robert.
> > > Great it's fixed on master.
> > 
> > Hello Huimin She,
> > 
> > After talked with Richard, I'm sorry to say that we can't or too difficult
> > to backport this to dizzy, the problem is that bitbake's datastore changes
> > in master are needed so its too difficult.
> > 
> 
> Do you have suggestions for work-around? 
> 
> I tried with manually copying the missing files to the correponding SDK
> folders, and managed to cross-compile a 32-bit c hello_world, and it runs
> fine on the target. However, it failed with compiling c++. 
> I did not try further, since I am not sure how many more packages are
> missing.
> 
> Do you know which packages are NOT correctly installed?

Hello,

Here is the package list from master's bitbake lib32-core-image-minimal -cpopulate_sdk:

glibc-gconv core2-64
glibc-gconv-cp1252 core2-64
glibc-gconv-ibm850 core2-64
glibc-gconv-iso8859-1 core2-64
glibc-gconv-iso8859-15 core2-64
glibc-localedata-i18n core2-64
glibc-localedata-iso14651-t1 core2-64
glibc-localedata-iso14651-t1-common core2-64
glibc-localedata-translit-circle core2-64
glibc-localedata-translit-cjk-compat core2-64
glibc-localedata-translit-compat core2-64
glibc-localedata-translit-font core2-64
glibc-localedata-translit-fraction core2-64
glibc-localedata-translit-narrow core2-64
glibc-localedata-translit-neutral core2-64
glibc-localedata-translit-small core2-64
glibc-localedata-translit-wide core2-64
kernel-4.1.6-yocto-standard qemux86_64
kernel-module-uvesafb qemux86_64
lib32-base-files qemux86_64
lib32-base-passwd x86 
lib32-busybox x86 
lib32-busybox-hwclock x86 
lib32-busybox-syslog x86 
lib32-busybox-udhcpc x86 
lib32-glibc-gconv x86 
lib32-glibc-gconv-cp1252 x86 
lib32-glibc-gconv-ibm850 x86 
lib32-glibc-gconv-iso8859-1 x86 
lib32-glibc-gconv-iso8859-15 x86 
lib32-glibc-localedata-i18n x86 
lib32-glibc-localedata-iso14651-t1 x86 
lib32-glibc-localedata-iso14651-t1-common x86 
lib32-glibc-localedata-translit-circle x86 
lib32-glibc-localedata-translit-cjk-compat x86 
lib32-glibc-localedata-translit-compat x86 
lib32-glibc-localedata-translit-font x86 
lib32-glibc-localedata-translit-fraction x86 
lib32-glibc-localedata-translit-narrow x86 
lib32-glibc-localedata-translit-neutral x86 
lib32-glibc-localedata-translit-small x86
lib32-glibc-localedata-translit-wide x86
lib32-init-ifupdown qemux86_64
lib32-initscripts x86
lib32-initscripts-functions x86
lib32-libatomic-dev x86
lib32-libatomic1 x86
lib32-libblkid1 x86
lib32-libc6 x86
lib32-libc6-dbg x86
lib32-libc6-dev x86
lib32-libc6-extra-nss x86
lib32-libc6-thread-db x86
lib32-libc6-utils x86
lib32-libcidn1 x86
lib32-libgcc-s-dbg x86
lib32-libgcc-s-dev x86
lib32-libgcc1 x86
lib32-libkmod2 x86
lib32-libsegfault x86
lib32-libstdc++-dev x86
lib32-libstdc++6 x86
lib32-libuuid1 x86
lib32-libz1 x86
lib32-linux-libc-headers-dev x86
lib32-modutils-initscripts x86
lib32-netbase x86
lib32-packagegroup-core-boot qemux86_64
lib32-sysvinit x86
lib32-sysvinit-inittab qemux86_64
lib32-sysvinit-pidof x86
lib32-udev x86
lib32-udev-cache x86
lib32-update-alternatives-opkg x86
lib32-v86d qemux86_64
libatomic-dev core2-64
libatomic1 core2-64
libc6 core2-64
libc6-dbg core2-64
libc6-dev core2-64
libc6-extra-nss core2-64
libc6-thread-db core2-64
libc6-utils core2-64
libcidn1 core2-64
libgcc-s-dev core2-64
libgcc1 core2-64
libsegfault core2-64
libstdc++-dev core2-64
libstdc++6 core2-64
packagegroup-core-standalone-sdk-target all
packagegroup-core-standalone-sdk-target-dbg all
run-postinsts all
update-rc.d all

So you have to install lib32-xx packages if you want to make 32 sdk work, and the same to 64.

> 
> 
> > Here are the part of oe-core:
> > 
> > http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/
> > ?id=eb7b1a58ceaab7fde4dc954eb4df4247d6c7c6d8
> > 
> 
> In the comment of the patch, you mentioned "Use bitbake to expand the
> RDEPENDS will fix the problem since bitbake knows mlprefix and handle it
> well, but rpm doesn't."
> 
> Can you explain more on this? For example, where should I put the RDEPENDS?

For example, make sure that that lib32-foo RDEPENDS lib32-fxx rather than fxx.

Basically, if this oe-core's patch works for denzil branch, then you can get the packages installed correctly, and what you have to do is update SDKTARGETSYSROOT in the environment-setup-foo files.

// Robert

> 
> 
> Thanks.
> 
> /Huimin
> 
> > > 
> > > > 
> > > > > 
> > > > > 
> > > > > > 
> > > > > > > The problems still exist: complained about missing files when cross-compile
> > > > > > > 32 bit applications
> > > > > > > 
> > > > > > > /Huimin
Comment 12 Huimin She 2015-09-29 07:43:16 UTC
(In reply to comment #11)
>     (In reply to comment #10)
> > (In reply to comment #9)
> > > (In reply to comment #8)
> > > > (In reply to comment #7)
> > > > > (In reply to comment #6)
> > > > > > (In reply to comment #5)
> > > > > > > (In reply to comment #4)
> > > > > > > > Hi Robert,
> > > > > > > > 
> > > > > > > > Thanks for the patches. I adapted them to the dizzy branch and built the TC.
> > > > > > > 
> > > > > > > Thanks, these patches are based on master branch, we need do more work to
> > > > > > > backport them to dizzy. I will send a patch for dizzy after this is merged
> > > > > > > into master.
> > > > > > > 
> > > > > > 
> > > > > > Do you have a rough idea when you will provide a patch for dizzy? Thanks.
> > > > > 
> > > > > Hello, it has been fixed on master branch, part of the work are done by
> > > > > Richard, I will talk with him on how to backport them.
> > > > 
> > > > Thanks for the information, Robert.
> > > > Great it's fixed on master.
> > > 
> > > Hello Huimin She,
> > > 
> > > After talked with Richard, I'm sorry to say that we can't or too difficult
> > > to backport this to dizzy, the problem is that bitbake's datastore changes
> > > in master are needed so its too difficult.
> > > 
> > 
> > Do you have suggestions for work-around? 
> > 
> > I tried with manually copying the missing files to the correponding SDK
> > folders, and managed to cross-compile a 32-bit c hello_world, and it runs
> > fine on the target. However, it failed with compiling c++. 
> > I did not try further, since I am not sure how many more packages are
> > missing.
> > 
> > Do you know which packages are NOT correctly installed?
> 
> Hello,
> 
> Here is the package list from master's bitbake lib32-core-image-minimal
> -cpopulate_sdk:
> 
> glibc-gconv core2-64
> glibc-gconv-cp1252 core2-64
> glibc-gconv-ibm850 core2-64
> glibc-gconv-iso8859-1 core2-64
> glibc-gconv-iso8859-15 core2-64
> glibc-localedata-i18n core2-64
> glibc-localedata-iso14651-t1 core2-64
> glibc-localedata-iso14651-t1-common core2-64
> glibc-localedata-translit-circle core2-64
> glibc-localedata-translit-cjk-compat core2-64
> glibc-localedata-translit-compat core2-64
> glibc-localedata-translit-font core2-64
> glibc-localedata-translit-fraction core2-64
> glibc-localedata-translit-narrow core2-64
> glibc-localedata-translit-neutral core2-64
> glibc-localedata-translit-small core2-64
> glibc-localedata-translit-wide core2-64
> kernel-4.1.6-yocto-standard qemux86_64
> kernel-module-uvesafb qemux86_64
> lib32-base-files qemux86_64
> lib32-base-passwd x86 
> lib32-busybox x86 
> lib32-busybox-hwclock x86 
> lib32-busybox-syslog x86 
> lib32-busybox-udhcpc x86 
> lib32-glibc-gconv x86 
> lib32-glibc-gconv-cp1252 x86 
> lib32-glibc-gconv-ibm850 x86 
> lib32-glibc-gconv-iso8859-1 x86 
> lib32-glibc-gconv-iso8859-15 x86 
> lib32-glibc-localedata-i18n x86 
> lib32-glibc-localedata-iso14651-t1 x86 
> lib32-glibc-localedata-iso14651-t1-common x86 
> lib32-glibc-localedata-translit-circle x86 
> lib32-glibc-localedata-translit-cjk-compat x86 
> lib32-glibc-localedata-translit-compat x86 
> lib32-glibc-localedata-translit-font x86 
> lib32-glibc-localedata-translit-fraction x86 
> lib32-glibc-localedata-translit-narrow x86 
> lib32-glibc-localedata-translit-neutral x86 
> lib32-glibc-localedata-translit-small x86
> lib32-glibc-localedata-translit-wide x86
> lib32-init-ifupdown qemux86_64
> lib32-initscripts x86
> lib32-initscripts-functions x86
> lib32-libatomic-dev x86
> lib32-libatomic1 x86
> lib32-libblkid1 x86
> lib32-libc6 x86
> lib32-libc6-dbg x86
> lib32-libc6-dev x86
> lib32-libc6-extra-nss x86
> lib32-libc6-thread-db x86
> lib32-libc6-utils x86
> lib32-libcidn1 x86
> lib32-libgcc-s-dbg x86
> lib32-libgcc-s-dev x86
> lib32-libgcc1 x86
> lib32-libkmod2 x86
> lib32-libsegfault x86
> lib32-libstdc++-dev x86
> lib32-libstdc++6 x86
> lib32-libuuid1 x86
> lib32-libz1 x86
> lib32-linux-libc-headers-dev x86
> lib32-modutils-initscripts x86
> lib32-netbase x86
> lib32-packagegroup-core-boot qemux86_64
> lib32-sysvinit x86
> lib32-sysvinit-inittab qemux86_64
> lib32-sysvinit-pidof x86
> lib32-udev x86
> lib32-udev-cache x86
> lib32-update-alternatives-opkg x86
> lib32-v86d qemux86_64
> libatomic-dev core2-64
> libatomic1 core2-64
> libc6 core2-64
> libc6-dbg core2-64
> libc6-dev core2-64
> libc6-extra-nss core2-64
> libc6-thread-db core2-64
> libc6-utils core2-64
> libcidn1 core2-64
> libgcc-s-dev core2-64
> libgcc1 core2-64
> libsegfault core2-64
> libstdc++-dev core2-64
> libstdc++6 core2-64
> packagegroup-core-standalone-sdk-target all
> packagegroup-core-standalone-sdk-target-dbg all
> run-postinsts all
> update-rc.d all
> 
> So you have to install lib32-xx packages if you want to make 32 sdk work,
> and the same to 64.
> 
> > 
> > 
> > > Here are the part of oe-core:
> > > 
> > > http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/
> > > ?id=eb7b1a58ceaab7fde4dc954eb4df4247d6c7c6d8
> > > 
> > 
> > In the comment of the patch, you mentioned "Use bitbake to expand the
> > RDEPENDS will fix the problem since bitbake knows mlprefix and handle it
> > well, but rpm doesn't."
> > 
> > Can you explain more on this? For example, where should I put the RDEPENDS?
> 
> For example, make sure that that lib32-foo RDEPENDS lib32-fxx rather than
> fxx.
> 
> Basically, if this oe-core's patch works for denzil branch, then you can get
> the packages installed correctly, and what you have to do is update
> SDKTARGETSYSROOT in the environment-setup-foo files.

I tried with this patch on dizzy, and added packagegroup-core-standalone-sdk-target and lib32-packagegroup-core-standalone-sdk-target to <image.bb>, 
then bitbake <image.bb> -c populate_sdk. It seems rpm correclty installs lib32-* packages to the rootfs, but not SDK.


> // Robert
> 
> > 
> > 
> > Thanks.
> > 
> > /Huimin
> > 
> > > > 
> > > > > 
> > > > > > 
> > > > > > 
> > > > > > > 
> > > > > > > > The problems still exist: complained about missing files when cross-compile
> > > > > > > > 32 bit applications
> > > > > > > > 
> > > > > > > > /Huimin
Comment 13 Robert Yang 2015-09-29 07:56:39 UTC
(In reply to comment #12)
> (In reply to comment #11)
> >     (In reply to comment #10)
> > > (In reply to comment #9)
> > > > (In reply to comment #8)
> > > > > (In reply to comment #7)
> > > > > > (In reply to comment #6)
> > > > > > > (In reply to comment #5)
> > > > > > > > (In reply to comment #4)
> > > > > > > > > Hi Robert,
> > > > > > > > > 
> > > > > > > > > Thanks for the patches. I adapted them to the dizzy branch and built the TC.
> > > > > > > > 
> > > > > > > > Thanks, these patches are based on master branch, we need do more work to
> > > > > > > > backport them to dizzy. I will send a patch for dizzy after this is merged
> > > > > > > > into master.
> > > > > > > > 
> > > > > > > 
> > > > > > > Do you have a rough idea when you will provide a patch for dizzy? Thanks.
> > > > > > 
> > > > > > Hello, it has been fixed on master branch, part of the work are done by
> > > > > > Richard, I will talk with him on how to backport them.
> > > > > 
> > > > > Thanks for the information, Robert.
> > > > > Great it's fixed on master.
> > > > 
> > > > Hello Huimin She,
> > > > 
> > > > After talked with Richard, I'm sorry to say that we can't or too difficult
> > > > to backport this to dizzy, the problem is that bitbake's datastore changes
> > > > in master are needed so its too difficult.
> > > > 
> > > 
> > > Do you have suggestions for work-around? 
> > > 
> > > I tried with manually copying the missing files to the correponding SDK
> > > folders, and managed to cross-compile a 32-bit c hello_world, and it runs
> > > fine on the target. However, it failed with compiling c++. 
> > > I did not try further, since I am not sure how many more packages are
> > > missing.
> > > 
> > > Do you know which packages are NOT correctly installed?
> > 
> > Hello,
> > 
> > Here is the package list from master's bitbake lib32-core-image-minimal
> > -cpopulate_sdk:
> > 
> > glibc-gconv core2-64
> > glibc-gconv-cp1252 core2-64
> > glibc-gconv-ibm850 core2-64
> > glibc-gconv-iso8859-1 core2-64
> > glibc-gconv-iso8859-15 core2-64
> > glibc-localedata-i18n core2-64
> > glibc-localedata-iso14651-t1 core2-64
> > glibc-localedata-iso14651-t1-common core2-64
> > glibc-localedata-translit-circle core2-64
> > glibc-localedata-translit-cjk-compat core2-64
> > glibc-localedata-translit-compat core2-64
> > glibc-localedata-translit-font core2-64
> > glibc-localedata-translit-fraction core2-64
> > glibc-localedata-translit-narrow core2-64
> > glibc-localedata-translit-neutral core2-64
> > glibc-localedata-translit-small core2-64
> > glibc-localedata-translit-wide core2-64
> > kernel-4.1.6-yocto-standard qemux86_64
> > kernel-module-uvesafb qemux86_64
> > lib32-base-files qemux86_64
> > lib32-base-passwd x86 
> > lib32-busybox x86 
> > lib32-busybox-hwclock x86 
> > lib32-busybox-syslog x86 
> > lib32-busybox-udhcpc x86 
> > lib32-glibc-gconv x86 
> > lib32-glibc-gconv-cp1252 x86 
> > lib32-glibc-gconv-ibm850 x86 
> > lib32-glibc-gconv-iso8859-1 x86 
> > lib32-glibc-gconv-iso8859-15 x86 
> > lib32-glibc-localedata-i18n x86 
> > lib32-glibc-localedata-iso14651-t1 x86 
> > lib32-glibc-localedata-iso14651-t1-common x86 
> > lib32-glibc-localedata-translit-circle x86 
> > lib32-glibc-localedata-translit-cjk-compat x86 
> > lib32-glibc-localedata-translit-compat x86 
> > lib32-glibc-localedata-translit-font x86 
> > lib32-glibc-localedata-translit-fraction x86 
> > lib32-glibc-localedata-translit-narrow x86 
> > lib32-glibc-localedata-translit-neutral x86 
> > lib32-glibc-localedata-translit-small x86
> > lib32-glibc-localedata-translit-wide x86
> > lib32-init-ifupdown qemux86_64
> > lib32-initscripts x86
> > lib32-initscripts-functions x86
> > lib32-libatomic-dev x86
> > lib32-libatomic1 x86
> > lib32-libblkid1 x86
> > lib32-libc6 x86
> > lib32-libc6-dbg x86
> > lib32-libc6-dev x86
> > lib32-libc6-extra-nss x86
> > lib32-libc6-thread-db x86
> > lib32-libc6-utils x86
> > lib32-libcidn1 x86
> > lib32-libgcc-s-dbg x86
> > lib32-libgcc-s-dev x86
> > lib32-libgcc1 x86
> > lib32-libkmod2 x86
> > lib32-libsegfault x86
> > lib32-libstdc++-dev x86
> > lib32-libstdc++6 x86
> > lib32-libuuid1 x86
> > lib32-libz1 x86
> > lib32-linux-libc-headers-dev x86
> > lib32-modutils-initscripts x86
> > lib32-netbase x86
> > lib32-packagegroup-core-boot qemux86_64
> > lib32-sysvinit x86
> > lib32-sysvinit-inittab qemux86_64
> > lib32-sysvinit-pidof x86
> > lib32-udev x86
> > lib32-udev-cache x86
> > lib32-update-alternatives-opkg x86
> > lib32-v86d qemux86_64
> > libatomic-dev core2-64
> > libatomic1 core2-64
> > libc6 core2-64
> > libc6-dbg core2-64
> > libc6-dev core2-64
> > libc6-extra-nss core2-64
> > libc6-thread-db core2-64
> > libc6-utils core2-64
> > libcidn1 core2-64
> > libgcc-s-dev core2-64
> > libgcc1 core2-64
> > libsegfault core2-64
> > libstdc++-dev core2-64
> > libstdc++6 core2-64
> > packagegroup-core-standalone-sdk-target all
> > packagegroup-core-standalone-sdk-target-dbg all
> > run-postinsts all
> > update-rc.d all
> > 
> > So you have to install lib32-xx packages if you want to make 32 sdk work,
> > and the same to 64.
> > 
> > > 
> > > 
> > > > Here are the part of oe-core:
> > > > 
> > > > http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/
> > > > ?id=eb7b1a58ceaab7fde4dc954eb4df4247d6c7c6d8
> > > > 
> > > 
> > > In the comment of the patch, you mentioned "Use bitbake to expand the
> > > RDEPENDS will fix the problem since bitbake knows mlprefix and handle it
> > > well, but rpm doesn't."
> > > 
> > > Can you explain more on this? For example, where should I put the RDEPENDS?
> > 
> > For example, make sure that that lib32-foo RDEPENDS lib32-fxx rather than
> > fxx.
> > 
> > Basically, if this oe-core's patch works for denzil branch, then you can get
> > the packages installed correctly, and what you have to do is update
> > SDKTARGETSYSROOT in the environment-setup-foo files.
> 
> I tried with this patch on dizzy, and added
> packagegroup-core-standalone-sdk-target and
> lib32-packagegroup-core-standalone-sdk-target to <image.bb>, 
> then bitbake <image.bb> -c populate_sdk. It seems rpm correclty installs
> lib32-* packages to the rootfs, but not SDK.

If you run <image.bb> -c populate_sdk, then only SDK is generated, no rootfs.

// Robert

> 
> 
> > // Robert
> > 
> > > 
> > > 
> > > Thanks.
> > > 
> > > /Huimin
> > > 
> > > > > 
> > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > > 
> > > > > > > > > The problems still exist: complained about missing files when cross-compile
> > > > > > > > > 32 bit applications
> > > > > > > > > 
> > > > > > > > > /Huimin
Comment 14 Huimin She 2015-09-29 07:59:11 UTC
(In reply to comment #13)
> (In reply to comment #12)
> > (In reply to comment #11)
> > >     (In reply to comment #10)
> > > > (In reply to comment #9)
> > > > > (In reply to comment #8)
> > > > > > (In reply to comment #7)
> > > > > > > (In reply to comment #6)
> > > > > > > > (In reply to comment #5)
> > > > > > > > > (In reply to comment #4)
> > > > > > > > > > Hi Robert,
> > > > > > > > > > 
> > > > > > > > > > Thanks for the patches. I adapted them to the dizzy branch and built the TC.
> > > > > > > > > 
> > > > > > > > > Thanks, these patches are based on master branch, we need do more work to
> > > > > > > > > backport them to dizzy. I will send a patch for dizzy after this is merged
> > > > > > > > > into master.
> > > > > > > > > 
> > > > > > > > 
> > > > > > > > Do you have a rough idea when you will provide a patch for dizzy? Thanks.
> > > > > > > 
> > > > > > > Hello, it has been fixed on master branch, part of the work are done by
> > > > > > > Richard, I will talk with him on how to backport them.
> > > > > > 
> > > > > > Thanks for the information, Robert.
> > > > > > Great it's fixed on master.
> > > > > 
> > > > > Hello Huimin She,
> > > > > 
> > > > > After talked with Richard, I'm sorry to say that we can't or too difficult
> > > > > to backport this to dizzy, the problem is that bitbake's datastore changes
> > > > > in master are needed so its too difficult.
> > > > > 
> > > > 
> > > > Do you have suggestions for work-around? 
> > > > 
> > > > I tried with manually copying the missing files to the correponding SDK
> > > > folders, and managed to cross-compile a 32-bit c hello_world, and it runs
> > > > fine on the target. However, it failed with compiling c++. 
> > > > I did not try further, since I am not sure how many more packages are
> > > > missing.
> > > > 
> > > > Do you know which packages are NOT correctly installed?
> > > 
> > > Hello,
> > > 
> > > Here is the package list from master's bitbake lib32-core-image-minimal
> > > -cpopulate_sdk:
> > > 
> > > glibc-gconv core2-64
> > > glibc-gconv-cp1252 core2-64
> > > glibc-gconv-ibm850 core2-64
> > > glibc-gconv-iso8859-1 core2-64
> > > glibc-gconv-iso8859-15 core2-64
> > > glibc-localedata-i18n core2-64
> > > glibc-localedata-iso14651-t1 core2-64
> > > glibc-localedata-iso14651-t1-common core2-64
> > > glibc-localedata-translit-circle core2-64
> > > glibc-localedata-translit-cjk-compat core2-64
> > > glibc-localedata-translit-compat core2-64
> > > glibc-localedata-translit-font core2-64
> > > glibc-localedata-translit-fraction core2-64
> > > glibc-localedata-translit-narrow core2-64
> > > glibc-localedata-translit-neutral core2-64
> > > glibc-localedata-translit-small core2-64
> > > glibc-localedata-translit-wide core2-64
> > > kernel-4.1.6-yocto-standard qemux86_64
> > > kernel-module-uvesafb qemux86_64
> > > lib32-base-files qemux86_64
> > > lib32-base-passwd x86 
> > > lib32-busybox x86 
> > > lib32-busybox-hwclock x86 
> > > lib32-busybox-syslog x86 
> > > lib32-busybox-udhcpc x86 
> > > lib32-glibc-gconv x86 
> > > lib32-glibc-gconv-cp1252 x86 
> > > lib32-glibc-gconv-ibm850 x86 
> > > lib32-glibc-gconv-iso8859-1 x86 
> > > lib32-glibc-gconv-iso8859-15 x86 
> > > lib32-glibc-localedata-i18n x86 
> > > lib32-glibc-localedata-iso14651-t1 x86 
> > > lib32-glibc-localedata-iso14651-t1-common x86 
> > > lib32-glibc-localedata-translit-circle x86 
> > > lib32-glibc-localedata-translit-cjk-compat x86 
> > > lib32-glibc-localedata-translit-compat x86 
> > > lib32-glibc-localedata-translit-font x86 
> > > lib32-glibc-localedata-translit-fraction x86 
> > > lib32-glibc-localedata-translit-narrow x86 
> > > lib32-glibc-localedata-translit-neutral x86 
> > > lib32-glibc-localedata-translit-small x86
> > > lib32-glibc-localedata-translit-wide x86
> > > lib32-init-ifupdown qemux86_64
> > > lib32-initscripts x86
> > > lib32-initscripts-functions x86
> > > lib32-libatomic-dev x86
> > > lib32-libatomic1 x86
> > > lib32-libblkid1 x86
> > > lib32-libc6 x86
> > > lib32-libc6-dbg x86
> > > lib32-libc6-dev x86
> > > lib32-libc6-extra-nss x86
> > > lib32-libc6-thread-db x86
> > > lib32-libc6-utils x86
> > > lib32-libcidn1 x86
> > > lib32-libgcc-s-dbg x86
> > > lib32-libgcc-s-dev x86
> > > lib32-libgcc1 x86
> > > lib32-libkmod2 x86
> > > lib32-libsegfault x86
> > > lib32-libstdc++-dev x86
> > > lib32-libstdc++6 x86
> > > lib32-libuuid1 x86
> > > lib32-libz1 x86
> > > lib32-linux-libc-headers-dev x86
> > > lib32-modutils-initscripts x86
> > > lib32-netbase x86
> > > lib32-packagegroup-core-boot qemux86_64
> > > lib32-sysvinit x86
> > > lib32-sysvinit-inittab qemux86_64
> > > lib32-sysvinit-pidof x86
> > > lib32-udev x86
> > > lib32-udev-cache x86
> > > lib32-update-alternatives-opkg x86
> > > lib32-v86d qemux86_64
> > > libatomic-dev core2-64
> > > libatomic1 core2-64
> > > libc6 core2-64
> > > libc6-dbg core2-64
> > > libc6-dev core2-64
> > > libc6-extra-nss core2-64
> > > libc6-thread-db core2-64
> > > libc6-utils core2-64
> > > libcidn1 core2-64
> > > libgcc-s-dev core2-64
> > > libgcc1 core2-64
> > > libsegfault core2-64
> > > libstdc++-dev core2-64
> > > libstdc++6 core2-64
> > > packagegroup-core-standalone-sdk-target all
> > > packagegroup-core-standalone-sdk-target-dbg all
> > > run-postinsts all
> > > update-rc.d all
> > > 
> > > So you have to install lib32-xx packages if you want to make 32 sdk work,
> > > and the same to 64.
> > > 
> > > > 
> > > > 
> > > > > Here are the part of oe-core:
> > > > > 
> > > > > http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/
> > > > > ?id=eb7b1a58ceaab7fde4dc954eb4df4247d6c7c6d8
> > > > > 
> > > > 
> > > > In the comment of the patch, you mentioned "Use bitbake to expand the
> > > > RDEPENDS will fix the problem since bitbake knows mlprefix and handle it
> > > > well, but rpm doesn't."
> > > > 
> > > > Can you explain more on this? For example, where should I put the RDEPENDS?
> > > 
> > > For example, make sure that that lib32-foo RDEPENDS lib32-fxx rather than
> > > fxx.
> > > 
> > > Basically, if this oe-core's patch works for denzil branch, then you can get
> > > the packages installed correctly, and what you have to do is update
> > > SDKTARGETSYSROOT in the environment-setup-foo files.
> > 
> > I tried with this patch on dizzy, and added
> > packagegroup-core-standalone-sdk-target and
> > lib32-packagegroup-core-standalone-sdk-target to <image.bb>, 
> > then bitbake <image.bb> -c populate_sdk. It seems rpm correclty installs
> > lib32-* packages to the rootfs, but not SDK.
> 
> If you run <image.bb> -c populate_sdk, then only SDK is generated, no rootfs.
> 
> // Robert
> 
> > 
> > 
> > > // Robert
> > > 
> > > > 
> > > > 
> > > > Thanks.
> > > > 
> > > > /Huimin
> > > > 
> > > > > > 
> > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > > 
> > > > > > > > > > The problems still exist: complained about missing files when cross-compile
> > > > > > > > > > 32 bit applications
> > > > > > > > > > 
> > > > > > > > > > /Huimin

(In reply to comment #13)
> (In reply to comment #12)
> > (In reply to comment #11)
> > >     (In reply to comment #10)
> > > > (In reply to comment #9)
> > > > > (In reply to comment #8)
> > > > > > (In reply to comment #7)
> > > > > > > (In reply to comment #6)
> > > > > > > > (In reply to comment #5)
> > > > > > > > > (In reply to comment #4)
> > > > > > > > > > Hi Robert,
> > > > > > > > > > 
> > > > > > > > > > Thanks for the patches. I adapted them to the dizzy branch and built the TC.
> > > > > > > > > 
> > > > > > > > > Thanks, these patches are based on master branch, we need do more work to
> > > > > > > > > backport them to dizzy. I will send a patch for dizzy after this is merged
> > > > > > > > > into master.
> > > > > > > > > 
> > > > > > > > 
> > > > > > > > Do you have a rough idea when you will provide a patch for dizzy? Thanks.
> > > > > > > 
> > > > > > > Hello, it has been fixed on master branch, part of the work are done by
> > > > > > > Richard, I will talk with him on how to backport them.
> > > > > > 
> > > > > > Thanks for the information, Robert.
> > > > > > Great it's fixed on master.
> > > > > 
> > > > > Hello Huimin She,
> > > > > 
> > > > > After talked with Richard, I'm sorry to say that we can't or too difficult
> > > > > to backport this to dizzy, the problem is that bitbake's datastore changes
> > > > > in master are needed so its too difficult.
> > > > > 
> > > > 
> > > > Do you have suggestions for work-around? 
> > > > 
> > > > I tried with manually copying the missing files to the correponding SDK
> > > > folders, and managed to cross-compile a 32-bit c hello_world, and it runs
> > > > fine on the target. However, it failed with compiling c++. 
> > > > I did not try further, since I am not sure how many more packages are
> > > > missing.
> > > > 
> > > > Do you know which packages are NOT correctly installed?
> > > 
> > > Hello,
> > > 
> > > Here is the package list from master's bitbake lib32-core-image-minimal
> > > -cpopulate_sdk:
> > > 
> > > glibc-gconv core2-64
> > > glibc-gconv-cp1252 core2-64
> > > glibc-gconv-ibm850 core2-64
> > > glibc-gconv-iso8859-1 core2-64
> > > glibc-gconv-iso8859-15 core2-64
> > > glibc-localedata-i18n core2-64
> > > glibc-localedata-iso14651-t1 core2-64
> > > glibc-localedata-iso14651-t1-common core2-64
> > > glibc-localedata-translit-circle core2-64
> > > glibc-localedata-translit-cjk-compat core2-64
> > > glibc-localedata-translit-compat core2-64
> > > glibc-localedata-translit-font core2-64
> > > glibc-localedata-translit-fraction core2-64
> > > glibc-localedata-translit-narrow core2-64
> > > glibc-localedata-translit-neutral core2-64
> > > glibc-localedata-translit-small core2-64
> > > glibc-localedata-translit-wide core2-64
> > > kernel-4.1.6-yocto-standard qemux86_64
> > > kernel-module-uvesafb qemux86_64
> > > lib32-base-files qemux86_64
> > > lib32-base-passwd x86 
> > > lib32-busybox x86 
> > > lib32-busybox-hwclock x86 
> > > lib32-busybox-syslog x86 
> > > lib32-busybox-udhcpc x86 
> > > lib32-glibc-gconv x86 
> > > lib32-glibc-gconv-cp1252 x86 
> > > lib32-glibc-gconv-ibm850 x86 
> > > lib32-glibc-gconv-iso8859-1 x86 
> > > lib32-glibc-gconv-iso8859-15 x86 
> > > lib32-glibc-localedata-i18n x86 
> > > lib32-glibc-localedata-iso14651-t1 x86 
> > > lib32-glibc-localedata-iso14651-t1-common x86 
> > > lib32-glibc-localedata-translit-circle x86 
> > > lib32-glibc-localedata-translit-cjk-compat x86 
> > > lib32-glibc-localedata-translit-compat x86 
> > > lib32-glibc-localedata-translit-font x86 
> > > lib32-glibc-localedata-translit-fraction x86 
> > > lib32-glibc-localedata-translit-narrow x86 
> > > lib32-glibc-localedata-translit-neutral x86 
> > > lib32-glibc-localedata-translit-small x86
> > > lib32-glibc-localedata-translit-wide x86
> > > lib32-init-ifupdown qemux86_64
> > > lib32-initscripts x86
> > > lib32-initscripts-functions x86
> > > lib32-libatomic-dev x86
> > > lib32-libatomic1 x86
> > > lib32-libblkid1 x86
> > > lib32-libc6 x86
> > > lib32-libc6-dbg x86
> > > lib32-libc6-dev x86
> > > lib32-libc6-extra-nss x86
> > > lib32-libc6-thread-db x86
> > > lib32-libc6-utils x86
> > > lib32-libcidn1 x86
> > > lib32-libgcc-s-dbg x86
> > > lib32-libgcc-s-dev x86
> > > lib32-libgcc1 x86
> > > lib32-libkmod2 x86
> > > lib32-libsegfault x86
> > > lib32-libstdc++-dev x86
> > > lib32-libstdc++6 x86
> > > lib32-libuuid1 x86
> > > lib32-libz1 x86
> > > lib32-linux-libc-headers-dev x86
> > > lib32-modutils-initscripts x86
> > > lib32-netbase x86
> > > lib32-packagegroup-core-boot qemux86_64
> > > lib32-sysvinit x86
> > > lib32-sysvinit-inittab qemux86_64
> > > lib32-sysvinit-pidof x86
> > > lib32-udev x86
> > > lib32-udev-cache x86
> > > lib32-update-alternatives-opkg x86
> > > lib32-v86d qemux86_64
> > > libatomic-dev core2-64
> > > libatomic1 core2-64
> > > libc6 core2-64
> > > libc6-dbg core2-64
> > > libc6-dev core2-64
> > > libc6-extra-nss core2-64
> > > libc6-thread-db core2-64
> > > libc6-utils core2-64
> > > libcidn1 core2-64
> > > libgcc-s-dev core2-64
> > > libgcc1 core2-64
> > > libsegfault core2-64
> > > libstdc++-dev core2-64
> > > libstdc++6 core2-64
> > > packagegroup-core-standalone-sdk-target all
> > > packagegroup-core-standalone-sdk-target-dbg all
> > > run-postinsts all
> > > update-rc.d all
> > > 
> > > So you have to install lib32-xx packages if you want to make 32 sdk work,
> > > and the same to 64.
> > > 
> > > > 
> > > > 
> > > > > Here are the part of oe-core:
> > > > > 
> > > > > http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/
> > > > > ?id=eb7b1a58ceaab7fde4dc954eb4df4247d6c7c6d8
> > > > > 
> > > > 
> > > > In the comment of the patch, you mentioned "Use bitbake to expand the
> > > > RDEPENDS will fix the problem since bitbake knows mlprefix and handle it
> > > > well, but rpm doesn't."
> > > > 
> > > > Can you explain more on this? For example, where should I put the RDEPENDS?
> > > 
> > > For example, make sure that that lib32-foo RDEPENDS lib32-fxx rather than
> > > fxx.
> > > 
> > > Basically, if this oe-core's patch works for denzil branch, then you can get
> > > the packages installed correctly, and what you have to do is update
> > > SDKTARGETSYSROOT in the environment-setup-foo files.
> > 
> > I tried with this patch on dizzy, and added
> > packagegroup-core-standalone-sdk-target and
> > lib32-packagegroup-core-standalone-sdk-target to <image.bb>, 
> > then bitbake <image.bb> -c populate_sdk. It seems rpm correclty installs
> > lib32-* packages to the rootfs, but not SDK.
> 
> If you run <image.bb> -c populate_sdk, then only SDK is generated, no rootfs.
> 

Sorry, forgot to mention, i run bitbake <image.bb> before populate_sdk

/Huimin

> // Robert
> 
> > 
> > 
> > > // Robert
> > > 
> > > > 
> > > > 
> > > > Thanks.
> > > > 
> > > > /Huimin
> > > > 
> > > > > > 
> > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > > 
> > > > > > > > > > The problems still exist: complained about missing files when cross-compile
> > > > > > > > > > 32 bit applications
> > > > > > > > > > 
> > > > > > > > > > /Huimin
Comment 15 Robert Yang 2015-09-29 08:03:17 UTC
> > > > > Can you explain more on this? For example, where should I put the RDEPENDS?
> > > > 
> > > > For example, make sure that that lib32-foo RDEPENDS lib32-fxx rather than
> > > > fxx.
> > > > 
> > > > Basically, if this oe-core's patch works for denzil branch, then you can get
> > > > the packages installed correctly, and what you have to do is update
> > > > SDKTARGETSYSROOT in the environment-setup-foo files.
> > > 
> > > I tried with this patch on dizzy, and added
> > > packagegroup-core-standalone-sdk-target and
> > > lib32-packagegroup-core-standalone-sdk-target to <image.bb>, 
> > > then bitbake <image.bb> -c populate_sdk. It seems rpm correclty installs
> > > lib32-* packages to the rootfs, but not SDK.
> > 
> > If you run <image.bb> -c populate_sdk, then only SDK is generated, no rootfs.
> > 
> 
> Sorry, forgot to mention, i run bitbake <image.bb> before populate_sdk

You can check the file like the following to see whether they are installed or not:

tmp/work/qemux86_64-pokymllib32-linux/lib32-core-image-minimal/1.0-r0/installed_pkgs.txt

after bitbake -c populate_sdk

// Robert

> 
> /Huimin
> 
> > // Robert
> > 
> > > 
> > > 
> > > > // Robert
> > > > 
> > > > > 
> > > > > 
> > > > > Thanks.
> > > > > 
> > > > > /Huimin
> > > > > 
> > > > > > > 
> > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > > The problems still exist: complained about missing files when cross-compile
> > > > > > > > > > > 32 bit applications
> > > > > > > > > > > 
> > > > > > > > > > > /Huimin
Comment 16 Huimin She 2015-09-29 11:44:42 UTC
(In reply to comment #15)
> > > > > > Can you explain more on this? For example, where should I put the RDEPENDS?
> > > > > 
> > > > > For example, make sure that that lib32-foo RDEPENDS lib32-fxx rather than
> > > > > fxx.
> > > > > 
> > > > > Basically, if this oe-core's patch works for denzil branch, then you can get
> > > > > the packages installed correctly, and what you have to do is update
> > > > > SDKTARGETSYSROOT in the environment-setup-foo files.
> > > > 
> > > > I tried with this patch on dizzy, and added
> > > > packagegroup-core-standalone-sdk-target and
> > > > lib32-packagegroup-core-standalone-sdk-target to <image.bb>, 
> > > > then bitbake <image.bb> -c populate_sdk. It seems rpm correclty installs
> > > > lib32-* packages to the rootfs, but not SDK.
> > > 
> > > If you run <image.bb> -c populate_sdk, then only SDK is generated, no rootfs.
> > > 
> > 
> > Sorry, forgot to mention, i run bitbake <image.bb> before populate_sdk
> 
> You can check the file like the following to see whether they are installed
> or not:
> 
> tmp/work/qemux86_64-pokymllib32-linux/lib32-core-image-minimal/1.0-r0/
> installed_pkgs.txt
> 
> after bitbake -c populate_sdk


These are 32bit packages installed. As I can see, 32bit libraries are installed
to rootfs (for example, 1.0-r0/rootfs/lib and 1.0-r0/rootfs/usr/lib). But they are NOT installed to the SDK folder(for example, the files are not available here: sysroots/ppc64-*/lib and sysroots/ppc64-*/usr/lib)

lib32-glibc-gconv 
lib32-glibc-gconv-cp1252
lib32-glibc-gconv-ibm850
lib32-glibc-gconv-iso8859-1 
lib32-glibc-gconv-iso8859-15
lib32-glibc-localedata-i18n 
lib32-glibc-localedata-iso14651-t1
lib32-glibc-localedata-iso14651-t1-common  
lib32-glibc-localedata-translit-circle  
lib32-glibc-localedata-translit-cjk-compat  
lib32-glibc-localedata-translit-compat  
lib32-glibc-localedata-translit-font  
lib32-glibc-localedata-translit-fraction  
lib32-glibc-localedata-translit-narrow  
lib32-glibc-localedata-translit-neutral  
lib32-glibc-localedata-translit-small  
lib32-glibc-localedata-translit-wide  
lib32-libc6  
lib32-libc6-dbg  
lib32-libc6-dev  
lib32-libc6-extra-nss  
lib32-libc6-staticdev  
lib32-libc6-thread-db  
lib32-libc6-utils  
lib32-libcidn1  
lib32-libgcc-s-dev  
lib32-libgcc1  
lib32-libgcov-dev  
lib32-libsegfault  
lib32-libstdc++-dev  
lib32-libstdc++-staticdev  
lib32-libstdc++6  
lib32-qemuwrapper-cross 


> // Robert
> 
> > 
> > /Huimin
> > 
> > > // Robert
> > > 
> > > > 
> > > > 
> > > > > // Robert
> > > > > 
> > > > > > 
> > > > > > 
> > > > > > Thanks.
> > > > > > 
> > > > > > /Huimin
> > > > > > 
> > > > > > > > 
> > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > > 
> > > > > > > > > > > > The problems still exist: complained about missing files when cross-compile
> > > > > > > > > > > > 32 bit applications
> > > > > > > > > > > > 
> > > > > > > > > > > > /Huimin
Comment 17 Huimin She 2015-09-29 14:53:41 UTC
(In reply to comment #16)
> (In reply to comment #15)
> > > > > > > Can you explain more on this? For example, where should I put the RDEPENDS?
> > > > > > 
> > > > > > For example, make sure that that lib32-foo RDEPENDS lib32-fxx rather than
> > > > > > fxx.
> > > > > > 
> > > > > > Basically, if this oe-core's patch works for denzil branch, then you can get
> > > > > > the packages installed correctly, and what you have to do is update
> > > > > > SDKTARGETSYSROOT in the environment-setup-foo files.
> > > > > 
> > > > > I tried with this patch on dizzy, and added
> > > > > packagegroup-core-standalone-sdk-target and
> > > > > lib32-packagegroup-core-standalone-sdk-target to <image.bb>, 
> > > > > then bitbake <image.bb> -c populate_sdk. It seems rpm correclty installs
> > > > > lib32-* packages to the rootfs, but not SDK.
> > > > 
> > > > If you run <image.bb> -c populate_sdk, then only SDK is generated, no rootfs.
> > > > 
> > > 
> > > Sorry, forgot to mention, i run bitbake <image.bb> before populate_sdk
> > 
> > You can check the file like the following to see whether they are installed
> > or not:
> > 
> > tmp/work/qemux86_64-pokymllib32-linux/lib32-core-image-minimal/1.0-r0/
> > installed_pkgs.txt
> > 
> > after bitbake -c populate_sdk
> 
> 


> These are 32bit packages installed. As I can see, 32bit libraries are
> installed
> to rootfs (for example, 1.0-r0/rootfs/lib and 1.0-r0/rootfs/usr/lib). But
> they are NOT installed to the SDK folder(for example, the files are not
> available here: sysroots/ppc64-*/lib and sysroots/ppc64-*/usr/lib)
> 
> lib32-glibc-gconv 
> lib32-glibc-gconv-cp1252
> lib32-glibc-gconv-ibm850
> lib32-glibc-gconv-iso8859-1 
> lib32-glibc-gconv-iso8859-15
> lib32-glibc-localedata-i18n 
> lib32-glibc-localedata-iso14651-t1
> lib32-glibc-localedata-iso14651-t1-common  
> lib32-glibc-localedata-translit-circle  
> lib32-glibc-localedata-translit-cjk-compat  
> lib32-glibc-localedata-translit-compat  
> lib32-glibc-localedata-translit-font  
> lib32-glibc-localedata-translit-fraction  
> lib32-glibc-localedata-translit-narrow  
> lib32-glibc-localedata-translit-neutral  
> lib32-glibc-localedata-translit-small  
> lib32-glibc-localedata-translit-wide  
> lib32-libc6  
> lib32-libc6-dbg  
> lib32-libc6-dev  
> lib32-libc6-extra-nss  
> lib32-libc6-staticdev  
> lib32-libc6-thread-db  
> lib32-libc6-utils  
> lib32-libcidn1  
> lib32-libgcc-s-dev  
> lib32-libgcc1  
> lib32-libgcov-dev  
> lib32-libsegfault  
> lib32-libstdc++-dev  
> lib32-libstdc++-staticdev  
> lib32-libstdc++6  
> lib32-qemuwrapper-cross 
> 

The above lib32-* packages are listed in installed_pkgs.txt, after "bitbake <image_bb>". But they are gone after "bitbake <image_bb> -c populate_sdk", which means no lib32-* packages are installed to SDK.

/Huimin

> > // Robert
> > 
> > > 
> > > /Huimin
> > > 
> > > > // Robert
> > > > 
> > > > > 
> > > > > 
> > > > > > // Robert
> > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > Thanks.
> > > > > > > 
> > > > > > > /Huimin
> > > > > > > 
> > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > > 
> > > > > > > > > > > 
> > > > > > > > > > > > 
> > > > > > > > > > > > > The problems still exist: complained about missing files when cross-compile
> > > > > > > > > > > > > 32 bit applications
> > > > > > > > > > > > > 
> > > > > > > > > > > > > /Huimin
Comment 18 Huimin She 2015-10-02 12:44:06 UTC
Hi Robert,

I spent quite some time trying to backport this in dizzy branch, but did not succeed. With some work-around, I have successfully cross-compiled 32 bit applications, in dizzy branch. 

Here are the steps I did: 1) applying your oe-core patch, and 2) add: packagegroup-core-standalone-sdk-target lib32-packagegroup-core-standalone-sdk-target to <image_bb>. It installs all the required 32bit files to rootfs. However, they are still not installed to the SDK. So i manually copied them to the SDK.

Thanks a lot for your time on answering my questions.

Best regards,
Huimin
Comment 19 Robert Yang 2015-10-03 02:18:16 UTC
(In reply to comment #18)
> Hi Robert,
> 
> I spent quite some time trying to backport this in dizzy branch, but did not
> succeed. With some work-around, I have successfully cross-compiled 32 bit
> applications, in dizzy branch. 
> 
> Here are the steps I did: 1) applying your oe-core patch, and 2) add:
> packagegroup-core-standalone-sdk-target
> lib32-packagegroup-core-standalone-sdk-target to <image_bb>. It installs all
> the required 32bit files to rootfs. However, they are still not installed to
> the SDK. So i manually copied them to the SDK.

Sounds good, I think that it doesn't work is because we lack the part of code in datasmart, and it's too difficult to backport it.

// Robert

> 
> Thanks a lot for your time on answering my questions.
> 
> Best regards,
> Huimin
Comment 20 Bogdan Alexandru Voiculescu 2015-10-23 15:00:42 UTC
Verified on master 505a82673ac2487df5ea343a6422c2fc47018831
using source environment-setup-core2-64-poky-linux

 $CC hello.c
hello.c:1:1: warning: return type defaults to 'int' [-Wimplicit-int]
 main(){}
 ^