From: Joshua Watt <jpewhacker@gmail.com>
To: yocto@lists.yoctoproject.org
Cc: Joshua Watt <JPEWhacker@gmail.com>
Subject: [yocto][meta-mingw][PATCH] oeqa: Set LANG in wine tests
Date: Wed, 2 Oct 2024 16:54:51 -0600 [thread overview]
Message-ID: <20241002225451.263086-1-JPEWhacker@gmail.com> (raw)
Glib likes to try and determine the local name using the Windows
GetConsoleOutputCP(), which doesn't work well running under wine in our
test cases (it seems to be linked to stdin not being a terminal).
This results in the error message:
GLib-WARNING (recursed) **: Failed to determine console output code page: Invalid access.. Falling back to UTF-8
and then Glib falls back to the locale "UTF-8", which is invalid and the
program will likely crash.
In particular, pkg-config seems to be sensitive to this on some hosts
(e.g. Ubuntu 24.04)
Set the LANG variable to a valid language to make sure that this
codepath in Glib is not triggered.
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
lib/oeqa/sdkmingw/context.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/oeqa/sdkmingw/context.py b/lib/oeqa/sdkmingw/context.py
index 5319223..5869e57 100644
--- a/lib/oeqa/sdkmingw/context.py
+++ b/lib/oeqa/sdkmingw/context.py
@@ -40,6 +40,12 @@ class OESDKMinGWTestContext(OESDKTestContext):
# Convenience variables to make test cases easier to write
env['SDK_DIR'] = getattr(self, 'wine_sdk_dir', '')
+ # Set the language. If this is not set to a valid language, then
+ # program that use glib will attempt to determine the language from
+ # stdin, which results in an error, fallback to "UTF-8" which is
+ # invalid and crash
+ env["LANG"] = "C.UTF-8"
+
return env
def wine_path(self, p):
--
2.46.2
next reply other threads:[~2024-10-02 22:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-02 22:54 Joshua Watt [this message]
2024-10-30 15:18 ` [yocto][meta-mingw][PATCH] oeqa: Set LANG in wine tests Steve Sakoman
2024-10-30 16:02 ` Joshua Watt
2024-10-30 16:03 ` Richard Purdie
2025-02-25 16:29 ` Steve Sakoman
2025-02-25 16:53 ` Richard Purdie
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=20241002225451.263086-1-JPEWhacker@gmail.com \
--to=jpewhacker@gmail.com \
--cc=yocto@lists.yoctoproject.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox