* [Buildroot] [PATCH 1/1] package/apr: fix musl build
@ 2024-07-22 10:48 Fabrice Fontaine
2024-07-22 12:02 ` Thomas Petazzoni via buildroot
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Fabrice Fontaine @ 2024-07-22 10:48 UTC (permalink / raw)
To: buildroot; +Cc: Bernd Kuhls, Fabrice Fontaine
strerror_r on musl always returns an int since its addition back in 2011
with
https://git.musl-libc.org/cgit/musl/commit/src/string/strerror_r.c?id=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01
As a result, setting ac_cv_strerror_r_rc_int to no results in the
following build failure since bump to version 1.7.2 in commit
783cd8d90d37b5e0b59d6f0bfca6667855b2b9e1:
misc/unix/errorcodes.c: In function 'native_strerror':
misc/unix/errorcodes.c:385:9: error: assignment to 'const char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
385 | msg = strerror_r(statcode, buf, bufsize);
| ^
Fixes: 783cd8d90d37b5e0b59d6f0bfca6667855b2b9e1
- http://autobuild.buildroot.org/results/9a42a4427ff64d47da61c731abb99d7585781cdd
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
package/apr/apr.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/apr/apr.mk b/package/apr/apr.mk
index cb8c12dd65..d4526a4172 100644
--- a/package/apr/apr.mk
+++ b/package/apr/apr.mk
@@ -39,7 +39,7 @@ APR_CONF_ENV = \
ac_cv_sizeof_struct_iovec=8 \
ac_cv_sizeof_pid_t=4 \
ac_cv_struct_rlimit=yes \
- ac_cv_strerror_r_rc_int=no \
+ ac_cv_strerror_r_rc_int=$(if $(BR2_TOOLCHAIN_USES_MUSL),yes,no) \
ac_cv_o_nonblock_inherited=no \
apr_cv_mutex_recursive=yes \
apr_cv_epoll=yes \
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [Buildroot] [PATCH 1/1] package/apr: fix musl build
2024-07-22 10:48 [Buildroot] [PATCH 1/1] package/apr: fix musl build Fabrice Fontaine
@ 2024-07-22 12:02 ` Thomas Petazzoni via buildroot
2024-07-22 12:05 ` Thomas Petazzoni via buildroot
2024-08-30 13:59 ` Peter Korsgaard
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-07-22 12:02 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: Bernd Kuhls, buildroot
On Mon, 22 Jul 2024 12:48:59 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> strerror_r on musl always returns an int since its addition back in 2011
> with
> https://git.musl-libc.org/cgit/musl/commit/src/string/strerror_r.c?id=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01
>
> As a result, setting ac_cv_strerror_r_rc_int to no results in the
> following build failure since bump to version 1.7.2 in commit
> 783cd8d90d37b5e0b59d6f0bfca6667855b2b9e1:
>
> misc/unix/errorcodes.c: In function 'native_strerror':
> misc/unix/errorcodes.c:385:9: error: assignment to 'const char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
> 385 | msg = strerror_r(statcode, buf, bufsize);
> | ^
>
> Fixes: 783cd8d90d37b5e0b59d6f0bfca6667855b2b9e1
> - http://autobuild.buildroot.org/results/9a42a4427ff64d47da61c731abb99d7585781cdd
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> package/apr/apr.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to master, thanks.
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/apr: fix musl build
2024-07-22 10:48 [Buildroot] [PATCH 1/1] package/apr: fix musl build Fabrice Fontaine
2024-07-22 12:02 ` Thomas Petazzoni via buildroot
@ 2024-07-22 12:05 ` Thomas Petazzoni via buildroot
2024-08-30 13:59 ` Peter Korsgaard
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-07-22 12:05 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: Bernd Kuhls, buildroot
On Mon, 22 Jul 2024 12:48:59 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> strerror_r on musl always returns an int since its addition back in 2011
> with
> https://git.musl-libc.org/cgit/musl/commit/src/string/strerror_r.c?id=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01
>
> As a result, setting ac_cv_strerror_r_rc_int to no results in the
> following build failure since bump to version 1.7.2 in commit
> 783cd8d90d37b5e0b59d6f0bfca6667855b2b9e1:
>
> misc/unix/errorcodes.c: In function 'native_strerror':
> misc/unix/errorcodes.c:385:9: error: assignment to 'const char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
> 385 | msg = strerror_r(statcode, buf, bufsize);
> | ^
>
> Fixes: 783cd8d90d37b5e0b59d6f0bfca6667855b2b9e1
> - http://autobuild.buildroot.org/results/9a42a4427ff64d47da61c731abb99d7585781cdd
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Actually, wouldn't it make sense to modify the APR_CHECK_STRERROR_R_RC
test so that it doesn't need AC_TRY_RUN() ? I guess by building a
program that expects strerror_r() to return an int and see if it
compiles without errors (with -Werror), it should allow finding out if
strerror_r() returns an int or a char* without AC_TRY_RUN. This would
allow the test to work for cross-compilation, without having to
explicitly feed a ac_cv_strerror_r_rc_int value.
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/apr: fix musl build
2024-07-22 10:48 [Buildroot] [PATCH 1/1] package/apr: fix musl build Fabrice Fontaine
2024-07-22 12:02 ` Thomas Petazzoni via buildroot
2024-07-22 12:05 ` Thomas Petazzoni via buildroot
@ 2024-08-30 13:59 ` Peter Korsgaard
2 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2024-08-30 13:59 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: Bernd Kuhls, buildroot
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:
> strerror_r on musl always returns an int since its addition back in 2011
> with
> https://git.musl-libc.org/cgit/musl/commit/src/string/strerror_r.c?id=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01
> As a result, setting ac_cv_strerror_r_rc_int to no results in the
> following build failure since bump to version 1.7.2 in commit
> 783cd8d90d37b5e0b59d6f0bfca6667855b2b9e1:
> misc/unix/errorcodes.c: In function 'native_strerror':
> misc/unix/errorcodes.c:385:9: error: assignment to 'const char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
> 385 | msg = strerror_r(statcode, buf, bufsize);
> | ^
> Fixes: 783cd8d90d37b5e0b59d6f0bfca6667855b2b9e1
> - http://autobuild.buildroot.org/results/9a42a4427ff64d47da61c731abb99d7585781cdd
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Committed to 2024.02.x and 2024.05.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-08-30 13:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-22 10:48 [Buildroot] [PATCH 1/1] package/apr: fix musl build Fabrice Fontaine
2024-07-22 12:02 ` Thomas Petazzoni via buildroot
2024-07-22 12:05 ` Thomas Petazzoni via buildroot
2024-08-30 13:59 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox