From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6487873561298993152 X-Received: by 10.25.76.87 with SMTP id z84mr466447lfa.13.1510593560527; Mon, 13 Nov 2017 09:19:20 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.25.201.11 with SMTP id z11ls632093lff.16.gmail; Mon, 13 Nov 2017 09:19:20 -0800 (PST) X-Google-Smtp-Source: AGs4zMb8FBNqWMLMKInU35p97KpsqgjESm/ZEQdgpPXYD1ViCw8pWmR49SfsT5Su+KQoQFXE8rGs X-Received: by 10.25.35.87 with SMTP id j84mr632818lfj.23.1510593560047; Mon, 13 Nov 2017 09:19:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510593560; cv=none; d=google.com; s=arc-20160816; b=XuxxI8UZuPqrUB/CXfhO/wW08vo8Wp1HyicRUpmFwxXKrsYuY5k6IN0HSjzeI0Juev eDv56A2X53j0Qvfq4+s7gnTG+Tzz+pM8UeINOSSwPHR2uHtYI83FYSYouK8exEgCUGds 8LtcWNIkeRbqoTlUeSDMRrbXavgL2l/BiJwfl83XUoIZBIZQtxarBtsw2mhBpNBBXuhh c2r3eATe9q5PdCk1f7qWeKoQG1keiVpzSX2FVACpHX9zUSCM6+T35BcNQmC73jOPdig0 nbN4SMP4pex/Vflb+gEW9pnoV+EiCTs9OKcpXx8uuhWOViGuNmsAslhatq4ZCwwXmWRq ujyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject :arc-authentication-results; bh=OAbsgO8hqsyCKpOyWKFh3Q7UGbpQ4qwX9X+8YGSuFsg=; b=bX0iCenKDNZrI++/3nBBAAbpgr0XYdACwvxCeBA0PHgqRK4MN5gi210w2In3TT3HKs RRaLf4pnTs7Rjr3dRXTP3ZwTajujnBeErCXhEJL1RIAThKhNqY2Dilg1Lp0Ll5cTsuNx U8ZuVTuoz341Vbhoy9EXoIQmHG0S9W0rjaiwqTkut/PVWrJJGB3bLrqaUmAtOCW+a4jq zlUQ71ozqcqaU6ox9gw7bVZL6XBK6zo+2M0pYautDCYwUCZzzBaDR7vRP+2sE3/+c/mS K8wJbVyl3E2OGa8ucUZGteEofg8AX4s/UEBIEyHCu7iB9R8OXQ9H32CstqEf3s9q6Seh fHxA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Return-Path: Received: from aqmola.ilbers.de (aqmola.ilbers.de. [85.214.62.211]) by gmr-mx.google.com with ESMTPS id r17si1453002ljb.2.2017.11.13.09.19.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Nov 2017 09:19:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) client-ip=85.214.62.211; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Received: from [10.0.2.15] ([188.227.110.165]) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id vADHJGDO006162 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 13 Nov 2017 18:19:18 +0100 Subject: Re: [PATCH] build.sh: Fix perl complaints about locale To: Henning Schild Cc: isar-users@googlegroups.com References: <3730cdc0-c9f0-6be8-6479-59dcbe786d2a@ilbers.de> <20171113152401.ue6cmelxcrbh4man@MD1KR9XC.ww002.siemens.net> <20171113171005.5ea189b4@md1em3qc> <881bfcfd-4890-e7ae-01e6-44119d8c84f8@ilbers.de> <20171113180643.0127c565@md1em3qc> From: Alexander Smirnov Message-ID: <1d007209-046a-381e-341d-ba5735be5ad2@ilbers.de> Date: Mon, 13 Nov 2017 20:19:11 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20171113180643.0127c565@md1em3qc> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-TUID: 6O/FMua8MDXj On 11/13/2017 08:06 PM, Henning Schild wrote: > Am Mon, 13 Nov 2017 19:50:01 +0300 > schrieb Alexander Smirnov : > >> Hi, >> >> On 11/13/2017 07:10 PM, Henning Schild wrote: >>> Am Mon, 13 Nov 2017 16:24:01 +0100 >>> schrieb "[ext] Christian Storm" : >>> >>>>>>>>>>> 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 >>>>>>>>>>> --- >>>>>>>>>>>    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 ;). > Yeah, but on the other hand: - There is dedicated code which should setup locales, seems it's broken in master for native builds now. - Instead of fixing it, yet another locale setup is proposed. - This new locale setup affects already working builds. - Old locale stays in the tree. So, for me it would be better to spend a few hours to understand 'ignorenativearch' option before taking any decision. I'd happy to this :-) Alex >>>>>> 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 >>>> >>> >> > -- With best regards, Alexander Smirnov ilbers GmbH Baierbrunner Str. 28c D-81379 Munich +49 (89) 122 67 24-0 http://ilbers.de/ Commercial register Munich, HRB 214197 General manager: Baurzhan Ismagulov