Skip to contentSkip to conversation

lib32-glibc headers populated instead glibc headers in the SDK toolchain - yocto 2.2.2

DISCUSSION ravi chandran 2 participants 2 messages Nov 8, 2018 – Nov 19, 2018 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hi all,
I working as integrator in one project where both lib32 & lib64 need to be supported. Hence, lib32-glibc & glibc both are there in yocto build. There is an issue, I could not able to fix. In the final toolchain, after running "bitbake <image> -c populate-sdk", it is randomly, lib32-glibc headers are getting populated instead of glibc headers.
Ex: in the toolchain, <sysroots_dir>/aarch64/usr/include/endian.h - lib32-glibc seen instead glibc header.
Please let me know if anybody has any solution /work around for this.
Thanks in Advance,Ravi

#2 lore raw
Quoted 7 lines · ravi chandran

Hi all,

I working as integrator in one project where both lib32 & lib64 need to be supported. Hence, lib32-glibc & glibc both are there in yocto build. There is an issue, I could not able to fix. In the final toolchain, after running "bitbake <image> -c populate-sdk", it is randomly, lib32-glibc headers are getting populated instead of glibc headers.

Ex: in the toolchain, <sysroots_dir>/aarch64/usr/include/endian.h - lib32-glibc seen instead glibc header.

Please let me know if anybody has any solution /work around for this.

Hi Ravi,

What image did you do populate_sdk? It turns out that no need to do populate_sdk for lib32 image. And the tasks has been removed by Robert in Yocto 2.5 for multilib images.

http://git.openembedded.org/openembedded-core/commit/?id=77144bc808be02deb3351c9c1bf5b4f2b8c3a6ec.

commit e153efde9754a650e555f46cba09680baabd7d7e
Author: Robert Yang <[email protected]>
Date:   Mon Jan 8 16:27:34 2018 +0800

    multilib.bbclass: deltask populate_sdk and populate_sdk_ext

    The "bitbake image -cpopulate_sdk/ext" generates SDK/eSDK for all multilib variants, so "bitbake lib32-image -cpopulate_sdk/ext" is not needed, and it doesn't work well, for example:

    MACHINE ?= "qemux86-64"
    require conf/multilib.conf
    MULTILIBS = "multilib:lib32"
    DEFAULTTUNE_virtclass-multilib-lib32 = "x86"

    $ bitbake lib32-core-image-minimal -cpopulate_sdk_ext
    [snip]
    Exception: FileExistsError: [Errno 17] File exists: '/buildarea/lyang1/test_q64/tmp/sysroots-components/core2-64/openssl/sysroot-providers/openssl10' -> '/buildarea/lyang1/test_q64/tmp/work/qemux86_64-pokymllib32-linux/lib32-core-image-minimal/1.0-r0/lib32-recipe-sysroot/sysroot-providers/openssl10'
    [snip]

    The problem is populate_sdk_ext installs all multilib variants, and extend_recipe_sysroot() handles foo-image depends lib32-foo-image, but doesn't handle lib32-foo-image depends foo-image, we can use a lot of trick ways to make it work:
    1) Get foo-image's RECIPE_SYSROOT when build lib32-foo-image
    2) Handle conflicts with foo-image.do_rootfs
    3) Handle conflicts when "bitbake lib32-foo-image foo-image -cpopulate_sdk_ext"

    And maybe other potential problems, this looks painful, so just delete the task.

    [YOCTO #12210]

    (From OE-Core rev: 77144bc808be02deb3351c9c1bf5b4f2b8c3a6ec)

Regards,
Kai

Quoted 4 lines

Thanks in Advance,
Ravi

Signature · 2 lines
Regards,
Neil | Kai Kang