Skip to contentSkip to conversation

package/msgpack-c: add new package

PATCH In review Thomas Devoogdt 2 participants 3 messages Jun 3, 2025 – Jun 6, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/msgpack-c: add new package

MessagePack ships both in a C++ and a C variant. Add the latter to Buildroot. This will be used by fluent-bit.

---
buildroot$ ./utils/test-pkg -p msgpack-c -a

                             arm-aarch64 [ 1/40]: OK
                   bootlin-aarch64-glibc [ 2/40]: OK
               bootlin-arcle-hs38-uclibc [ 3/40]: OK
                    bootlin-armv5-uclibc [ 4/40]: OK
                     bootlin-armv7-glibc [ 5/40]: OK
                   bootlin-armv7m-uclibc [ 6/40]: OK
                      bootlin-armv7-musl [ 7/40]: OK
                bootlin-m68k-5208-uclibc [ 8/40]: OK
               bootlin-m68k-68040-uclibc [ 9/40]: OK
             bootlin-microblazeel-uclibc [10/40]: OK
                bootlin-mipsel32r6-glibc [11/40]: OK
                   bootlin-mipsel-uclibc [12/40]: OK
                 bootlin-openrisc-uclibc [13/40]: OK
        bootlin-powerpc64le-power8-glibc [14/40]: OK
           bootlin-powerpc-e500mc-uclibc [15/40]: OK
                   bootlin-riscv32-glibc [16/40]: OK
                   bootlin-riscv64-glibc [17/40]: OK
                    bootlin-riscv64-musl [18/40]: OK
                 bootlin-s390x-z13-glibc [19/40]: OK
                      bootlin-sh4-uclibc [20/40]: OK
                   bootlin-sparc64-glibc [21/40]: OK
                    bootlin-sparc-uclibc [22/40]: OK
                    bootlin-x86-64-glibc [23/40]: OK
                     bootlin-x86-64-musl [24/40]: OK
                   bootlin-x86-64-uclibc [25/40]: OK
                   bootlin-x86-i686-musl [26/40]: OK
                   bootlin-xtensa-uclibc [27/40]: OK
                            br-arm-basic [28/40]: OK
                    br-arm-full-nothread [29/40]: OK
                      br-arm-full-static [30/40]: OK
                   br-i386-pentium4-full [31/40]: OK
                      br-mips64-n64-full [32/40]: OK
                 br-mips64r6-el-hf-glibc [33/40]: OK
               br-powerpc-603e-basic-cpp [34/40]: OK
               br-powerpc64-power7-glibc [35/40]: OK
                       linaro-aarch64-be [36/40]: OK
                          linaro-aarch64 [37/40]: OK
                              linaro-arm [38/40]: OK
                         sourcery-mips64 [39/40]: OK
                           sourcery-mips [40/40]: OK
40 builds, 0 skipped, 0 build failed, 0 legal-info failed, 0 show-info failed
---
 package/Config.in                |  1 +
 package/msgpack-c/Config.in      |  9 +++++++++
 package/msgpack-c/msgpack-c.hash |  4 ++++
 package/msgpack-c/msgpack-c.mk   | 18 ++++++++++++++++++
 4 files changed, 32 insertions(+)
 create mode 100644 package/msgpack-c/Config.in
 create mode 100644 package/msgpack-c/msgpack-c.hash
 create mode 100644 package/msgpack-c/msgpack-c.mk
package/Config.in +1 -0
index 579b5ffc87..031f24dce0 100644
@@ -2304,6 +2304,7 @@ endif
 	source "package/mpfr/Config.in"
 	source "package/mpir/Config.in"
 	source "package/msgpack/Config.in"
+	source "package/msgpack-c/Config.in"
 	source "package/musl-compat-headers/Config.in"
 	source "package/musl-fts/Config.in"
 	source "package/neon-2-sse/Config.in"
package/msgpack-c/Config.in new file +9 -0
new file mode 100644
index 0000000000..603fce7a48
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_MSGPACK_C
+	bool "msgpack-c"
+	help
+	  MessagePack is an efficient binary serialization format.
+
+	  It lets you exchange data among multiple languages like JSON
+	  but it's faster and smaller.
+
+	  http://msgpack.org/
package/msgpack-c/msgpack-c.hash new file +4 -0
new file mode 100644
index 0000000000..e4fe61f424
@@ -0,0 +1,4 @@
+# Locally computed:
+sha256  c23c4070dbe01f46044bf70c5349f29453d655935b6dc710714c008bca0825a7  msgpack-c-6.1.0.tar.gz
+sha256  664550b43996452a5a2c7471bb0ff77185a58c69ccafa60f983dc4c162e1ee22  COPYING
+sha256  c9bff75738922193e67fa726fa225535870d2aa1059f91452c411736284ad566  LICENSE_1_0.txt
package/msgpack-c/msgpack-c.mk new file +18 -0
new file mode 100644
index 0000000000..f12dcb085f
@@ -0,0 +1,18 @@
+################################################################################
+#
+# msgpack-c
+#
+################################################################################
+
+MSGPACK_C_VERSION = 6.1.0
+MSGPACK_C_SITE = $(call github,msgpack,msgpack-c,c-$(MSGPACK_C_VERSION))
+MSGPACK_C_LICENSE = BSL-1.0
+MSGPACK_C_LICENSE_FILES = COPYING LICENSE_1_0.txt
+MSGPACK_C_INSTALL_STAGING = YES
+MSGPACK_C_CONF_OPTS = -DMSGPACK_BUILD_EXAMPLES=OFF -DMSGPACK_BUILD_TESTS=OFF
+
+ifeq ($(BR2_STATIC_LIBS),y)
+MSGPACK_C_CONF_OPTS += -DMSGPACK_ENABLE_SHARED=OFF
+endif
+
+$(eval $(cmake-package))
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 2/2 package/fluent-bit: bump to 4.0.3

News:
- https://fluentbit.io/announcements/v4.0.3/

Other remarks:
- Dropped 0003-lib-miniz-only-require-a-C-compiler.patch as it is upstream. [1]

- Added msgpack-c as a system dependency since this has been added to buildroot.

- Added sqlite as system dependency as it can't really be disabled otherwise due to an upstream compile bug. [2]

- Sorted the config entries while at it.

[1] https://github.com/fluent/fluent-bit/pull/10315
[2] https://github.com/fluent/fluent-bit/issues/9757

---
buildroot$ ./utils/test-pkg -p fluent-bit -a

                             arm-aarch64 [ 1/40]: OK
                   bootlin-aarch64-glibc [ 2/40]: OK
               bootlin-arcle-hs38-uclibc [ 3/40]: OK
                    bootlin-armv5-uclibc [ 4/40]: OK
                     bootlin-armv7-glibc [ 5/40]: OK
                   bootlin-armv7m-uclibc [ 6/40]: SKIPPED
                      bootlin-armv7-musl [ 7/40]: OK
                bootlin-m68k-5208-uclibc [ 8/40]: SKIPPED
               bootlin-m68k-68040-uclibc [ 9/40]: OK
             bootlin-microblazeel-uclibc [10/40]: OK
                bootlin-mipsel32r6-glibc [11/40]: OK
                   bootlin-mipsel-uclibc [12/40]: OK
                 bootlin-openrisc-uclibc [13/40]: OK
        bootlin-powerpc64le-power8-glibc [14/40]: OK
           bootlin-powerpc-e500mc-uclibc [15/40]: OK
                   bootlin-riscv32-glibc [16/40]: OK
                   bootlin-riscv64-glibc [17/40]: OK
                    bootlin-riscv64-musl [18/40]: OK
                 bootlin-s390x-z13-glibc [19/40]: OK
                      bootlin-sh4-uclibc [20/40]: OK
                   bootlin-sparc64-glibc [21/40]: OK
                    bootlin-sparc-uclibc [22/40]: SKIPPED
                    bootlin-x86-64-glibc [23/40]: OK
                     bootlin-x86-64-musl [24/40]: OK
                   bootlin-x86-64-uclibc [25/40]: OK
                   bootlin-x86-i686-musl [26/40]: OK
                   bootlin-xtensa-uclibc [27/40]: OK
                            br-arm-basic [28/40]: OK
                    br-arm-full-nothread [29/40]: SKIPPED
                      br-arm-full-static [30/40]: SKIPPED
                   br-i386-pentium4-full [31/40]: OK
                      br-mips64-n64-full [32/40]: OK
                 br-mips64r6-el-hf-glibc [33/40]: OK
               br-powerpc-603e-basic-cpp [34/40]: FAILED
               br-powerpc64-power7-glibc [35/40]: OK
                       linaro-aarch64-be [36/40]: OK
                          linaro-aarch64 [37/40]: OK
                              linaro-arm [38/40]: OK
                         sourcery-mips64 [39/40]: OK
                           sourcery-mips [40/40]: OK

40 builds, 5 skipped, 1 build failed, 0 legal-info failed, 0 show-info failed

/home/thomas/br-test-pkg/br-powerpc-603e-basic-cpp/host/powerpc-buildroot-linux-uclibc/sysroot/usr/include/uchar.h:36:9: error: ‘__mbstate_t’ does not name a type; did you mean ‘mbstate_t’?

   36 | typedef __mbstate_t mbstate_t;
      |         ^~~~~~~~~~~
      |         mbstate_t

Fixed in https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=96af6db3a430a22d5e8a45f6e7284362866b3980.

---
 ...-lib-miniz-only-require-a-C-compiler.patch | 31 -------------------
 package/fluent-bit/Config.in                  |  6 ++--
 package/fluent-bit/fluent-bit.hash            |  2 +-
 package/fluent-bit/fluent-bit.mk              |  8 +++--
 4 files changed, 10 insertions(+), 37 deletions(-)
 delete mode 100644 package/fluent-bit/0003-lib-miniz-only-require-a-C-compiler.patch
package/fluent-bit/0003-lib-miniz-only-require-a-C-compiler.patch deleted +0 -31
deleted file mode 100644
index 29c2d9e220..0000000000
@@ -1,31 +0,0 @@
-From abb3b388aaf7ea72ea1fcad77ead52f15a0cf543 Mon Sep 17 00:00:00 2001
-From: Thomas Devoogdt <[email protected]>
-Date: Tue, 1 Apr 2025 22:56:00 +0200
-Subject: [PATCH] lib: miniz: only require a C compiler
-
-Commit https://github.com/richgel999/miniz/commit/05ab4dc05c9d1e1f951f5849b659e2c7e291a620
-"Add some catch2 tests" dropped that C flag, but should instead only have added a simple
-enable_language call for the tests only.
-
-Upstream: https://github.com/richgel999/miniz/commit/383e551cccf41fc2ce1177712d6a37a85d936642
-Signed-off-by: Thomas Devoogdt <[email protected]>
----
- lib/miniz/CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/miniz/CMakeLists.txt b/lib/miniz/CMakeLists.txt
-index 859133ad0..f3d80f80a 100644
---- a/lib/miniz/CMakeLists.txt
-+++ b/lib/miniz/CMakeLists.txt
-@@ -7,7 +7,7 @@ if(DEFINED PROJECT_NAME)
- endif()
- 
- if(CMAKE_MINOR_VERSION LESS 12)
--  project(miniz)
-+  project(miniz C)
-   # see issue https://gitlab.kitware.com/cmake/cmake/merge_requests/1799
- else()
-   project(miniz C)
--- 
-2.43.0
-
package/fluent-bit/Config.in +4 -2
index 71488afd73..aeae034b2a 100644
@@ -4,12 +4,14 @@ config BR2_PACKAGE_FLUENT_BIT
 	depends on BR2_TOOLCHAIN_HAS_SYNC_4
 	depends on !BR2_STATIC_LIBS # dlfcn.h
 	select BR2_PACKAGE_C_ARES
+	select BR2_PACKAGE_LIBOPENSSL_ENGINES # needed by bundled librdkafka
+	select BR2_PACKAGE_LIBYAML
+	select BR2_PACKAGE_MSGPACK_C
 	select BR2_PACKAGE_MUSL_FTS if !BR2_TOOLCHAIN_USES_GLIBC
 	select BR2_PACKAGE_NGHTTP2
 	select BR2_PACKAGE_OPENSSL
 	select BR2_PACKAGE_OPENSSL_FORCE_LIBOPENSSL
-	select BR2_PACKAGE_LIBOPENSSL_ENGINES # needed by bundled librdkafka
-	select BR2_PACKAGE_LIBYAML
+	select BR2_PACKAGE_SQLITE
 	select BR2_PACKAGE_ZSTD
 	help
 	  Fast and Lightweight Logs and Metrics processor.
package/fluent-bit/fluent-bit.hash +1 -1
index 37943c6a4f..ec820416ed 100644
@@ -1,3 +1,3 @@
 # Locally computed
-sha256  aa0577ba7251081c8d5398b2a905b5b0585bb657ca13b39a5e12931437516f08  fluent-bit-4.0.2.tar.gz
+sha256  c7d276238d25242467218941842d8cd4df6cfa52cc9379ae5755220cdefd1dc1  fluent-bit-4.0.3.tar.gz
 sha256  0d542e0c8804e39aa7f37eb00da5a762149dc682d7829451287e11b938e94594  LICENSE
package/fluent-bit/fluent-bit.mk +5 -3
index 23b899e1dd..3e7e04907e 100644
@@ -4,14 +4,14 @@
 #
 ################################################################################
 
-FLUENT_BIT_VERSION = 4.0.2
+FLUENT_BIT_VERSION = 4.0.3
 FLUENT_BIT_SITE = $(call github,fluent,fluent-bit,v$(FLUENT_BIT_VERSION))
 FLUENT_BIT_LICENSE = Apache-2.0
 FLUENT_BIT_LICENSE_FILES = LICENSE
 FLUENT_BIT_CPE_ID_VENDOR = treasuredata
 FLUENT_BIT_CPE_ID_PRODUCT = fluent_bit
-FLUENT_BIT_DEPENDENCIES = c-ares host-bison host-flex libyaml nghttp2 openssl \
-	zstd
+FLUENT_BIT_DEPENDENCIES = c-ares host-bison host-flex libyaml msgpack-c \
+	nghttp2 openssl sqlite zstd
 
 FLUENT_BIT_CMAKE_BACKEND = ninja
 
@@ -22,7 +22,9 @@ FLUENT_BIT_CONF_OPTS += \
 	-DFLB_EXAMPLES=No \
 	-DFLB_CHUNK_TRACE=No \
 	-DFLB_PREFER_SYSTEM_LIB_CARES=Yes \
+	-DFLB_PREFER_SYSTEM_LIB_MSGPACK=Yes \
 	-DFLB_PREFER_SYSTEM_LIB_NGHTTP2=Yes \
+	-DFLB_PREFER_SYSTEM_LIB_SQLITE=Yes \
 	-DFLB_PREFER_SYSTEM_LIB_ZSTD=Yes
 
 ifeq ($(BR2_PACKAGE_FLUENT_BIT_WASM),y)
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
In reply to Thomas Devoogdt
Quoted 4 lines · Thomas Devoogdt

MessagePack ships both in a C++ and a C variant. Add the latter to Buildroot. This will be used by fluent-bit.

Series applied to next, thanks.
For info, I added a note to clarify the C/C++ variants in Config.in. See:
https://gitlab.com/buildroot.org/buildroot/-/commit/110cd929322727d31351d2f4b8e5bbe81b000bf3

Best regards,

Julien.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot