From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6487873561298993152 X-Received: by 10.80.142.245 with SMTP id x50mr5877566edx.0.1511289625257; Tue, 21 Nov 2017 10:40:25 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.80.167.100 with SMTP id h91ls1044125edc.8.gmail; Tue, 21 Nov 2017 10:40:24 -0800 (PST) X-Google-Smtp-Source: AGs4zMZAqOahaS0xNZ7MWVSuMoXfOuaUyxQ45l6zDV1sY2Q22yxj0dSNuVtqX8Q9C1FSXZtVUZV6 X-Received: by 10.80.145.246 with SMTP id h51mr5877975eda.10.1511289624882; Tue, 21 Nov 2017 10:40:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511289624; cv=none; d=google.com; s=arc-20160816; b=WiWgE2sEZY/Cd9PVR1Yq4fjBvG2TmHbjVlGbREVZS5yRpuI/FvdsSRFwq2HrOl+swv 7PA2JWAuwku0XSXUpJs1pyvCAWayPm8sJHnqTRe0q3bFbiHjW1aiNRRlHwqnvM2x9AwX r4c30zXPwtFJNbbqeimBmKCRXrcai2aQGsyEr4WLc8gdRk7mvMORwMZMRxm5NYofwcpi mOkdJc91P/1XU0CXtzOKuZZn6acVrmzAApIKyQ/sK/TommPhWucXEuq/gPrKJs9jc5uw MfBxp/X/FZOMQTBfgtZOpdpT+EqOpbc182RBXkAMaNO6iwvWA+/Ulvy6LMJdyo5fsCbj GYMg== 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=fgQRa/o/FdFHHzu4bFoUDgcii3xhamfxyBYBhPPYPRs=; b=K08zifxTB1hpgiVZ5YiudDSCqu5CjNDOGT9uu2Omz2Ls8cwXwuwfWc9nbvcRSD3zNw Q7A8FVaH8gXqKDKYNTnS3Arm+IehvWesuc1NLx6PQ9esmnjO+hsX51criQNxKSzJfKLA Mj3F/qMkU2nz3fHfw0f8WVLT0rFv0+bkxcpCEeE1tHl7PdeHVdgdi1FdcSgIUOBAwMNF HXi1WZA/oEtEsuWygFAIufXGkeEPcrfhLBsnHYCD3D4JmwisUI/lGgLJ6O5beZtNd+tp BFYvGJTuz/TXuC22M5nppP67nAjN+1ojS4TEZmXjucTSuaTVshMIorxFWmQe81UciVCg Jsww== 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 w21si1178118edl.5.2017.11.21.10.40.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Nov 2017 10:40:24 -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 vALIeMbW001568 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Tue, 21 Nov 2017 19:40:23 +0100 Subject: Re: [PATCH] build.sh: Fix perl complaints about locale To: Henning Schild Cc: isar-users@googlegroups.com References: <20171113122151.19409-1-christian.storm@siemens.com> <00f7d3a1-8aab-ac7b-6d30-289de2dfa036@ilbers.de> <20171121094213.0f32a817@md1em3qc> <20171121190449.4927caa8@md1em3qc> <20171121193201.3d794469@md1em3qc> From: Alexander Smirnov Message-ID: Date: Tue, 21 Nov 2017 21:40:16 +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: <20171121193201.3d794469@md1em3qc> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: PSGJy6+15TBX On 11/21/2017 09:32 PM, Henning Schild wrote: > Am Tue, 21 Nov 2017 21:12:35 +0300 > schrieb Alexander Smirnov : > >> Hi, >> >> On 11/21/2017 09:04 PM, Henning Schild wrote: >>> Am Tue, 21 Nov 2017 11:56:57 +0300 >>> schrieb Alexander Smirnov : >>> >>>> On 11/21/2017 11:42 AM, Henning Schild wrote: >>>>> Am Fri, 17 Nov 2017 13:42:05 +0300 >>>>> schrieb Alexander Smirnov : >>>>> >>>>>> Hi, >>>>>> >>>>>> On 11/13/2017 03:21 PM, Christian Storm wrote: >>>>>>> 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 >>>>>>> >>>>>> >>>>>> short question, does LC_ALL override LANG value? >>>>> >>>>> No. Try "LC_ALL=C locale", as the name says it overrides LC_*. But >>>>> you are right LC_ALL might be enough to get rid of the warnings. >>>> >>>> I'm asking because it's not so clear for me. What I've got from >>>> various links, LC_ALL overrides LANG: >>>> >>>> https://docs.oracle.com/cd/E23824_01/html/E26033/glmbx.html >>>> >>>> ... >>>> If the LC_ALL environment variable is set, it overrides LANG and >>>> all the separate locale categories. >>>> ... >>>> >>>> https://www.gnu.org/software/gettext/manual/html_node/Locale-Environment-Variables.html >>>> >>>> ... >>>> LC_ALL is an environment variable that overrides all of these... >>>> As a user, you therefore have to unset this variable if you want >>>> to set LANG and optionally some of the other LC_xxx variables. >>>> ... >>>> >>>> https://wiki.archlinux.org/index.php/locale#LC_ALL:_troubleshooting >>>> >>>> ... >>>> The locale set for this variable will always override LANG and all >>>> the other LC_* variables, whether they are set or not. >>>> ... >>>> >>>> And so on... >>>> >>>> I wonder if there is some reference place where it's strictly >>>> defined whether or not LC_ALL overrides LAND. >>> >>> Ah sorry i read it wrong. LC_ALL sets the others, not sure which >>> one is the strongest. But why does it matter? You control all 3 and >>> likely setting LC_ALL will mute the warning. >> >> The problem is that all variables come from your host environment to >> chroot. So if host LC_*/LANG variable differs from en_US.UTF-8 - it >> could be a problem in chroot. So we should override everything that >> goes from the host. > > Does not bitbake clear the env except for a few well-known variables? > Or are those on BB_ENV_WHITELIST or otherwise leaking into bitbake? > Good point, didn't check this. I tested env by runing chroot manually from shell. Will check, thanks! >> So I'm in doubts whether LC_ALL stronger than LANG or not, >> documentation frustrates me :-) For sure, I propose to use both LANG >> and LC_ALL in the patch. > > Even if bitbake inherits them from the host, just set them all to the > same value. Who cares which "C" wins. > Ok. Alex > Henning > >> Alex >