git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: clar unit testing framework FTBFS on uclibc systems (wchar_t unsupported)

From
Patrick Steinhardt <ps@pks.im>
Date
Oct 21, 2024, 06:44 UTC
Message-ID
<ZxX4YtZ5lW0axToT@pks.im>
In-Reply-To
<ZxJnfYtuxnAEBc1E@archie.me>
On Fri, Oct 18, 2024 at 08:49:49PM +0700, Bagas Sanjaya wrote:
> On Thu, Oct 17, 2024 at 03:54:28PM +0200, Patrick Steinhardt wrote:
[snip]
> On Buildroot site, Edgar Bonet (Cc:'ed) suggests to improve your patch by
> wrapping strcmps [1]:
Thanks. So with the proposed patch things work?

One thing I still don't understand: why don't you get an error from includeng <wchar.h>? As shown above, it should contain the following snippet:

> >     #ifndef __UCLIBC_HAS_WCHAR__
> >     #error Attempted to include wchar.h when uClibc built without wide char support.
> >     #endif

So I'd expect that to trigger and cause the build to abort. Am I missing anything here? Let me have another look at uclibc...

Oh, yes! There's also a "wchar-stub.h" file that replaces "wchar.h" when compiled without UCLIBC_HAS_WCHAR=Yes. And that file indeed does not cause us to error out, but is a stub. It also explains why the logs do not complain about the missing `wchar_t` type, as that type does get defined by the stub header. Weird, but so be it.

I've picked this up upstream via [1].
[1]: https://github.com/clar-test/clar/pull/108
Patrick
Previous: Bagas Sanjaya
Message 18 of 18 in “clar unit testing framework FTBFS on uclibc systems (wchar_t unsupported)”
  1. Bagas SanjayaOct 17, 2024
  2. Patrick SteinhardtOct 17, 2024
  3. Patrick SteinhardtOct 17, 2024
  4. Taylor BlauOct 17, 2024
  5. brian m. carlsonOct 17, 2024
  6. Jeff KingOct 18, 2024
  7. Patrick SteinhardtOct 18, 2024
  8. Jeff KingOct 18, 2024
  9. Patrick SteinhardtOct 18, 2024
  10. Taylor BlauOct 18, 2024
  11. Patrick SteinhardtOct 21, 2024
  12. Jeff KingOct 21, 2024
  13. Taylor BlauOct 21, 2024
  14. brian m. carlsonOct 18, 2024
  15. Jeff KingOct 21, 2024
  16. Jeff KingOct 21, 2024
  17. Bagas SanjayaOct 18, 2024
  18. Patrick SteinhardtOct 21, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.