* [yocto][meta-mingw][PATCH] oeqa: Set LANG in wine tests
@ 2024-10-02 22:54 Joshua Watt
2024-10-30 15:18 ` Steve Sakoman
0 siblings, 1 reply; 6+ messages in thread
From: Joshua Watt @ 2024-10-02 22:54 UTC (permalink / raw)
To: yocto; +Cc: Joshua Watt
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
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [yocto][meta-mingw][PATCH] oeqa: Set LANG in wine tests
2024-10-02 22:54 [yocto][meta-mingw][PATCH] oeqa: Set LANG in wine tests Joshua Watt
@ 2024-10-30 15:18 ` Steve Sakoman
2024-10-30 16:02 ` Joshua Watt
0 siblings, 1 reply; 6+ messages in thread
From: Steve Sakoman @ 2024-10-30 15:18 UTC (permalink / raw)
To: yocto; +Cc: jpewhacker, Richard Purdie
Would it be possible to cherry-pick this commit to the styhead branch?
I'm seeing the same issue there.
Steve
On Wed, Oct 2, 2024 at 3:55 PM Joshua Watt via lists.yoctoproject.org
<JPEWhacker=gmail.com@lists.yoctoproject.org> wrote:
>
> 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
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#63932): https://lists.yoctoproject.org/g/yocto/message/63932
> Mute This Topic: https://lists.yoctoproject.org/mt/108789984/3620601
> Group Owner: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [steve@sakoman.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [yocto][meta-mingw][PATCH] oeqa: Set LANG in wine tests
2024-10-30 15:18 ` Steve Sakoman
@ 2024-10-30 16:02 ` Joshua Watt
2024-10-30 16:03 ` Richard Purdie
0 siblings, 1 reply; 6+ messages in thread
From: Joshua Watt @ 2024-10-30 16:02 UTC (permalink / raw)
To: Steve Sakoman; +Cc: yocto, Richard Purdie
On Wed, Oct 30, 2024 at 9:18 AM Steve Sakoman <steve@sakoman.com> wrote:
>
> Would it be possible to cherry-pick this commit to the styhead branch?
> I'm seeing the same issue there.
Yes, that would be a good idea. It's based on the build host, not wine
or Yocto, so I suspect we would see it on any branch using that host.
Pretty sure it will cherry-pick cleanly, do you want me to send a patch?
>
> Steve
>
> On Wed, Oct 2, 2024 at 3:55 PM Joshua Watt via lists.yoctoproject.org
> <JPEWhacker=gmail.com@lists.yoctoproject.org> wrote:
> >
> > 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
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#63932): https://lists.yoctoproject.org/g/yocto/message/63932
> > Mute This Topic: https://lists.yoctoproject.org/mt/108789984/3620601
> > Group Owner: yocto+owner@lists.yoctoproject.org
> > Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [steve@sakoman.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [yocto][meta-mingw][PATCH] oeqa: Set LANG in wine tests
2024-10-30 16:02 ` Joshua Watt
@ 2024-10-30 16:03 ` Richard Purdie
2025-02-25 16:29 ` Steve Sakoman
0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2024-10-30 16:03 UTC (permalink / raw)
To: Joshua Watt, Steve Sakoman; +Cc: yocto
On Wed, 2024-10-30 at 10:02 -0600, Joshua Watt wrote:
> On Wed, Oct 30, 2024 at 9:18 AM Steve Sakoman <steve@sakoman.com>
> wrote:
> >
> > Would it be possible to cherry-pick this commit to the styhead
> > branch?
> > I'm seeing the same issue there.
>
> Yes, that would be a good idea. It's based on the build host, not
> wine
> or Yocto, so I suspect we would see it on any branch using that host.
>
> Pretty sure it will cherry-pick cleanly, do you want me to send a
> patch?
I've sorted it, thanks.
Cheers,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [yocto][meta-mingw][PATCH] oeqa: Set LANG in wine tests
2024-10-30 16:03 ` Richard Purdie
@ 2025-02-25 16:29 ` Steve Sakoman
2025-02-25 16:53 ` Richard Purdie
0 siblings, 1 reply; 6+ messages in thread
From: Steve Sakoman @ 2025-02-25 16:29 UTC (permalink / raw)
To: Richard Purdie; +Cc: Joshua Watt, yocto
On Wed, Oct 30, 2024 at 9:03 AM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Wed, 2024-10-30 at 10:02 -0600, Joshua Watt wrote:
> > On Wed, Oct 30, 2024 at 9:18 AM Steve Sakoman <steve@sakoman.com>
> > wrote:
> > >
> > > Would it be possible to cherry-pick this commit to the styhead
> > > branch?
> > > I'm seeing the same issue there.
> >
> > Yes, that would be a good idea. It's based on the build host, not
> > wine
> > or Yocto, so I suspect we would see it on any branch using that host.
> >
> > Pretty sure it will cherry-pick cleanly, do you want me to send a
> > patch?
>
> I've sorted it, thanks.
Looks like this was backported to kirkstone and styhead, but not scarthgap.
I'm seeing scarthgap meta-mingw failures when running on Ubuntu 24.04 workers.
Can we backport to scarthgap too?
Thanks,
Steve
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [yocto][meta-mingw][PATCH] oeqa: Set LANG in wine tests
2025-02-25 16:29 ` Steve Sakoman
@ 2025-02-25 16:53 ` Richard Purdie
0 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2025-02-25 16:53 UTC (permalink / raw)
To: Steve Sakoman; +Cc: Joshua Watt, yocto
On Tue, 2025-02-25 at 08:29 -0800, Steve Sakoman wrote:
> On Wed, Oct 30, 2024 at 9:03 AM Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> >
> > On Wed, 2024-10-30 at 10:02 -0600, Joshua Watt wrote:
> > > On Wed, Oct 30, 2024 at 9:18 AM Steve Sakoman <steve@sakoman.com>
> > > wrote:
> > > >
> > > > Would it be possible to cherry-pick this commit to the styhead
> > > > branch?
> > > > I'm seeing the same issue there.
> > >
> > > Yes, that would be a good idea. It's based on the build host, not
> > > wine
> > > or Yocto, so I suspect we would see it on any branch using that
> > > host.
> > >
> > > Pretty sure it will cherry-pick cleanly, do you want me to send a
> > > patch?
> >
> > I've sorted it, thanks.
>
> Looks like this was backported to kirkstone and styhead, but not
> scarthgap.
>
> I'm seeing scarthgap meta-mingw failures when running on Ubuntu 24.04
> workers.
>
> Can we backport to scarthgap too?
Done.
Cheers,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-02-25 16:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-02 22:54 [yocto][meta-mingw][PATCH] oeqa: Set LANG in wine tests Joshua Watt
2024-10-30 15:18 ` 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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox