From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6487873561298993152 X-Received: by 10.28.126.196 with SMTP id z187mr1736670wmc.20.1511734180274; Sun, 26 Nov 2017 14:09:40 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.223.168.1 with SMTP id l1ls3461247wrc.5.gmail; Sun, 26 Nov 2017 14:09:39 -0800 (PST) X-Google-Smtp-Source: AGs4zMZczhx5Bbv+TGgNIWSwiHrbhgUdcBvBW7T18q1TlB40oLrFaPrmorHQv7e0al4BPoimF+1H X-Received: by 10.28.1.195 with SMTP id 186mr1481049wmb.16.1511734179906; Sun, 26 Nov 2017 14:09:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511734179; cv=none; d=google.com; s=arc-20160816; b=kT6xzY0zk2LjbrvieTqBeuor+rHxjMJFdWSWX2HAq8/Y/9W3TmYRNALeN7+bAL/ov7 dFnhMTi2XoLhUWUuaeRKZXo1P81gP5WBPrel0ONzIvk9hygxic+tA3IIYwr07ltnGWYR K8HKNJ11WiiYDVba6cE6Ax9oCryquTrVVOPZ+5aGQv/QvlFSE1ovfn12upl4NC75/gxv nWmC+Z2QGYt3yMmzvrPE8nNHkrb1imlfE3ScsipIuIsSHD5mwXX59jXz3FuI7gRLFex2 5lAUd7Ca12UZFYkp0QQc0urfNnCSlSsSsKck7BIVXBlT/WPODK39rol9H7GEKUoOhBP8 7vYw== 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:references:to:from:subject :arc-authentication-results; bh=VsqM+kKX0b5+O6MLZbmHtQlHXhFE9C3mFiFymGtmvpA=; b=tVZFiropV9/BxzR8kHOovzX6iMXH5G2sW7Ne58mm5QM3GKSAnbNa4T7xHj6qLZ0808 n7xtPHh6zDiQw9dlbnoXOLUKv3Jy9Ls2EEhXHYshBoU4l8WpMPKCHKd2aWs2ZlQ+B8Hk XIpKrHsMkw3xFIAwX9a5yu3BviQ5AdN/S4L1ljsH50colcnNstSpj7ONDOQMPSKEuzIr opBbQ7zPy/Hu96wkHFF8/0hKM9W+xSYLjcvsyDjm8EUlYjqjhV555G/5aSZmZRi9prJl BfMykygWG2plE2giW8R2mzAHF439z8FtT3/iPNbYwXwvwCy9WIz6zZlhR5N6t/9qdH/W MewQ== 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 k11si707984wmi.1.2017.11.26.14.09.39 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Nov 2017 14:09:39 -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 vAQM9bbs017011 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Sun, 26 Nov 2017 23:09:38 +0100 Subject: Re: [PATCH] build.sh: Fix perl complaints about locale From: Alexander Smirnov To: 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> Message-ID: <9a858fdb-428c-c449-9767-354a97e40046@ilbers.de> Date: Mon, 27 Nov 2017 01:09:32 +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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-TUID: OemTviirTE// On 11/21/2017 09:40 PM, Alexander Smirnov wrote: > > > 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. >> Applied to next.