From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Shubham Chakraborty <chakrabortyshubham66@gmail.com>
Cc: buildroot@buildroot.org,
Ricardo Martincoski <ricardo.martincoski@datacom.com.br>
Subject: Re: [Buildroot] [PATCH] package/atop: fix implicit waddwstr declaration
Date: Tue, 1 Sep 2026 23:34:23 +0200 [thread overview]
Message-ID: <apdEDDiiXaZWfMe-@windsurf> (raw)
In-Reply-To: <20260815154120.22488-1-chakrabortyshubham66@gmail.com>
Hello,
On Sat, Aug 15, 2026 at 09:11:19PM +0530, Shubham Chakraborty wrote:
> atop uses wide-character ncurses functions such as `waddwstr` (e.g., in
> drawbar.c). For `<curses.h>` to expose the prototypes for these wide-character
> functions, the `_XOPEN_SOURCE_EXTENDED` macro must be defined before the
> header is included.
> Without these macros defined, the preprocessor skips the function prototypes.
>
> drawbar.c:2336:33: error: implicit declaration of function 'waddwstr'
>
> This commit fixes the build failure by adding `-D_XOPEN_SOURCE_EXTENDED`
> and `-DNCURSES_WIDECHAR` to `ATOP_CFLAGS`, ensuring the ncurses headers
> correctly expose the required wide-character prototypes.
>
> Fixes :
> - https://autobuild.buildroot.org/results/b91/b91ea0722202de0d1fdeeaeea167fd1b21b6d5d6
>
> Signed-off-by: Shubham Chakraborty <chakrabortyshubham66@gmail.com>
This is lacking the usual information of since when it is
happening. Was it working before? Yes/no? If it used to work and now
it breaks, why?
Based on https://autobuild.buildroot.net/?reason=atop-%25 it seems
like up to the bump to version 2.13.0 we had both a uclibc build
failure:
/home/thomas/autobuild/instance-1/output-1/host/i686-buildroot-linux-uclibc/sysroot/usr/include/features.h:167:22: error: operator '<' has no left operand
167 | # if _POSIX_C_SOURCE < 200809L
and a musl build failure:
drawbar.c:2336:33: error: implicit declaration of function 'waddwstr'; did you mean 'waddstr'? [-Wimplicit-function-declaration]
2336 | waddwstr(w->win, L"┃");
| ^~~~~~~~
| waddstr
but now with the version bump this issue only happens with musl. So
why does it only happen with musl? Your analysis points to a problem
that would seem to be independent of the C library, but it apparently
isn't.
So again, I don't doubt that your patch fixes the build issue, but the
explanation is not convincing enough that what you're proposing is the
right solution. Indeed your explanation says that those defines are
ALWAYS needed to access waddwstr, but the simple fact that the package
seems to build fine with glibc and uclibc proves that this affirmation
is incorrect.
Could you do more research on this?
Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2026-09-01 21:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-15 15:41 [Buildroot] [PATCH] package/atop: fix implicit waddwstr declaration Shubham Chakraborty
2026-09-01 21:34 ` Thomas Petazzoni via buildroot [this message]
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=apdEDDiiXaZWfMe-@windsurf \
--to=buildroot@buildroot.org \
--cc=chakrabortyshubham66@gmail.com \
--cc=ricardo.martincoski@datacom.com.br \
--cc=thomas.petazzoni@bootlin.com \
/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