* [Buildroot] [PATCH 1/1] package/libdex: fix musl build with liburing
@ 2024-07-25 13:58 Fabrice Fontaine
2024-07-25 16:26 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2024-07-25 13:58 UTC (permalink / raw)
To: buildroot; +Cc: Adrian Perez de Castro, Fabrice Fontaine
Add -D_GNU_SOURCE to CFLAGS as liburing.h doesn't define it anymore
since bump of liburing to version 2.6 in commit
da45ae33040a55d9eaa6a05c75c5e7f24fe73cf4 and
https://github.com/axboe/liburing/commit/c427ed678f39fd144d784f2e970bd8c52f425e14
resulting in the following musl build failure since the addition of
libdex in commit 70319b47f646f74f407ed3355baf5b581a10518a:
In file included from ../src/dex-uring-aio-backend.c:29:
/home/autobuild/autobuild/instance-7/output-1/host/mips-buildroot-linux-musl/sysroot/usr/include/liburing.h:224:39: error: unknown type name 'cpu_set_t'
224 | const cpu_set_t *mask);
| ^~~~~~~~~
/home/autobuild/autobuild/instance-7/output-1/host/mips-buildroot-linux-musl/sysroot/usr/include/liburing.h:1212:48: error: unknown type name 'loff_t'; did you mean 'off_t'?
1212 | int fd, loff_t len)
| ^~~~~~
| off_t
Fixes: 70319b47f646f74f407ed3355baf5b581a10518a
- http://autobuild.buildroot.org/results/276646bf224d5927cf0311cf978571a7f8774116
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
package/libdex/libdex.mk | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/libdex/libdex.mk b/package/libdex/libdex.mk
index 360b389255..9aec1b6dae 100644
--- a/package/libdex/libdex.mk
+++ b/package/libdex/libdex.mk
@@ -30,6 +30,7 @@ endif
ifeq ($(BR2_PACKAGE_LIBURING),y)
LIBDEX_CONF_OPTS += -Dliburing=enabled
LIBDEX_DEPENDENCIES += liburing
+LIBDEX_CFLAGS += $(TARGET_CFLAGS) -D_GNU_SOURCE
else
LIBDEX_CONF_OPTS += -Dliburing=disabled
endif
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [Buildroot] [PATCH 1/1] package/libdex: fix musl build with liburing
2024-07-25 13:58 [Buildroot] [PATCH 1/1] package/libdex: fix musl build with liburing Fabrice Fontaine
@ 2024-07-25 16:26 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-07-25 16:26 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: Adrian Perez de Castro, buildroot
On Thu, 25 Jul 2024 15:58:59 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> +LIBDEX_CFLAGS += $(TARGET_CFLAGS) -D_GNU_SOURCE
You will probably hate me, but I think this is not the right solution.
Indeed, if we adopt this solution then *ALL* packages that use liburing
will have to manually define _GNU_SOURCE.
I am not entirely clear on
whether https://github.com/axboe/liburing/commit/c427ed678f39fd144d784f2e970bd8c52f425e14
is a good idea. It's not clear for me whether the public header of a
library like this is supposed to set the feature macros it requires for
itself, or whether that should be done by the users of the library. The
latter seems really odd to me, to be honest.
At the very least, what I would suggest here is that -D_GNU_SOURCE gets
added to the .pc file of liburing, and this contributed to upstream
liburing. Or maybe -D_XOPEN_SOURCE=500 -D_GNU_SOURCE.
Really, I have no idea what is the correct way of dealing with those
feature macros.
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] 2+ messages in thread
end of thread, other threads:[~2024-07-25 16:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-25 13:58 [Buildroot] [PATCH 1/1] package/libdex: fix musl build with liburing Fabrice Fontaine
2024-07-25 16:26 ` Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox