Yocto glibc-locale do_package installed but not shipped in any package
Asked Answered
H

2

6

I am trying to build a custom image on yocto. When I create an image, I get an error in glibc-locale (do_package step).

The error is

ERROR: glibc-locale-2.24-r0 do_package: QA Issue: glibc-locale: Files/directories were installed but not shipped in any package:
    {
        "a lot of file in /usr/lib/gconv, /usr/share/i18n paths"
    }
    Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
    glibc-locale: 820 installed and not shipped files. [installed-vs-shipped]
    ERROR: glibc-locale-2.24-r0 do_package: Fatal QA errors found, failing task.
    ERROR: glibc-locale-2.24-r0 do_package: Function failed: do_package
    ERROR: Logfile of failure stored in: /home/test/rpi/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/glibc-locale/2.24-r0/temp/log.do_package.30243
    ERROR: Task (/home/test/poky-morty/meta/recipes-core/glibc/glibc-locale_2.24.bb:do_package) failed with exit code '1'

I tried to solve it adding the following in the glibc-locale_2.24.bb file:

INSANE_SKIP_${PN} = "installed-vs-shipped "

When I do this, there is no error in glibc do_package step anymore but I have an error in the do_rootfs step:

 ERROR: ekt-image-1.0-r0 do_rootfs: Unable to install packages. Command '/home/test/rpi/build/tmp/sysroots/x86_64-linux/usr/bin/opkg --volatile-cache -f /home/test/rpi/build/tmp/work/raspberrypi3-poky-linux-gnueabi/ekt-image/1.0-r0/opkg.conf -t /home/test/rpi/build/tmp/work/raspberrypi3-poky-linux-gnueabi/ekt-image/1.0-r0/temp/ipktemp/ -o /home/test/rpi/build/tmp/work/raspberrypi3-poky-linux-gnueabi/ekt-image/1.0-r0/rootfs  --force_postinstall --prefer-arch-to-version   install locale-base-en-us' returned 255:
Collected errors:
 * opkg_prepare_url_for_install: Couldn't find anything to satisfy 'locale-base-en-us'.

ERROR: ekt-image-1.0-r0 do_rootfs: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /home/test/rpi/build/tmp/work/raspberrypi3-poky-linux-gnueabi/ekt-image/1.0-r0/temp/log.do_rootfs.10085
ERROR: Task (/home/test/rpi/meta-rpi/images/ekt-image.bb:do_rootfs) failed with exit code '1'

I tried to cleanstate glibc, glibc-locale but it does not work.

Edit: I tried to add these lines in my glibc-locale.inc file:

FILES_kernel-base += "/usr/share/i18n/charmaps/*"
FILES_kernel-base += "/usr/share/i18n/locales/*"
FILES_kernel-base += "/usr/lib/gconv/*"
FILES_kernel-base += "/usr/share/i18n*"

And also these lines:

FILES_${PN} += "/usr/share/i18n/charmaps/*"
FILES_${PN} += "/usr/share/i18n/locales/*"
FILES_${PN} += "/usr/lib/gconv/*"
FILES_${PN} += "/usr/share/i18n*"

But it does not solve my problem.

Hochheimer answered 30/1, 2017 at 13:52 Comment(0)
D
7

I have had this issue, and it seems to be due to leaving out glibc options in the DISTRO_FEATURES for the build. If you're redefining DISTRO_FEATURES, make sure to include ${DISTRO_FEATURES_LIBC} in its definition.

See Re: [yocto] Problem building glibc-locale on the Yocto mailing list.

See also the comments about DISTRO_FEATURES_LIBC in openembedded-core/local.conf.sample.extended at master · openembedded/openembedded-core.

Dalton answered 26/5, 2017 at 3:28 Comment(0)
P
6

Instead of adding a distro feature like this:

DISTRO_FEATURES += "feature"

Try instead:

DISTRO_FEATURES_append = " feature"

The first sentence in my conf/local.conf was overwriting ?= definitions, such as DISTRO_FEATURES_LIBC.

Photochronograph answered 9/10, 2018 at 9:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.