From: Matthew Wahab <matthew.wahab@foss.arm.com>
To: newlib@sourceware.org
Subject: Re: Build fails with an error in setlocale.h
Date: Tue, 16 Aug 2016 11:57:00 -0000 [thread overview]
Message-ID: <57B2FF91.4070001@foss.arm.com> (raw)
In-Reply-To: <57B2FB65.10402@foss.arm.com>
On 16/08/16 12:39, Matthew Wahab wrote:
> 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:
I've also tried with the second patch and still get the build errors.
Matthew
> ----
> 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
next prev parent reply other threads:[~2016-08-16 11:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-16 10:37 Matthew Wahab
2016-08-16 10:48 ` Corinna Vinschen
2016-08-16 10:58 ` Corinna Vinschen
2016-08-16 11:39 ` Matthew Wahab
2016-08-16 11:57 ` Matthew Wahab [this message]
2016-08-16 13:27 ` Corinna Vinschen
2016-08-16 13:59 ` Matthew Wahab
2016-08-16 14:28 ` Corinna Vinschen
2016-08-16 15:14 ` Matthew Wahab
2016-08-16 17:04 ` Corinna Vinschen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57B2FF91.4070001@foss.arm.com \
--to=matthew.wahab@foss.arm.com \
--cc=newlib@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).