From: Henning Schild <henning.schild@siemens.com>
To: Alexander Smirnov <asmirnov@ilbers.de>
Cc: "[ext] Christian Storm" <christian.storm@siemens.com>,
<isar-users@googlegroups.com>
Subject: Re: [PATCH] build.sh: Fix perl complaints about locale
Date: Mon, 13 Nov 2017 18:06:43 +0100 [thread overview]
Message-ID: <20171113180643.0127c565@md1em3qc> (raw)
In-Reply-To: <881bfcfd-4890-e7ae-01e6-44119d8c84f8@ilbers.de>
Am Mon, 13 Nov 2017 19:50:01 +0300
schrieb Alexander Smirnov <asmirnov@ilbers.de>:
> Hi,
>
> On 11/13/2017 07:10 PM, Henning Schild wrote:
> > Am Mon, 13 Nov 2017 16:24:01 +0100
> > schrieb "[ext] Christian Storm" <christian.storm@siemens.com>:
> >
> >>>>>>>>> The log.do_build is flooded by perl's locale complaints:
> >>>>>>>>>
> >>>>>>>>> perl: warning: Setting locale failed.
> >>>>>>>>> perl: warning: Please check that your locale
> >>>>>>>>> settings: LANGUAGE = (unset),
> >>>>>>>>> LC_ALL = "en_US.UTF-8",
> >>>>>>>>> LANG = (unset)
> >>>>>>>>> are supported and installed on your system.
> >>>>>>>>> perl: warning: Falling back to the standard locale
> >>>>>>>>> ("C").
> >>>>>>>>>
> >>>>>>>>> Make perl happy by explicitly giving it the C locale.
> >>>>>>>>>
> >>>>>>>>> Signed-off-by: Christian Storm <christian.storm@siemens.com>
> >>>>>>>>> ---
> >>>>>>>>> meta/recipes-devtools/buildchroot/files/build.sh | 2 +-
> >>>>>>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>>>>>>>>
> >>>>>>>>> diff --git
> >>>>>>>>> a/meta/recipes-devtools/buildchroot/files/build.sh
> >>>>>>>>> b/meta/recipes-devtools/buildchroot/files/build.sh index
> >>>>>>>>> 19d554e..e53d359 100644 ---
> >>>>>>>>> a/meta/recipes-devtools/buildchroot/files/build.sh +++
> >>>>>>>>> b/meta/recipes-devtools/buildchroot/files/build.sh @@ -23,4
> >>>>>>>>> +23,4 @@ for i in configure aclocal.m4 Makefile.am
> >>>>>>>>> Makefile.in; do done
> >>>>>>>>> # Build the package
> >>>>>>>>> -dpkg-buildpackage
> >>>>>>>>> +LC_ALL=C LANGUAGE=C LANG=C dpkg-buildpackage
> >>>>>>>>>
> >>>>>>>>
> >>>>>>>> There is code that should setup locales for current
> >>>>>>>> buildchroot:
> >>>>>>>>
> >>>>>>>> https://github.com/ilbers/isar/blob/master/meta/recipes-devtools/buildchroot/files/configscript.sh#L8
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> So it would be nice to fix this globally instead of local
> >>>>>>>> solution.
> >>>>>>>
> >>>>>>> Sure, but this alone doesn't solve the problem as you have to
> >>>>>>> put the locale into every (sudo) environment. Then, what
> >>>>>>> about
> >>>>>>
> >>>>>> Hmm, it works as it is for archs different from host machine.
> >>>>>> I've attached 3 build logs for hello application in Stretch:
> >>>>>> amd64, arm and i386 and only *amd64* has locale flood. The
> >>>>>> others are OK. So that's why I think it's rather bug in
> >>>>>> configscript.
> >>>>>
> >>>>> Working on PRoot I've found the following multistrap option:
> >>>>>
> >>>>> "ignorenativearch=true"
> >>>>>
> >>>>> Probably it could somehow help here...
> >>>>
> >>>> Hm, this sounds unrelated to me at first sight. I did a quick
> >>>> local
> >>>
> >>> If I understand it correctly, that's the source of your issue. If
> >>> multisrtap detects that target architecture is similar to host,
> >>> then it tries to run in native mode and configscript doesn't work
> >>> correctly.
> >>>
> >>> So the following patch fixes the issue for me:
> >>>
> >>> diff --git
> >>> a/meta/recipes-devtools/buildchroot/files/multistrap.conf.in
> >>> b/meta/recipes-devtools/buildchroot/files/multistrap.conf.in index
> >>> 7e88608..28f2ee0 100644 ---
> >>> a/meta/recipes-devtools/buildchroot/files/multistrap.conf.in +++
> >>> b/meta/recipes-devtools/buildchroot/files/multistrap.conf.in @@
> >>> -4,6 +4,7 @@ [General]
> >>> noauth=true
> >>> unpack=true
> >>> +ignorenativearch=true
> >>> bootstrap=##DISTRO##
> >>> aptsources=##DISTRO##
> >>> configscript=##CONFIG_SCRIPT##
> >>>
> >>> Could you please try it?
> >>
> >> Done, and it fixes the problem as well.
> >
> > Not sure what "ignorenativearch" does, but "sed /etc/locale.gen &&
> > locale-gen" is clearer and probably free of side-effects. Are we
> > sure about all implications of ignorenativearch?
>
> To be honest, I don't exactly know what multistrap does in native
> mode (to be investigated), but with "ignorenativearch=true" we can
> guarantee that Isar has the same build flow for *all* the
> architectures. Otherwise we will have 2 possible flows: for native
> arch and for foreign archs, what could be the source of potential
> bugs like we have now with locales.
True, but without that knowledge and looking at the one issue, i would
prefer that patch that i understand ;).
Henning
> Alex
>
> >
> > Henning
> >
> >>
> >>>> clean run with the following patch and it resolved the issue, for
> >>>> me at least. Could you please also try a run with the patch
> >>>> applied for all the arches? If it solves the issue I'll send a
> >>>> proper patch. Thanks!
> >>>>
> >>>> ```
> >>>> diff --git
> >>>> a/meta/recipes-devtools/buildchroot/files/configscript.sh
> >>>> b/meta/recipes-devtools/buildchroot/files/configscript.sh old
> >>>> mode 100644 new mode 100755 index 9813c9a..1fd2061
> >>>> --- a/meta/recipes-devtools/buildchroot/files/configscript.sh
> >>>> +++ b/meta/recipes-devtools/buildchroot/files/configscript.sh
> >>>> @@ -32,6 +32,9 @@ locales locales/locales_to_be_generated
> >>>> multiselect en_US.UTF-8 UTF-8 locales
> >>>> locales/default_environment_locale select en_US.UTF-8 END
> >>>>
> >>>> +sed -i 's/^# en_US.UTF-8 UTF-8/en_US.UTF-8
> >>>> UTF-8/g' /etc/locale.gen +dpkg-reconfigure
> >>>> --frontend=noninteractive locales +
> >>>> #set up non-interactive configuration
> >>>> export DEBIAN_FRONTEND=noninteractive
> >>>> DEBCONF_NONINTERACTIVE_SEEN=true export LC_ALL=C LANGUAGE=C
> >>>> LANG=C ```
> >>>>
> >>>
> >>> For sure I'll try this patch, but first I'd like to clarify why
> >>> dedicated code in configscript doesn't work.
> >>
> >> OK. I'll look forward to it. The perl errors are distractingly
> >> annoying.. The manpage of multistrap has some words on it as
> >> well...
> >>
> >>
> >>> P.S. am I right that you build target with the same arch as your
> >>> host?
> >>
> >> Yes, as said, both x86_64.
> >>
> >>
> >>
> >> Besten Gruß,
> >> Christian
> >>
> >
>
next prev parent reply other threads:[~2017-11-13 17:06 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-13 12:21 Christian Storm
2017-11-13 12:49 ` Alexander Smirnov
2017-11-13 13:19 ` Christian Storm
2017-11-13 13:44 ` Alexander Smirnov
2017-11-13 14:07 ` Alexander Smirnov
2017-11-13 14:16 ` Christian Storm
2017-11-13 14:35 ` Alexander Smirnov
2017-11-13 15:24 ` Christian Storm
2017-11-13 16:10 ` Henning Schild
2017-11-13 16:50 ` Alexander Smirnov
2017-11-13 17:06 ` Henning Schild [this message]
2017-11-13 17:19 ` Alexander Smirnov
2017-11-14 8:41 ` Christian Storm
2017-11-16 13:17 ` Alexander Smirnov
2017-11-17 10:12 ` Christian Storm
2017-11-17 10:42 ` Alexander Smirnov
2017-11-21 8:42 ` Henning Schild
2017-11-21 8:56 ` Alexander Smirnov
2017-11-21 18:04 ` Henning Schild
2017-11-21 18:12 ` Alexander Smirnov
2017-11-21 18:32 ` Henning Schild
2017-11-21 18:40 ` Alexander Smirnov
2017-11-26 22:09 ` Alexander Smirnov
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=20171113180643.0127c565@md1em3qc \
--to=henning.schild@siemens.com \
--cc=asmirnov@ilbers.de \
--cc=christian.storm@siemens.com \
--cc=isar-users@googlegroups.com \
/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