All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH 1/2] ploate: Fix sys/stat.h and linux/stat.h conflicts with musl
@ 2024-03-24  1:47 Khem Raj
  2024-03-24  1:48 ` [meta-oe][PATCH 2/2] liburing: Upgrade to 2.5 Khem Raj
  0 siblings, 1 reply; 2+ messages in thread
From: Khem Raj @ 2024-03-24  1:47 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...at.h-only-when-sys-stat.h-is-not-inc.patch | 39 +++++++++++++++++++
 .../plocate/plocate_1.1.22.bb                 |  3 +-
 2 files changed, 41 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-extended/plocate/plocate/0001-Include-linux-stat.h-only-when-sys-stat.h-is-not-inc.patch

diff --git a/meta-oe/recipes-extended/plocate/plocate/0001-Include-linux-stat.h-only-when-sys-stat.h-is-not-inc.patch b/meta-oe/recipes-extended/plocate/plocate/0001-Include-linux-stat.h-only-when-sys-stat.h-is-not-inc.patch
new file mode 100644
index 0000000000..7ba266f44a
--- /dev/null
+++ b/meta-oe/recipes-extended/plocate/plocate/0001-Include-linux-stat.h-only-when-sys-stat.h-is-not-inc.patch
@@ -0,0 +1,39 @@
+From 1d2197c195e19f1414afef75186bdd4c27b3ee5a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 23 Mar 2024 18:16:19 -0700
+Subject: [PATCH] Include linux/stat.h only when sys/stat.h is not included
+
+This ends up providing certain functions from both headers e.g.
+statx and statx_timestamp since liburing.h forcefully defines _GNU_SOURCE
+to help musl compile liburing, however, this define then causes these
+two files to conflict in plocate, it seems this file is redundant here
+when sys/stat.h is included anyway, mark it for conditional include
+
+Fixes
+| In file included from ../plocate-1.1.22/plocate.cpp:5:
+| In file included from ../plocate-1.1.22/io_uring_engine.h:14:
+| In file included from /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/plocate/1.1.22/recipe-sysroot/usr/include/liburing.h:14:
+| /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/plocate/1.1.22/recipe-sysroot/usr/include/sys/stat.h:124:8: error: redefinition of 'statx_timestamp'
+|   124 | struct statx_timestamp {
+|       |        ^
+| /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/plocate/1.1.22/recipe-sysroot/usr/include/linux/stat.h:56:8: note: previous definition is here                                             |    56 | struct statx_timestamp {                                                                                                                                                                    |       |        ^                                                                                                                                                                                    | In file included from ../plocate-1.1.22/plocate.cpp:5:                                                                                                                                              | In file included from ../plocate-1.1.22/io_uring_engine.h:14:                                                                                                                                       | In file included from /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/plocate/1.1.22/recipe-sysroot/usr/include/liburing.h:14:                                                             | /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/plocate/1.1.22/recipe-sysroot/usr/include/sys/stat.h:129:8: error: redefinition of 'statx'                                                 |   129 | struct statx {                                                                                                                                                                              |       |        ^                                                                                                                                                                                    | /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/plocate/1.1.22/recipe-sysroot/usr/include/linux/stat.h:99:8: note: previous definition is here
+|    99 | struct statx {
+|       |        ^
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ io_uring_engine.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/io_uring_engine.h
++++ b/io_uring_engine.h
+@@ -7,7 +7,6 @@
+ #include <string_view>
+ #include <sys/socket.h>
+ #include <sys/types.h>
+-#include <linux/stat.h>
+ 
+ struct io_uring_sqe;
+ #ifndef WITHOUT_URING
diff --git a/meta-oe/recipes-extended/plocate/plocate_1.1.22.bb b/meta-oe/recipes-extended/plocate/plocate_1.1.22.bb
index 07de357266..694c29776a 100644
--- a/meta-oe/recipes-extended/plocate/plocate_1.1.22.bb
+++ b/meta-oe/recipes-extended/plocate/plocate_1.1.22.bb
@@ -9,6 +9,7 @@ inherit meson pkgconfig
 
 DEPENDS = "zstd liburing"
 
-SRC_URI = "https://plocate.sesse.net/download/${BP}.tar.gz"
+SRC_URI = "https://plocate.sesse.net/download/${BP}.tar.gz \
+           file://0001-Include-linux-stat.h-only-when-sys-stat.h-is-not-inc.patch"
 
 SRC_URI[sha256sum] = "3b7e4741b4aa2ec044e53eff06474a32a3fb1e928b9382351fe79d4c27fb0049"
-- 
2.44.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [meta-oe][PATCH 2/2] liburing: Upgrade to 2.5
  2024-03-24  1:47 [meta-oe][PATCH 1/2] ploate: Fix sys/stat.h and linux/stat.h conflicts with musl Khem Raj
@ 2024-03-24  1:48 ` Khem Raj
  0 siblings, 0 replies; 2+ messages in thread
From: Khem Raj @ 2024-03-24  1:48 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Changelogs are here [1]

[1] https://github.com/axboe/liburing/commit/f4e42a515cd78c8c9cac2be14222834be5f8df2b

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...ure-on-.-configure-make-shuffle-2836.patch | 34 -------------------
 .../liburing/0001-do-not-build-examples.patch | 30 ----------------
 .../{liburing_2.4.bb => liburing_2.5.bb}      |  7 ++--
 3 files changed, 2 insertions(+), 69 deletions(-)
 delete mode 100644 meta-oe/recipes-support/liburing/liburing/0001-Fixes-build-failure-on-.-configure-make-shuffle-2836.patch
 delete mode 100644 meta-oe/recipes-support/liburing/liburing/0001-do-not-build-examples.patch
 rename meta-oe/recipes-support/liburing/{liburing_2.4.bb => liburing_2.5.bb} (78%)

diff --git a/meta-oe/recipes-support/liburing/liburing/0001-Fixes-build-failure-on-.-configure-make-shuffle-2836.patch b/meta-oe/recipes-support/liburing/liburing/0001-Fixes-build-failure-on-.-configure-make-shuffle-2836.patch
deleted file mode 100644
index 0cf8548e4c..0000000000
--- a/meta-oe/recipes-support/liburing/liburing/0001-Fixes-build-failure-on-.-configure-make-shuffle-2836.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From c34dca74854cb6e7f2b09affa2a4ab0145e62371 Mon Sep 17 00:00:00 2001
-From: Kartik Mahajan <stonebrakert6@gmail.com>
-Date: Fri, 30 Jun 2023 11:34:07 +0530
-Subject: [PATCH] Fixes build failure on ./configure && make
- --shuffle=2836571325
-
-./configure && make --shuffle=2836571325 fails.
-The build fails on parallel builds for me and above command reproduces it.
-Note that --shuffle options is available on make version >= 4.4
-Target ffi_libname in src/Makefile should have a additional dependency
-upon $(liburing_sobjs)
-
-Upstream-Status: Backport [https://github.com/axboe/liburing/commit/c34dca74854cb6e7f2b09affa2a4ab0145e62371]
-Signed-off-by: Kartik Mahajan <stonebrakert6@gmail.com>
----
- src/Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/Makefile b/src/Makefile
-index c4c28cb..7832095 100644
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -81,7 +81,7 @@ liburing-ffi.a: $(liburing_objs) $(liburing_ffi_objs)
- $(libname): $(liburing_sobjs) liburing.map
- 	$(QUIET_CC)$(CC) $(SO_CFLAGS) -shared -Wl,--version-script=liburing.map -Wl,-soname=$(soname) -o $@ $(liburing_sobjs) $(LINK_FLAGS)
- 
--$(ffi_libname): $(liburing_ffi_objs) $(liburing_ffi_sobjs) liburing-ffi.map
-+$(ffi_libname): $(liburing_ffi_objs) $(liburing_ffi_sobjs) $(liburing_sobjs) liburing-ffi.map
- 	$(QUIET_CC)$(CC) $(SO_CFLAGS) -shared -Wl,--version-script=liburing-ffi.map -Wl,-soname=$(ffi_soname) -o $@ $(liburing_sobjs) $(liburing_ffi_sobjs) $(LINK_FLAGS)
- 
- install: $(all_targets)
--- 
-2.41.0
-
diff --git a/meta-oe/recipes-support/liburing/liburing/0001-do-not-build-examples.patch b/meta-oe/recipes-support/liburing/liburing/0001-do-not-build-examples.patch
deleted file mode 100644
index 03ab075314..0000000000
--- a/meta-oe/recipes-support/liburing/liburing/0001-do-not-build-examples.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 653c39b0b30b2a329db5041e558cfc97c03d6bfb Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 17 Feb 2021 19:18:16 -0800
-Subject: [PATCH] do not build examples
-
-examples need ucontext and some architectures on musl do not have it
-implemented e.g. riscv
-
-Upstream-Status: Inappropriate [Arch-Specific]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index 5d9c4dc..53e1615 100644
---- a/Makefile
-+++ b/Makefile
-@@ -11,7 +11,6 @@ default: all
- all:
- 	@$(MAKE) -C src
- 	@$(MAKE) -C test
--	@$(MAKE) -C examples
- 
- .PHONY: all install default clean test
- .PHONY: FORCE cscope
--- 
-2.31.1
-
diff --git a/meta-oe/recipes-support/liburing/liburing_2.4.bb b/meta-oe/recipes-support/liburing/liburing_2.5.bb
similarity index 78%
rename from meta-oe/recipes-support/liburing/liburing_2.4.bb
rename to meta-oe/recipes-support/liburing/liburing_2.5.bb
index e5dba70df0..440259ffbd 100644
--- a/meta-oe/recipes-support/liburing/liburing_2.4.bb
+++ b/meta-oe/recipes-support/liburing/liburing_2.5.bb
@@ -9,11 +9,8 @@ SECTION = "libs"
 LICENSE = "LGPL-2.1-only | MIT"
 LIC_FILES_CHKSUM = "file://README;beginline=41;endline=44;md5=2b0e9926530c269f5ae95560370195af"
 
-SRC_URI = "git://github.com/axboe/liburing.git;branch=master;protocol=https \
-           file://0001-Fixes-build-failure-on-.-configure-make-shuffle-2836.patch"
-SRC_URI:append:libc-musl:riscv64 = " file://0001-do-not-build-examples.patch "
-SRC_URI:append:libc-musl:riscv32 = " file://0001-do-not-build-examples.patch "
-SRCREV = "298c083d75ecde5a8833366167b3b6abff0c8d39"
+SRC_URI = "git://github.com/axboe/liburing.git;branch=master;protocol=https"
+SRCREV = "f4e42a515cd78c8c9cac2be14222834be5f8df2b"
 
 S = "${WORKDIR}/git"
 
-- 
2.44.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-24  1:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-24  1:47 [meta-oe][PATCH 1/2] ploate: Fix sys/stat.h and linux/stat.h conflicts with musl Khem Raj
2024-03-24  1:48 ` [meta-oe][PATCH 2/2] liburing: Upgrade to 2.5 Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.