From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6487873561298993152 X-Received: by 10.46.68.213 with SMTP id b82mr783373ljf.24.1510592792627; Mon, 13 Nov 2017 09:06:32 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.46.17.16 with SMTP id f16ls491855lje.8.gmail; Mon, 13 Nov 2017 09:06:32 -0800 (PST) X-Google-Smtp-Source: AGs4zMZEcMkyhiPmNEl9SAhuhLPuDqPQkQQwRdbtjpVWF91Uo6v0IEz1EhbH2BGO7RwhHbd4hmQL X-Received: by 10.46.91.212 with SMTP id m81mr402194lje.8.1510592792092; Mon, 13 Nov 2017 09:06:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510592792; cv=none; d=google.com; s=arc-20160816; b=j6j23ProKyhBQ9p3roXOQtpzybj7KUP4Ygqkh2DCHjz+QO90upC+4by5UMgvKAN0qj COSBXgy9U4LSqIqqPDj8/HDGzoPM0qxMi9Wpo8tPVeJrFN7ecV6Y2F/3h/6U/EST7zkG 0fvfaec1krZtgB+4+PWCqahp6uJ4VroUO6pp1zdU+RHAdXne4BbOqpBBvtNCf9V4G++w QT34bmRM1Fxk7hI5tCbmiI5aqoSR86Is7NHdoCOaU87AJROYnxNWsJvq16V2hu8ZHkOD l4eq0YLJjtCkQhrzVmuN6V+u8WqQ0da4wUiL/z72z0F6kUULIpNqBJwq0ffAzw6nBYPP kD/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:arc-authentication-results; bh=DcibsS6jLBU+0p7F30w7k0/RLINGCVD5roEPeODQGGg=; b=OZnn4vnnzyOxETVLk3XFPAlPl3mMtHyMB60UGFTdpikmMghlWKv1rmdykeGQxeNm5Q Uu1BAm0ZowN0elzPvBkBM9yhMrTCoIGHFQVNxWanlGjCD3X32WIKT8VwJCpZHMX9FBgu tv5LHWtel+wPxN0I+ZwiuDksYFzVDSW5Ab3RcHuobxSxr7C3Rp7E/PANGlaE3sa1chzY mI28sKwDnfrHW++ThbKhovy6X8Y0TIfHqo8HN4Ti28qeZnhZmX+8JRX6AsBo8i1tZGLa LqV7K7eM1rU/K9tmL0Ps3qMoKc0aHjqjTOCn2CgGkSi1lFtN/ZN5oFOijy2/xScKt/F/ 2pYA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id c23si1178091ljf.4.2017.11.13.09.06.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Nov 2017 09:06:32 -0800 (PST) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) client-ip=192.35.17.2; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id vADH6VF8013222 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 13 Nov 2017 18:06:31 +0100 Received: from md1em3qc ([139.25.68.40]) by mail1.siemens.de (8.15.2/8.15.2) with ESMTP id vADH6Vac019624; Mon, 13 Nov 2017 18:06:31 +0100 Date: Mon, 13 Nov 2017 18:06:43 +0100 From: Henning Schild To: Alexander Smirnov Cc: "[ext] Christian Storm" , Subject: Re: [PATCH] build.sh: Fix perl complaints about locale Message-ID: <20171113180643.0127c565@md1em3qc> In-Reply-To: <881bfcfd-4890-e7ae-01e6-44119d8c84f8@ilbers.de> References: <3730cdc0-c9f0-6be8-6479-59dcbe786d2a@ilbers.de> <20171113152401.ue6cmelxcrbh4man@MD1KR9XC.ww002.siemens.net> <20171113171005.5ea189b4@md1em3qc> <881bfcfd-4890-e7ae-01e6-44119d8c84f8@ilbers.de> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-TUID: s5ivTqXLlAlK Am Mon, 13 Nov 2017 19:50:01 +0300 schrieb Alexander Smirnov : > Hi, >=20 > On 11/13/2017 07:10 PM, Henning Schild wrote: > > Am Mon, 13 Nov 2017 16:24:01 +0100 > > schrieb "[ext] Christian Storm" : > > =20 > >>>>>>>>> The log.do_build is flooded by perl's locale complaints: > >>>>>>>>> > >>>>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 perl: warning: Setting locale = failed. > >>>>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 perl: warning: Please check th= at your locale > >>>>>>>>> settings: LANGUAGE =3D (unset), > >>>>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 LC_ALL =3D "en_US.UTF-8", > >>>>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 LANG =3D (unset) > >>>>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 are su= pported and installed on your system. > >>>>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 perl: warning: Falling back to= the standard locale > >>>>>>>>> ("C"). > >>>>>>>>> > >>>>>>>>> Make perl happy by explicitly giving it the C locale. > >>>>>>>>> > >>>>>>>>> Signed-off-by: Christian Storm > >>>>>>>>> --- > >>>>>>>>> =C2=A0=C2=A0 meta/recipes-devtools/buildchroot/files/build.sh= | 2 +- > >>>>>>>>> =C2=A0=C2=A0 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 > >>>>>>>>> =C2=A0=C2=A0 # Build the package > >>>>>>>>> -dpkg-buildpackage > >>>>>>>>> +LC_ALL=3DC LANGUAGE=3DC LANG=3DC dpkg-buildpackage > >>>>>>>>> =20 > >>>>>>>> > >>>>>>>> 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. =20 > >>>>>>> > >>>>>>> Sure, but this alone doesn't solve the problem as you have to > >>>>>>> put the locale into every (sudo) environment. Then, what > >>>>>>> about =20 > >>>>>> > >>>>>> 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. =20 > >>>>> > >>>>> Working on PRoot I've found the following multistrap option: > >>>>> > >>>>> "ignorenativearch=3Dtrue" > >>>>> > >>>>> Probably it could somehow help here... =20 > >>>> > >>>> Hm, this sounds unrelated to me at first sight. I did a quick > >>>> local =20 > >>> > >>> 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=3Dtrue > >>> unpack=3Dtrue > >>> +ignorenativearch=3Dtrue > >>> bootstrap=3D##DISTRO## > >>> aptsources=3D##DISTRO## > >>> configscript=3D##CONFIG_SCRIPT## > >>> > >>> Could you please try it? =20 > >> > >> Done, and it fixes the problem as well. =20 > >=20 > > 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? =20 >=20 > To be honest, I don't exactly know what multistrap does in native > mode (to be investigated), but with "ignorenativearch=3Dtrue" 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 >=20 > >=20 > > Henning > > =20 > >> =20 > >>>> 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 > >>>> =20 > >>>> +sed -i 's/^# en_US.UTF-8 UTF-8/en_US.UTF-8 > >>>> UTF-8/g' /etc/locale.gen +dpkg-reconfigure > >>>> --frontend=3Dnoninteractive locales + > >>>> #set up non-interactive configuration > >>>> export DEBIAN_FRONTEND=3Dnoninteractive > >>>> DEBCONF_NONINTERACTIVE_SEEN=3Dtrue export LC_ALL=3DC LANGUAGE=3DC > >>>> LANG=3DC ``` > >>>> =20 > >>> > >>> For sure I'll try this patch, but first I'd like to clarify why > >>> dedicated code in configscript doesn't work. =20 > >> > >> OK. I'll look forward to it. The perl errors are distractingly > >> annoying.. The manpage of multistrap has some words on it as > >> well... > >> > >> =20 > >>> P.S. am I right that you build target with the same arch as your > >>> host? =20 > >> > >> Yes, as said, both x86_64. > >> > >> > >> > >> Besten Gru=C3=9F, > >> Christian > >> =20 > > =20 >=20