On 2024-10-17 at 13:54:28, Patrick Steinhardt wrote: > On Thu, Oct 17, 2024 at 03:33:51PM +0200, Patrick Steinhardt wrote: > > On Thu, Oct 17, 2024 at 10:51:05AM +0700, Bagas Sanjaya wrote: > > > Hi, > > > > > > Since clar unit testing framework was imported by commit 9b7caa2809cb (t: > > > import the clar unit testing framework, 2024-09-04), Git FTBFS on uclibc > > > systems built by Buildroot: > > > > Wait a second, that doesn't sound right to me. `wchar_t` is part of ISO > > C90, so any system not supporting it would basically be unsupported by > > us from my point of view. And indeed, uclibc _does_ support that type > > alright. I guess the issue is rather that we're relying on some kind of > > platform-specific behaviour and thus don't include the correct header. > > > > I'll have a look, thanks for the report! > > Okay, uclibc indeed has _optional_ support for `wchar_t`. But what > really throws me off: "include/wchar.h" from uclibc has the following > snippet right at the top: > > #ifndef __UCLIBC_HAS_WCHAR__ > #error Attempted to include wchar.h when uClibc built without wide char support. > #endif > > We unconditionally include <wchar.h>, and your system does not seem to > have support for it built in. So why doesn't the `#error` trigger? It's > also not like this is a recent error, it has been added with 581deed72 > (The obligatory forgotten files..., 2002-05-06). > > We can do something like the below patch in clar, but I'd first like to > understand why your platform seems to be broken in such a way. Yeah, this is definitely broken. We require ISO C99, and according to the draft preceding the ratification[0], `wchar.h` and its contents are not optional. The similar draft for C11 also doesn't appear to make these optional. I think users of uclibc will need to compile it with full ISO C99 support. I expect that a wide variety of other software will be similarly broken without that. [0] Chosen because it is available for at no charge and the standard is not. -- brian m. carlson (they/them or he/him) Toronto, Ontario, CA
Attachment:
signature.asc
Description: PGP signature