From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Cc: buildroot@buildroot.org,
Pierre-Jean Texier <texier.pj2@gmail.com>,
linux-amarula@amarulasolutions.com
Subject: Re: [Buildroot] [PATCH v3 1/1] package/libxml2: fix compilation with uclibc
Date: Mon, 30 Dec 2024 23:26:16 +0100 [thread overview]
Message-ID: <20241230232616.0fb03092@windsurf> (raw)
In-Reply-To: <20241227174246.3905068-1-dario.binacchi@amarulasolutions.com>
Hello Dario,
On Fri, 27 Dec 2024 18:42:46 +0100
Dario Binacchi <dario.binacchi@amarulasolutions.com> wrote:
> The patch fixes the following errors and warnings raised by the
> compilation of the library with uClibc:
>
> encoding.c: In function ‘xmlEncInputChunk’:
> encoding.c:2209:32: warning: comparison between pointer and integer
> 2209 | else if (handler->iconv_in != NULL) {
> | ^~
> encoding.c: In function ‘xmlEncOutputChunk’:
> encoding.c:2269:33: warning: comparison between pointer and integer
> 2269 | else if (handler->iconv_out != NULL) {
> | ^~
> encoding.c: In function ‘xmlCharEncCloseFunc’:
> encoding.c:2681:29: warning: comparison between pointer and integer
> 2681 | if ((handler->iconv_out != NULL) || (handler->iconv_in != NULL)) {
> | ^~
> encoding.c:2681:60: warning: comparison between pointer and integer
> 2681 | if ((handler->iconv_out != NULL) || (handler->iconv_in != NULL)) {
> | ^~
> encoding.c:2683:32: warning: comparison between pointer and integer
> 2683 | if (handler->iconv_out != NULL) {
> | ^~
> encoding.c:2686:32: error: assignment to ‘iconv_t’ {aka ‘long int’} from ‘void *’ makes integer from pointer without a cast [-Wint-conversion]
> 2686 | handler->iconv_out = NULL;
> | ^
> encoding.c:2688:31: warning: comparison between pointer and integer
> 2688 | if (handler->iconv_in != NULL) {
> | ^~
> encoding.c:2691:31: error: assignment to ‘iconv_t’ {aka ‘long int’} from ‘void *’ makes integer from pointer without a cast [-Wint-conversion]
> 2691 | handler->iconv_in = NULL;
> | ^
> make[4]: *** [Makefile:1147: libxml2_la-encoding.lo] Error 1
>
> The regression was partially introduced in version 2.1.0:
> 496a1cf59284 ("496a1cf59284 revamped the encoding support, added iconv support, so now libxml if")
> and partially in version 2.2.3:
> 87b953957305 ("Large sync between my W3C base and Gnome's one:")
>
> So the regression was already present in the first version of libxml2
> (2.6.29) in Buildroot.
>
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> ---
Thanks for the patch and investigation. However the explanation was not
really complete: it is clearly impossible that this build failure
existed with uClibc since libxml2 was introduced in Buildroot. Indeed,
uClibc used to be the only C library in Buildroot, it has been the
default for many years, etc.
So in fact, the issue started occurring only since GCC 14.x was
introduced. It used to be a warning, and GCC 14.x turned it into a hard
build error. Also, it appears only with uClibc because uClibc defines
iconv_t as "long", while both glibc and musl define it as "void *".
I have updated the commit log with those details, I've added a
reference to the autobuilder failure being fixed in the commit log, and
updated the Upstream: link in the patch to point to the upstream commit.
Thanks for this great investigation work!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2024-12-30 22:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-27 17:42 [Buildroot] [PATCH v3 1/1] package/libxml2: fix compilation with uclibc Dario Binacchi
2024-12-30 22:26 ` Thomas Petazzoni [this message]
2025-01-16 13:54 ` James Hilliard
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=20241230232616.0fb03092@windsurf \
--to=thomas.petazzoni@bootlin.com \
--cc=buildroot@buildroot.org \
--cc=dario.binacchi@amarulasolutions.com \
--cc=linux-amarula@amarulasolutions.com \
--cc=texier.pj2@gmail.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