From patchwork Thu Aug 10 10:54:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugene Yudin X-Patchwork-Id: 800178 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=uclibc-ng.org (client-ip=2a00:1828:2000:679::23; helo=helium.openadk.org; envelope-from=devel-bounces@uclibc-ng.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ndmsystems-com.20150623.gappssmtp.com header.i=@ndmsystems-com.20150623.gappssmtp.com header.b="TjKuW5Il"; dkim-atps=neutral Received: from helium.openadk.org (helium.openadk.org [IPv6:2a00:1828:2000:679::23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xSlQf1GPZz9sRg for ; Thu, 10 Aug 2017 20:55:05 +1000 (AEST) Received: from helium.openadk.org (localhost [IPv6:::1]) by helium.openadk.org (Postfix) with ESMTP id 88FC910119; Thu, 10 Aug 2017 12:55:01 +0200 (CEST) X-Original-To: devel@uclibc-ng.org Delivered-To: devel@helium.openadk.org Received: from mail-qt0-f172.google.com (mail-qt0-f172.google.com [209.85.216.172]) by helium.openadk.org (Postfix) with ESMTPS id DDA6C10119 for ; Thu, 10 Aug 2017 12:54:59 +0200 (CEST) Received: by mail-qt0-f172.google.com with SMTP id v29so1861322qtv.3 for ; Thu, 10 Aug 2017 03:54:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ndmsystems-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=gbQDXaBKQ3yS3I0a0Tdj482tbDuG/14i2z8R5w8aa/Q=; b=TjKuW5IlJjdmewhZLa1x6OIdRCf88YzbZamv4x0ssLz4ZaxpbQT6bGDfpC/SLyAhmM 3rHwHf4uej8XxuHaSLI3DAEFkJdRO7+kRwNnO+qPS0GKVCjbHyMjviJ9Q5TtlKxucFem Q46caYsQY47zM8pPgeeNH0YTSzE8cXon2x4hDXtc2uNdtBXenqEAAT+pWSkJtMCZU8SH DB2gOGl64ge6dGjgKrPDF1Y1MKOYTO8uvGxmrIywf8pKRPOkaVx4GNyu8xf+AkytwVBf 8V8AuQvlKavSPygaeKt+TflzMcFkSfpNF1pwu/QOgWl0YjQArrmq4udiU/GddjWj25/y xoxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=gbQDXaBKQ3yS3I0a0Tdj482tbDuG/14i2z8R5w8aa/Q=; b=kPu70pNV6+RCrWA89PxJNo/vxIBlA8xb+Ip8y7QHkfxvfc4r5pw1bCMHfXR9EjpZfs rcSb4yR0Gw0Hjr4quiqr4kJ1CRf9Cr2+8BLv8VF1ezfIDs1odhGUjDugHL8ZgI7qAyqB 0eoCindgMDc+FyrGfEz0wPmx4QSEeWy6l4j3c6NcEoimNj2xFKU0+ovTLYopFFo7sRoP vl+0Zb3gOncnN3aU3SJxOBZgFi40ZyDpVky5ZFyeC59wmtiBziuZX24muzDQwqlubCO7 rH4d6shYGimUvchJZXGGY4XHPqq53KKz1sQrU6Ckva1uikCfP76ye4Hb2nzLSNvmB7s+ GWbA== X-Gm-Message-State: AHYfb5jjnkrgKH4KsvEtWwl3hV3/Rs/wkKzZBMTm2jU7IPFuwAE7R4ps k/MUqdkpgT4bhhh3HFZPaCnuajfIWmML X-Received: by 10.237.62.106 with SMTP id m39mr15916449qtf.340.1502362498450; Thu, 10 Aug 2017 03:54:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.104.34 with HTTP; Thu, 10 Aug 2017 03:54:57 -0700 (PDT) In-Reply-To: <04d33720-216b-4500-803c-7c55c97693ab@mind.be> References: <20170803054828.GB7682@waldemar-brodkorb.de> <20170803092346.02d02371@windsurf.home> <298e3d5a-5994-3704-fba6-d292d32bfd4c@dawncrow.de> <20170808230048.75361077@windsurf> <04d33720-216b-4500-803c-7c55c97693ab@mind.be> From: Eugene Yudin Date: Thu, 10 Aug 2017 13:54:57 +0300 Message-ID: To: Arnout Vandecappelle , Waldemar Brodkorb Cc: devel@uclibc-ng.org, buildroot@buildroot.org Subject: Re: [uclibc-ng-devel] [Buildroot] buildroot uClibc-ng build failure X-BeenThere: devel@uclibc-ng.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: uClibc-ng Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devel-bounces@uclibc-ng.org Sender: "devel" Yes. In that particular case loop iterates through en_US (from buildroot), en_US and en_GB. Of cause, that list can be patched but I don't know if that's correct. It's look a bit strange if user passes locale which actually absent. Waldemar, what you think about it? I made several tests with different locales (en_US, en_GB, ru_RU, C.UTF-8 and C). The generated header is the same for all the above locale except pure C. Comment in the same makefile tells about problem with some locales. I think it would be better to use C locale for fallback. I attached the tested patch to modify fallback behavior based on Arnout draft. I also changed the order of calls to raise priority of C.UTF-8 locale. On Thu, Aug 10, 2017 at 12:36 PM, Arnout Vandecappelle wrote: > > > On 10-08-17 11:09, Eugene Yudin wrote: > > The system library makefile handles option the following way > > (extra/locale/Makefile.in): > > $(locale_OUT)/wctables.h: $(locale_OUT)/gen_wctype > > @$(disp_gen) > > $(Q)for locale in $(call qstrip,$(UCLIBC_BUILD_MINIMAL_LOCALES)) > en_US > > en_GB; do \ > > $< $(FLAG-locale-verbose) $$locale > $@ || \ > > $< $(FLAG-locale-verbose) $$locale.UTF-8 > $@ || \ > > $< $(FLAG-locale-verbose) $$locale.iso8859-1 > $@ && > break; \ > > done > > > > The program "gen_wctype" receives locale name as command line parameter. > > That application call the function setlocale() inside it. > > Some time ago that call was disabled to workaround bug with locales. > > That's the reason for the absence of problems in the past. > > Changes in the last release return this call. > > So the problem really is that this command tries a number of locales, but > not > any of the locales actually present on the system? > > I would propose to: > - replace the "en_US en_GB" with "C C.UTF-8" since the latter is much more > likely to be present on the host; > - use '$(sort $(patsubst %.utf8,%,$(shell locale -a)))' as an ultimate > fallback. > > Does that sound reasonable? I didn't look at the history if this > particular > piece of code, I guess it must have gone through several detours already... > > Regards, > Arnout > > -- > Arnout Vandecappelle arnout at mind be > Senior Embedded Software Architect +32-16-286500 > Essensium/Mind http://www.mind.be > G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven > LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle > GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF > diff --git a/extra/locale/Makefile.in b/extra/locale/Makefile.in index c23461a..cbf0ca5 100644 --- a/extra/locale/Makefile.in +++ b/extra/locale/Makefile.in @@ -166,9 +166,9 @@ $(locale_OUT)/c8tables.h: $(locale_OUT)/gen_wc8bit $(locale_OUT)/codesets.txt # Warning! Beware tr_TR toupper/tolower exceptions! $(locale_OUT)/wctables.h: $(locale_OUT)/gen_wctype @$(disp_gen) - $(Q)for locale in $(call qstrip,$(UCLIBC_BUILD_MINIMAL_LOCALES)) en_US en_GB; do \ - $< $(FLAG-locale-verbose) $$locale > $@ || \ + $(Q)for locale in $(call qstrip,$(UCLIBC_BUILD_MINIMAL_LOCALES)) C; do \ $< $(FLAG-locale-verbose) $$locale.UTF-8 > $@ || \ + $< $(FLAG-locale-verbose) $$locale > $@ || \ $< $(FLAG-locale-verbose) $$locale.iso8859-1 > $@ && break; \ done