Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
dev
-
None
-
-
6ad68945b (dev), 3bcb7a54b (lts-6.2), f4209f700 (6.5), a7c87be88 (dev), 8984ea7b4 (6.6), f683024b3 (6.5)
Description
Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8. Qt depends on a UTF-8 locale, but has failed to switch to one.
Encountered the above error when trying to test runtime of some packages in meta-qt6 (dev branch, namely qtdeclarative and qtsvg, and I suspect the error occurs on other packages as well) using the poky (master branch) reference distribution of Yocto Project
local.conf:
egrep -v "^#|^$" conf/local.conf MACHINE ??= "qemux86-64" PACKAGE_CLASSES ?= "package_ipk" EXTRA_IMAGE_FEATURES ?= "debug-tweaks" USER_CLASSES ?= "buildstats" PATCHRESOLVE = "noop" BB_DISKMON_DIRS ??= "\ STOPTASKS,${TMPDIR},1G,100K \ STOPTASKS,${DL_DIR},1G,100K \ STOPTASKS,${SSTATE_DIR},1G,100K \ STOPTASKS,/tmp,100M,100K \ HALT,${TMPDIR},100M,1K \ HALT,${DL_DIR},100M,1K \ HALT,${SSTATE_DIR},100M,1K \ HALT,/tmp,10M,1K" PACKAGECONFIG:append:pn-qemu-system-native = " sdl" CONF_VERSION = "2" PACKAGECONFIG:remove:pn-qtmultimedia = " ffmpeg" DISTRO_FEATURES:append = " ptest x11" IMAGE_INSTALL:append = " qtdeclarative-ptest qtsvg-ptest qtsvg-examples qtsvg" PACKAGECONFIG:append:pn-qtsvg = " examples"
bblayers.conf:
egrep -v "^#|^$" conf/bblayers.conf LCONF_VERSION = "7" BBPATH = "${TOPDIR}" BBFILES ?= "" BBLAYERS ?= " \ ..../repos/openembedded-core/meta \ ..../repos/meta-openembedded/meta-oe \ ..../repos/meta-openembedded/meta-python \ ..../layers/meta-qt6 \ "
I was able to resolve the issue for qtsvg using the following changes, is this change acceptable or is there a better soultion that I am missing:
diff --git a/recipes-qt/qt6/ptest/run-ptest b/recipes-qt/qt6/ptest/run-ptest index 3933bae..8e0f641 100644 --- a/recipes-qt/qt6/ptest/run-ptest +++ b/recipes-qt/qt6/ptest/run-ptest @@ -1,5 +1,5 @@ #!/bin/sh for test in $(cat tst_list); do - ( cd $(dirname ${test}) && ./$(basename ${test}) ) + ( cd $(dirname ${test}) && LANG=en_US ./$(basename ${test}) ) done diff --git a/recipes-qt/qt6/qtsvg_git.bb b/recipes-qt/qt6/qtsvg_git.bb index f5e1a34..3aaa61f 100644 --- a/recipes-qt/qt6/qtsvg_git.bb +++ b/recipes-qt/qt6/qtsvg_git.bb @@ -17,3 +17,4 @@ include recipes-qt/qt6/qt6.inc DEPENDS += "qtbase" +RDEPENDS:${PN}-ptest += " locale-base-en-us"
Steps to reproduce:
create a build directory with the above configuration.
$ bitbake core-image-minimal
$ runqemu kvm publicvnc qemuparams="-m 4096"
# on target
> ptest-runner
Attachments
Issue Links
- relates to
-
QTBUG-120059 Invalid warnings about invalid/non-UTF-8 locale
- Closed
-
QTBUG-111443 macOS/iOS: "Detected system locale encoding (US-ASCII, locale "C") is not UTF-8"
- Closed
-
QTBUG-113761 Detected locale "C" with character encoding "US-ASCII", which is not UTF-8.
- Closed