From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11248 invoked by alias); 16 Aug 2016 11:39:22 -0000 Mailing-List: contact newlib-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-owner@sourceware.org Received: (qmail 11238 invoked by uid 89); 16 Aug 2016 11:39:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=setlocale.h, setlocaleh, UD:setlocale.h, mbstate_t X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 16 Aug 2016 11:39:20 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E813F318 for ; Tue, 16 Aug 2016 04:40:51 -0700 (PDT) Received: from [10.2.206.222] (e108033-lin.cambridge.arm.com [10.2.206.222]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C1C843F32C for ; Tue, 16 Aug 2016 04:39:18 -0700 (PDT) Subject: Re: Build fails with an error in setlocale.h To: newlib@sourceware.org References: <57B2ECDB.5000102@foss.arm.com> <20160816104814.2lemuf2myau43nr6@calimero.vinschen.de> From: Matthew Wahab Message-ID: <57B2FB65.10402@foss.arm.com> Date: Tue, 16 Aug 2016 11:39:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20160816104814.2lemuf2myau43nr6@calimero.vinschen.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2016/txt/msg00941.txt.bz2 On 16/08/16 11:48, Corinna Vinschen wrote: > On Aug 16 11:37, Matthew Wahab wrote: >> I get a build failure when cross-compiling for aarch64-none-elf, the error >> message is >> ---- >> newlib-cygwin/newlib/libc/stdlib/../locale/setlocale.h:206:38: error: >> unknown type name 'locale_t'; did you mean 'clockid_t'? >> size_t, size_t, mbstate_t *, locale_t); >> ^~~~~~~~ >> clockid_t > > > Can you test that the above patch works for you? I'll check it in then. > Thanks for the patch. It fixes that failure but there's another in localeconv.c: ---- newlib-cygwin/newlib/libc/locale/localeconv.c: In function '__localeconv_l': newlib-cygwin/newlib/libc/locale/localeconv.c:47:10: error: 'lconv' undeclared (first use in this function); did you mean 'lconv'? return lconv; ^~~~~ lconv ---- I think that this is because the lconv is declared and used ---- #ifdef __HAVE_LOCALE_INFO__ struct lconv *lconv = &locale->lconv; .. #endif /* __HAVE_LOCALE_INFO__ */ return lconv; ---- That's easy to fix but I then get failures in time/strftime.c for__get_time_locale: ---- newlib-cygwin/newlib/libc/time/../time/strftime.c: In function '__strftime': newlib-cygwin/newlib/libc/time/../time/strftime.c:701:48: warning: implicit declaration of function '__get_time_locale'; did you mean '__get_current_locale'? [-Wimplicit-function-declaration] const struct lc_time_T *_CurrentTimeLocale = __get_time_locale (locale); ^~~~~~~~~~~~~~~~~ __get_current_locale ---- I also get errors for the use of era_info_t and other types in that function ---- newlib-cygwin/newlib/libc/time/../time/strftime.c: In function 'wcsftime': newlib-cygwin/newlib/libc/time/../time/strftime.c:1446:3: error: unknown type name 'era_info_t'; did you mean '__ino_t'? era_info_t *era_info = NULL; ^~~~~~~~~~ __ino_t ---- But I haven't been able to track down what causes those. Matthew