package/fluent-bit: bump to version 2.1.4
PATCH v2 1/4 package/fluent-bit: bump to version 2.1.4
Fluent Bit v2.1 is the start of the new stable series of the project.
Release Notes:
https://fluentbit.io/announcements/v2.1.0/
https://fluentbit.io/announcements/v2.1.1/
https://fluentbit.io/announcements/v2.1.2/
https://fluentbit.io/announcements/v2.1.3/
https://fluentbit.io/announcements/v2.1.4/
Fluent Bit v2.1.4 contains this list of upstreamed patches:
https://github.com/fluent/fluent-bit/pull/7266
https://github.com/fluent/fluent-bit/pull/7254
https://github.com/fluent/fluent-bit/pull/7253
So the old patches can be dropped.
---
v2: bump from 2.1.3 to 2.1.4
--- .checkpackageignore | 3 - .../0001-lib-cfl-fixup-static_assert.patch | 33 ----- .../0002-lib-c-ares-fixup-static_assert.patch | 56 -------- .../fluent-bit/0003-fix-build-without-C.patch | 131 ------------------ package/fluent-bit/fluent-bit.hash | 2 +- package/fluent-bit/fluent-bit.mk | 2 +- 6 files changed, 2 insertions(+), 225 deletions(-) delete mode 100644 package/fluent-bit/0001-lib-cfl-fixup-static_assert.patch delete mode 100644 package/fluent-bit/0002-lib-c-ares-fixup-static_assert.patch delete mode 100644 package/fluent-bit/0003-fix-build-without-C.patch
.checkpackageignore +0 -3
@@ -480,9 +480,6 @@ package/flex/0002-build-make-it-possible-to-disable-the-build-of-the-f.patch Ups package/flex/0003-build-make-it-possible-to-disable-the-build-of-the-d.patch Upstream package/flite/0001-fix-alsa-static.patch Upstream package/fltk/0001-disable-tests.patch Upstream -package/fluent-bit/0001-lib-cfl-fixup-static_assert.patch Upstream -package/fluent-bit/0002-lib-c-ares-fixup-static_assert.patch Upstream -package/fluent-bit/0003-fix-build-without-C.patch Upstream package/fluxbox/0001-fixes-bug-1138.patch Upstream package/freeipmi/0001-add-disable-doc.patch Upstream package/freeradius-client/0001-fix-for-nettle.patch Upstream
package/fluent-bit/0001-lib-cfl-fixup-static_assert.patch deleted +0 -33
@@ -1,33 +0,0 @@ -From e4f825dd9e952f4a056bf89342049e67102ae6bb Mon Sep 17 00:00:00 2001 -From: Thomas Devoogdt <[email protected]> -Date: Wed, 1 Feb 2023 11:38:15 +0100 -Subject: [PATCH] lib: cfl: fixup static_assert - -"undefined reference to 'static_assert'" - -Not defined when using uClibc or if not C++ >= 11. - -upstream: https://github.com/Cyan4973/xxHash/commit/6189ecd3d44a693460f86280ccf49d33cb4b18e1 - -Signed-off-by: Thomas Devoogdt <[email protected]> ---- - lib/cfl/lib/xxhash/xxhash.h | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/lib/cfl/lib/xxhash/xxhash.h b/lib/cfl/lib/xxhash/xxhash.h -index 08ab79457..511c4d12b 100644 ---- a/lib/cfl/lib/xxhash/xxhash.h -+++ b/lib/cfl/lib/xxhash/xxhash.h -@@ -1546,8 +1546,7 @@ static void* XXH_memcpy(void* dest, const void* src, size_t size) - /* note: use after variable declarations */ - #ifndef XXH_STATIC_ASSERT - # if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* C11 */ --# include <assert.h> --# define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { static_assert((c),m); } while(0) -+# define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { _Static_assert((c),m); } while(0) - # elif defined(__cplusplus) && (__cplusplus >= 201103L) /* C++11 */ - # define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { static_assert((c),m); } while(0) - # else --- -2.34.1 -
package/fluent-bit/0002-lib-c-ares-fixup-static_assert.patch deleted +0 -56
56 lines not on this page · raw message
package/fluent-bit/0003-fix-build-without-C.patch deleted +0 -131
131 lines not on this page · raw message
package/fluent-bit/fluent-bit.hash +1 -1
@@ -1,3 +1,3 @@ # Locally computed -sha256 aad5176cb4dcadacacd379ca43160074c6690012d37c4749536ac3b977d50495 fluent-bit-2.0.10.tar.gz +sha256 27c50c04cc39f4327a168c7eb00b7ab9d587d1b414f046668bb6ba93020ac7a5 fluent-bit-2.1.4.tar.gz sha256 0d542e0c8804e39aa7f37eb00da5a762149dc682d7829451287e11b938e94594 LICENSE
package/fluent-bit/fluent-bit.mk +1 -1
@@ -4,7 +4,7 @@ # ################################################################################ -FLUENT_BIT_VERSION = 2.0.10 +FLUENT_BIT_VERSION = 2.1.4 FLUENT_BIT_SITE = $(call github,fluent,fluent-bit,v$(FLUENT_BIT_VERSION)) FLUENT_BIT_LICENSE = Apache-2.0 FLUENT_BIT_LICENSE_FILES = LICENSE
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 2/4 package/fluent-bit: use the system provided LuaJIT
Luajit was not used at all when it was selected, instead fluent-bit recompiled it without taking care of the complexities that were handled in the luajit package. Fix this by linking dynamically to the buildroot provided version.
---
v2: No change.
--- ...-the-system-provided-LuaJIT-if-found.patch | 62 +++++++++++++++++++ package/fluent-bit/fluent-bit.mk | 1 + 2 files changed, 63 insertions(+) create mode 100644 package/fluent-bit/0001-build-use-the-system-provided-LuaJIT-if-found.patch
package/fluent-bit/0001-build-use-the-system-provided-LuaJIT-if-found.patch new file +62 -0
@@ -0,0 +1,62 @@ +From 4f8eb7bb5a39d83374806928b7a5b622136ef055 Mon Sep 17 00:00:00 2001 +From: Thomas Devoogdt <[email protected]> +Date: Fri, 28 Apr 2023 10:25:16 +0200 +Subject: [PATCH] build: use the system provided LuaJIT if found + +e.g. buildroot has logic to build luajit, +so if pkg_check_modules can find a suitable version, +then use that one if -DFLB_PREFER_SYSTEM_LIBS=Yes. + +Upstream: https://github.com/fluent/fluent-bit/pull/7286 +Signed-off-by: Thomas Devoogdt <[email protected]> +--- + CMakeLists.txt | 12 +++++++++++- + src/CMakeLists.txt | 2 +- + 2 files changed, 12 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9af783c79..0601b7c18 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -123,6 +123,7 @@ option(FLB_TESTS_INTERNAL_FUZZ "Enable internal fuzz tests" No) + option(FLB_TESTS_OSSFUZZ "Enable OSS-Fuzz build" No) + option(FLB_MTRACE "Enable mtrace support" No) + option(FLB_POSIX_TLS "Force POSIX thread storage" No) ++option(FLB_PREFER_SYSTEM_LIBS "Prefer system installed libraries" No) + option(FLB_INOTIFY "Enable inotify support" Yes) + option(FLB_SQLDB "Enable SQL embedded DB" Yes) + option(FLB_HTTP_SERVER "Enable HTTP Server" Yes) +@@ -1003,7 +1004,16 @@ endif() + # LuaJIT (Scripting Support) + # ========================== + if(FLB_LUAJIT) +- include(cmake/luajit.cmake) ++ if(FLB_PREFER_SYSTEM_LIBS) ++ find_package(PkgConfig) ++ pkg_check_modules(LUAJIT luajit>=2.1.0) ++ endif() ++ if(LUAJIT_FOUND) ++ include_directories(${LUAJIT_INCLUDE_DIRS}) ++ else() ++ include(cmake/luajit.cmake) ++ set(LUAJIT_LIBRARIES "libluajit") ++ endif() + FLB_DEFINITION(FLB_HAVE_LUAJIT) + endif() + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 06a206dd4..8b66ddd22 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -220,7 +220,7 @@ endif() + if(FLB_LUAJIT) + set(extra_libs + ${extra_libs} +- "libluajit") ++ ${LUAJIT_LIBRARIES}) + endif() + + if(FLB_SQLDB) +-- +2.34.1 +
package/fluent-bit/fluent-bit.mk +1 -0
@@ -20,6 +20,7 @@ FLUENT_BIT_CONF_OPTS += \ -DFLB_RELEASE=Yes \ -DFLB_EXAMPLES=No \ -DFLB_CHUNK_TRACE=No \ + -DFLB_PREFER_SYSTEM_LIBS=Yes \ -DFLB_BACKTRACE=No ifeq ($(BR2_PACKAGE_FLUENT_BIT_WASM),y)
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 3/4 package/fluent-bit: drop cxx handling
In reply to Thomas DevoogdtFluent-bit is written in pure c, so drop any cxx handling. Only the wasm part needs c++, but that one doesn't need the fixes which are now dropped.
---
v2: No change.
--- package/fluent-bit/fluent-bit.mk | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
package/fluent-bit/fluent-bit.mk +1 -5
@@ -13,7 +13,6 @@ FLUENT_BIT_CPE_ID_PRODUCT = fluent_bit FLUENT_BIT_DEPENDENCIES = host-bison host-flex libyaml openssl FLUENT_BIT_CFLAGS = $(TARGET_CFLAGS) -FLUENT_BIT_CXXFLAGS = $(TARGET_CXXFLAGS) FLUENT_BIT_CONF_OPTS += \ -DFLB_DEBUG=No \
@@ -49,13 +48,11 @@ FLUENT_BIT_CONF_OPTS += \ # Fix multiple definition of `mk_tls_*'. # https://github.com/fluent/fluent-bit/issues/5537 FLUENT_BIT_CFLAGS += -fcommon -FLUENT_BIT_CXXFLAGS += -fcommon # Undefining _FILE_OFFSET_BITS here because of a "bug" with glibc fts.h # large file support. # https://bugzilla.redhat.com/show_bug.cgi?id=574992 FLUENT_BIT_CFLAGS += -U_FILE_OFFSET_BITS -FLUENT_BIT_CXXFLAGS += -U_FILE_OFFSET_BITS ifeq ($(BR2_PACKAGE_LIBEXECINFO),y) FLUENT_BIT_DEPENDENCIES += libexecinfo
@@ -74,8 +71,7 @@ endif FLUENT_BIT_CONF_OPTS += \ -DCMAKE_EXE_LINKER_FLAGS="$(FLUENT_BIT_LDFLAGS)" \ - -DCMAKE_C_FLAGS="$(FLUENT_BIT_CFLAGS)" \ - -DCMAKE_CXX_FLAGS="$(FLUENT_BIT_CXXFLAGS)" + -DCMAKE_C_FLAGS="$(FLUENT_BIT_CFLAGS)" define FLUENT_BIT_INSTALL_INIT_SYSV $(INSTALL) -D -m 0755 package/fluent-bit/S99fluent-bit \
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 4/4 package/fluent-bit: rework wasm handling
In reply to Thomas DevoogdtFluent-bit isn't very great at supporting the various architectures, so help a little bit by defining the WAMR_BUILD_TARGET ourselves.
./utils/test-pkg -c fluent-bit.config -p fluent-bit -a
arm-aarch64 [ 1/45]: OK
bootlin-aarch64-glibc [ 2/45]: OK
bootlin-arcle-hs38-uclibc [ 3/45]: OK
bootlin-armv5-uclibc [ 4/45]: OK
bootlin-armv7-glibc [ 5/45]: OK
bootlin-armv7m-uclibc [ 6/45]: SKIPPED
bootlin-armv7-musl [ 7/45]: OK
bootlin-m68k-5208-uclibc [ 8/45]: SKIPPED
bootlin-m68k-68040-uclibc [ 9/45]: OK
bootlin-microblazeel-uclibc [10/45]: OK
bootlin-mipsel32r6-glibc [11/45]: OK
bootlin-mipsel-uclibc [12/45]: OK
bootlin-nios2-glibc [13/45]: OK
bootlin-openrisc-uclibc [14/45]: OK
bootlin-powerpc64le-power8-glibc [15/45]: OK
bootlin-powerpc-e500mc-uclibc [16/45]: OK
bootlin-riscv32-glibc [17/45]: OK
bootlin-riscv64-glibc [18/45]: OK
bootlin-riscv64-musl [19/45]: OK
bootlin-s390x-z13-glibc [20/45]: OK
bootlin-sh4-uclibc [21/45]: OK
bootlin-sparc64-glibc [22/45]: OK
bootlin-sparc-uclibc [23/45]: SKIPPED
bootlin-x86-64-glibc [24/45]: OK
bootlin-x86-64-musl [25/45]: OK
bootlin-x86-64-uclibc [26/45]: OK
bootlin-xtensa-uclibc [27/45]: OK
br-arm-basic [28/45]: OK
br-arm-full-nothread [29/45]: SKIPPED
br-arm-full-static [30/45]: SKIPPED
br-i386-pentium4-full [31/45]: OK
br-i386-pentium-mmx-musl [32/45]: OK
br-mips64-n64-full [33/45]: OK
br-mips64r6-el-hf-glibc [34/45]: OK
br-powerpc-603e-basic-cpp [35/45]: OK
br-powerpc64-power7-glibc [36/45]: OK
linaro-aarch64-be [37/45]: OK
linaro-aarch64 [38/45]: OK
linaro-arm [39/45]: OK
sourcery-arm-armv4t [40/45]: OK
sourcery-arm [41/45]: OK
sourcery-arm-thumb2 [42/45]: OK
sourcery-mips64 [43/45]: FAILED
sourcery-mips [44/45]: FAILED
sourcery-nios2 [45/45]: OKTwo failures:
- sourcery-mips64:
core/iwasm/common/arch/invokeNative_mips.s: Assembler messages:core/iwasm/common/arch/invokeNative_mips.s:58: Error: opcode not supported on this processor: mips64r2 (mips64r2) ldc1 $f12,0($sp)' core/iwasm/common/arch/invokeNative_mips.s:59: Error: opcode not supported on this processor: mips64r2 (mips64r2) ldc1 $f14,8($sp)'
make[4]: *** [src/wasm/CMakeFiles/vmlib-static.dir/build.make:495: src/wasm/CMakeFiles/vmlib-static.dir/__/__/lib/wasm-micro-runtime-WAMR-1.1.1/core/iwasm/common/arch/invokeNative_mips.s.o] Error 1 make[4]: *** Waiting for unfinished jobs....
- sourcery-mips:
core/iwasm/common/arch/invokeNative_mips.s: Assembler messages:core/iwasm/common/arch/invokeNative_mips.s:58: Error: opcode not supported on this processor: mips32r2 (mips32r2) ldc1 $f12,0($sp)' core/iwasm/common/arch/invokeNative_mips.s:59: Error: opcode not supported on this processor: mips32r2 (mips32r2) ldc1 $f14,8($sp)'
make[4]: *** [src/wasm/CMakeFiles/vmlib-static.dir/build.make:495: src/wasm/CMakeFiles/vmlib-static.dir/__/__/lib/wasm-micro-runtime-WAMR-1.1.1/core/iwasm/common/arch/invokeNative_mips.s.o] Error 1 make[4]: *** Waiting for unfinished jobs....
Fix see: https://github.com/bytecodealliance/wasm-micro-runtime/issues/625
Quoted 2 lines
Quoted 2 lines
Hi, building the
invokeNative_general.cexplicitly is supported now, please pull the latest code and use "cmake -DWAMR_BUILD_INVOKE_NATIVE_GENERAL=1 ..." to build it.
---
v2: No change.
--- package/fluent-bit/Config.in | 25 ------------------------- package/fluent-bit/fluent-bit.mk | 32 ++++++++++++++++++++++++++++++-- 2 files changed, 30 insertions(+), 27 deletions(-)
package/fluent-bit/Config.in +0 -25
@@ -11,31 +11,6 @@ config BR2_PACKAGE_FLUENT_BIT https://github.com/fluent/fluent-bit -if BR2_PACKAGE_FLUENT_BIT - -config BR2_PACKAGE_FLUENT_BIT_WASM_ARCH_SUPPORTS - bool - # see lib/wasm-micro-runtime-WAMR-1.1.1/README.md#supported-architectures-and-platforms - default y if BR2_arc - default y if BR2_arm || BR2_armeb - default y if BR2_aarch64 || BR2_aarch64_be - default y if BR2_i386 || BR2_x86_64 - default y if BR2_RISCV_64 - default y if BR2_xtensa - -config BR2_PACKAGE_FLUENT_BIT_WASM - bool "wasm runtime support" - depends on BR2_INSTALL_LIBSTDCPP - depends on BR2_PACKAGE_FLUENT_BIT_WASM_ARCH_SUPPORTS - help - Support for WASM-based plugins. - -comment "wasm runtime support needs a toolchain w/ C++" - depends on BR2_PACKAGE_FLUENT_BIT_WASM_ARCH_SUPPORTS - depends on !BR2_INSTALL_LIBSTDCPP - -endif - comment "fluent-bit needs a toolchain w/ threads, dynamic library" depends on BR2_TOOLCHAIN_HAS_SYNC_4 depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
package/fluent-bit/fluent-bit.mk +30 -2
@@ -22,8 +22,36 @@ FLUENT_BIT_CONF_OPTS += \ -DFLB_PREFER_SYSTEM_LIBS=Yes \ -DFLB_BACKTRACE=No -ifeq ($(BR2_PACKAGE_FLUENT_BIT_WASM),y) -FLUENT_BIT_CONF_OPTS += -DFLB_WASM=Yes +# WASM runtime support needs a toolchain w/ C++ +ifeq ($(BR2_INSTALL_LIBSTDCPP),y) +ifeq ($(BR2_aarch64)$(BR2_aarch64_be),y) +FLUENT_BIT_WAMR_BUILD_TARGET = AARCH64 +else ifeq ($(BR2_arcle)$(BR2_arceb),y) +FLUENT_BIT_WAMR_BUILD_TARGET = ARC +else ifeq ($(BR2_arm)$(BR2_armeb),y) +FLUENT_BIT_WAMR_BUILD_TARGET = ARM +else ifeq ($(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el),y) +FLUENT_BIT_WAMR_BUILD_TARGET = MIPS +# https://github.com/bytecodealliance/wasm-micro-runtime/issues/625 +# Fix unknown opcode 'ldc1', seen on mips32r2 and mips64r2. +FLUENT_BIT_CONF_OPTS += \ + -DWAMR_BUILD_INVOKE_NATIVE_GENERAL=1 +else ifeq ($(BR2_riscv)$(BR2_RISCV_32),yy) +FLUENT_BIT_WAMR_BUILD_TARGET = RISCV32 +else ifeq ($(BR2_riscv)$(BR2_RISCV_64),yy) +FLUENT_BIT_WAMR_BUILD_TARGET = RISCV64 +else ifeq ($(BR2_i386),y) +FLUENT_BIT_WAMR_BUILD_TARGET = X86_32 +else ifeq ($(BR2_x86_64),y) +FLUENT_BIT_WAMR_BUILD_TARGET = X86_64 +else ifeq ($(BR2_xtensa),y) +FLUENT_BIT_WAMR_BUILD_TARGET = XTENSA +endif +endif + +ifneq ($(FLUENT_BIT_WAMR_BUILD_TARGET),) +FLUENT_BIT_CONF_OPTS += -DFLB_WASM=Yes \ + -DWAMR_BUILD_TARGET=$(FLUENT_BIT_WAMR_BUILD_TARGET) else FLUENT_BIT_CONF_OPTS += -DFLB_WASM=No endif
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v3 1/4 package/fluent-bit: bump to version 2.1.7
In reply to Thomas DevoogdtFluent Bit v2.1 is the start of the new stable series of the project.
Release Notes:
https://fluentbit.io/announcements/v2.1.0/
https://fluentbit.io/announcements/v2.1.1/
https://fluentbit.io/announcements/v2.1.2/
https://fluentbit.io/announcements/v2.1.3/
https://fluentbit.io/announcements/v2.1.4/
https://fluentbit.io/announcements/v2.1.5/
https://fluentbit.io/announcements/v2.1.6/
https://fluentbit.io/announcements/v2.1.7/
Fluent Bit v2.1.7 contains this list of upstreamed patches:
https://github.com/fluent/fluent-bit/pull/7266
https://github.com/fluent/fluent-bit/pull/7254
https://github.com/fluent/fluent-bit/pull/7253
So the old patches can be dropped.
---
v2: bump from 2.1.3 to 2.1.4
v3: bump from 2.1.4 to 2.1.7
--- .checkpackageignore | 3 - .../0001-lib-cfl-fixup-static_assert.patch | 33 ----- .../0002-lib-c-ares-fixup-static_assert.patch | 56 -------- .../fluent-bit/0003-fix-build-without-C.patch | 131 ------------------ package/fluent-bit/fluent-bit.hash | 2 +- package/fluent-bit/fluent-bit.mk | 2 +- 6 files changed, 2 insertions(+), 225 deletions(-) delete mode 100644 package/fluent-bit/0001-lib-cfl-fixup-static_assert.patch delete mode 100644 package/fluent-bit/0002-lib-c-ares-fixup-static_assert.patch delete mode 100644 package/fluent-bit/0003-fix-build-without-C.patch
.checkpackageignore +0 -3
@@ -465,9 +465,6 @@ package/flex/0002-build-make-it-possible-to-disable-the-build-of-the-f.patch Ups package/flex/0003-build-make-it-possible-to-disable-the-build-of-the-d.patch Upstream package/flite/0001-fix-alsa-static.patch Upstream package/fltk/0001-disable-tests.patch Upstream -package/fluent-bit/0001-lib-cfl-fixup-static_assert.patch Upstream -package/fluent-bit/0002-lib-c-ares-fixup-static_assert.patch Upstream -package/fluent-bit/0003-fix-build-without-C.patch Upstream package/fluxbox/0001-fixes-bug-1138.patch Upstream package/freeipmi/0001-add-disable-doc.patch Upstream package/freeradius-client/0001-fix-for-nettle.patch Upstream
package/fluent-bit/0001-lib-cfl-fixup-static_assert.patch deleted +0 -33
@@ -1,33 +0,0 @@ -From e4f825dd9e952f4a056bf89342049e67102ae6bb Mon Sep 17 00:00:00 2001 -From: Thomas Devoogdt <[email protected]> -Date: Wed, 1 Feb 2023 11:38:15 +0100 -Subject: [PATCH] lib: cfl: fixup static_assert - -"undefined reference to 'static_assert'" - -Not defined when using uClibc or if not C++ >= 11. - -upstream: https://github.com/Cyan4973/xxHash/commit/6189ecd3d44a693460f86280ccf49d33cb4b18e1 - -Signed-off-by: Thomas Devoogdt <[email protected]> ---- - lib/cfl/lib/xxhash/xxhash.h | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/lib/cfl/lib/xxhash/xxhash.h b/lib/cfl/lib/xxhash/xxhash.h -index 08ab79457..511c4d12b 100644 ---- a/lib/cfl/lib/xxhash/xxhash.h -+++ b/lib/cfl/lib/xxhash/xxhash.h -@@ -1546,8 +1546,7 @@ static void* XXH_memcpy(void* dest, const void* src, size_t size) - /* note: use after variable declarations */ - #ifndef XXH_STATIC_ASSERT - # if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* C11 */ --# include <assert.h> --# define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { static_assert((c),m); } while(0) -+# define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { _Static_assert((c),m); } while(0) - # elif defined(__cplusplus) && (__cplusplus >= 201103L) /* C++11 */ - # define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { static_assert((c),m); } while(0) - # else --- -2.34.1 -
package/fluent-bit/0002-lib-c-ares-fixup-static_assert.patch deleted +0 -56
56 lines not on this page · raw message
package/fluent-bit/0003-fix-build-without-C.patch deleted +0 -131
131 lines not on this page · raw message
package/fluent-bit/fluent-bit.hash +1 -1
@@ -1,3 +1,3 @@ # Locally computed -sha256 aad5176cb4dcadacacd379ca43160074c6690012d37c4749536ac3b977d50495 fluent-bit-2.0.10.tar.gz +sha256 ed80291d660be19f8458d81796c7d3f7e8735eb48ec393467a0c9deca2e9abc3 fluent-bit-2.1.7.tar.gz sha256 0d542e0c8804e39aa7f37eb00da5a762149dc682d7829451287e11b938e94594 LICENSE
package/fluent-bit/fluent-bit.mk +1 -1
@@ -4,7 +4,7 @@ # ################################################################################ -FLUENT_BIT_VERSION = 2.0.10 +FLUENT_BIT_VERSION = 2.1.7 FLUENT_BIT_SITE = $(call github,fluent,fluent-bit,v$(FLUENT_BIT_VERSION)) FLUENT_BIT_LICENSE = Apache-2.0 FLUENT_BIT_LICENSE_FILES = LICENSE
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v3 2/4 package/fluent-bit: use the system provided LuaJIT
Luajit was not used at all when it was selected, instead fluent-bit recompiled it without taking care of the complexities that were handled in the luajit package. Fix this by linking dynamically to the buildroot provided version.
---
v2: No change.
v3: No change.
--- ...-the-system-provided-LuaJIT-if-found.patch | 62 +++++++++++++++++++ package/fluent-bit/fluent-bit.mk | 1 + 2 files changed, 63 insertions(+) create mode 100644 package/fluent-bit/0001-build-use-the-system-provided-LuaJIT-if-found.patch
package/fluent-bit/0001-build-use-the-system-provided-LuaJIT-if-found.patch new file +62 -0
@@ -0,0 +1,62 @@ +From 4f8eb7bb5a39d83374806928b7a5b622136ef055 Mon Sep 17 00:00:00 2001 +From: Thomas Devoogdt <[email protected]> +Date: Fri, 28 Apr 2023 10:25:16 +0200 +Subject: [PATCH] build: use the system provided LuaJIT if found + +e.g. buildroot has logic to build luajit, +so if pkg_check_modules can find a suitable version, +then use that one if -DFLB_PREFER_SYSTEM_LIBS=Yes. + +Upstream: https://github.com/fluent/fluent-bit/pull/7286 +Signed-off-by: Thomas Devoogdt <[email protected]> +--- + CMakeLists.txt | 12 +++++++++++- + src/CMakeLists.txt | 2 +- + 2 files changed, 12 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9af783c79..0601b7c18 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -123,6 +123,7 @@ option(FLB_TESTS_INTERNAL_FUZZ "Enable internal fuzz tests" No) + option(FLB_TESTS_OSSFUZZ "Enable OSS-Fuzz build" No) + option(FLB_MTRACE "Enable mtrace support" No) + option(FLB_POSIX_TLS "Force POSIX thread storage" No) ++option(FLB_PREFER_SYSTEM_LIBS "Prefer system installed libraries" No) + option(FLB_INOTIFY "Enable inotify support" Yes) + option(FLB_SQLDB "Enable SQL embedded DB" Yes) + option(FLB_HTTP_SERVER "Enable HTTP Server" Yes) +@@ -1003,7 +1004,16 @@ endif() + # LuaJIT (Scripting Support) + # ========================== + if(FLB_LUAJIT) +- include(cmake/luajit.cmake) ++ if(FLB_PREFER_SYSTEM_LIBS) ++ find_package(PkgConfig) ++ pkg_check_modules(LUAJIT luajit>=2.1.0) ++ endif() ++ if(LUAJIT_FOUND) ++ include_directories(${LUAJIT_INCLUDE_DIRS}) ++ else() ++ include(cmake/luajit.cmake) ++ set(LUAJIT_LIBRARIES "libluajit") ++ endif() + FLB_DEFINITION(FLB_HAVE_LUAJIT) + endif() + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 06a206dd4..8b66ddd22 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -220,7 +220,7 @@ endif() + if(FLB_LUAJIT) + set(extra_libs + ${extra_libs} +- "libluajit") ++ ${LUAJIT_LIBRARIES}) + endif() + + if(FLB_SQLDB) +-- +2.34.1 +
package/fluent-bit/fluent-bit.mk +1 -0
@@ -20,6 +20,7 @@ FLUENT_BIT_CONF_OPTS += \ -DFLB_RELEASE=Yes \ -DFLB_EXAMPLES=No \ -DFLB_CHUNK_TRACE=No \ + -DFLB_PREFER_SYSTEM_LIBS=Yes \ -DFLB_BACKTRACE=No ifeq ($(BR2_PACKAGE_FLUENT_BIT_WASM),y)
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v3 3/4 package/fluent-bit: drop cxx handling
In reply to Thomas DevoogdtFluent-bit is written in pure c, so drop any cxx handling. Only the wasm part needs c++, but that one doesn't need the fixes which are now dropped.
---
v2: No change.
v3: No change.
--- package/fluent-bit/fluent-bit.mk | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
package/fluent-bit/fluent-bit.mk +1 -5
@@ -13,7 +13,6 @@ FLUENT_BIT_CPE_ID_PRODUCT = fluent_bit FLUENT_BIT_DEPENDENCIES = host-bison host-flex libyaml openssl FLUENT_BIT_CFLAGS = $(TARGET_CFLAGS) -FLUENT_BIT_CXXFLAGS = $(TARGET_CXXFLAGS) FLUENT_BIT_CONF_OPTS += \ -DFLB_DEBUG=No \
@@ -49,13 +48,11 @@ FLUENT_BIT_CONF_OPTS += \ # Fix multiple definition of `mk_tls_*'. # https://github.com/fluent/fluent-bit/issues/5537 FLUENT_BIT_CFLAGS += -fcommon -FLUENT_BIT_CXXFLAGS += -fcommon # Undefining _FILE_OFFSET_BITS here because of a "bug" with glibc fts.h # large file support. # https://bugzilla.redhat.com/show_bug.cgi?id=574992 FLUENT_BIT_CFLAGS += -U_FILE_OFFSET_BITS -FLUENT_BIT_CXXFLAGS += -U_FILE_OFFSET_BITS ifeq ($(BR2_PACKAGE_LIBEXECINFO),y) FLUENT_BIT_DEPENDENCIES += libexecinfo
@@ -74,8 +71,7 @@ endif FLUENT_BIT_CONF_OPTS += \ -DCMAKE_EXE_LINKER_FLAGS="$(FLUENT_BIT_LDFLAGS)" \ - -DCMAKE_C_FLAGS="$(FLUENT_BIT_CFLAGS)" \ - -DCMAKE_CXX_FLAGS="$(FLUENT_BIT_CXXFLAGS)" + -DCMAKE_C_FLAGS="$(FLUENT_BIT_CFLAGS)" define FLUENT_BIT_INSTALL_INIT_SYSV $(INSTALL) -D -m 0755 package/fluent-bit/S99fluent-bit \
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v3 4/4 package/fluent-bit: rework wasm handling
In reply to Thomas DevoogdtFluent-bit isn't very great at supporting the various architectures, so help a little bit by defining the WAMR_BUILD_TARGET ourselves.
./utils/test-pkg -c fluent-bit.config -p fluent-bit -a
arm-aarch64 [ 1/45]: OK
bootlin-aarch64-glibc [ 2/45]: OK
bootlin-arcle-hs38-uclibc [ 3/45]: OK
bootlin-armv5-uclibc [ 4/45]: OK
bootlin-armv7-glibc [ 5/45]: OK
bootlin-armv7m-uclibc [ 6/45]: SKIPPED
bootlin-armv7-musl [ 7/45]: OK
bootlin-m68k-5208-uclibc [ 8/45]: SKIPPED
bootlin-m68k-68040-uclibc [ 9/45]: OK
bootlin-microblazeel-uclibc [10/45]: OK
bootlin-mipsel32r6-glibc [11/45]: OK
bootlin-mipsel-uclibc [12/45]: OK
bootlin-nios2-glibc [13/45]: OK
bootlin-openrisc-uclibc [14/45]: OK
bootlin-powerpc64le-power8-glibc [15/45]: OK
bootlin-powerpc-e500mc-uclibc [16/45]: OK
bootlin-riscv32-glibc [17/45]: OK
bootlin-riscv64-glibc [18/45]: OK
bootlin-riscv64-musl [19/45]: OK
bootlin-s390x-z13-glibc [20/45]: OK
bootlin-sh4-uclibc [21/45]: OK
bootlin-sparc64-glibc [22/45]: OK
bootlin-sparc-uclibc [23/45]: SKIPPED
bootlin-x86-64-glibc [24/45]: OK
bootlin-x86-64-musl [25/45]: OK
bootlin-x86-64-uclibc [26/45]: OK
bootlin-xtensa-uclibc [27/45]: OK
br-arm-basic [28/45]: OK
br-arm-full-nothread [29/45]: SKIPPED
br-arm-full-static [30/45]: SKIPPED
br-i386-pentium4-full [31/45]: OK
br-i386-pentium-mmx-musl [32/45]: OK
br-mips64-n64-full [33/45]: OK
br-mips64r6-el-hf-glibc [34/45]: OK
br-powerpc-603e-basic-cpp [35/45]: OK
br-powerpc64-power7-glibc [36/45]: OK
linaro-aarch64-be [37/45]: OK
linaro-aarch64 [38/45]: OK
linaro-arm [39/45]: OK
sourcery-arm-armv4t [40/45]: OK
sourcery-arm [41/45]: OK
sourcery-arm-thumb2 [42/45]: OK
sourcery-mips64 [43/45]: FAILED
sourcery-mips [44/45]: FAILED
sourcery-nios2 [45/45]: OKTwo failures:
- sourcery-mips64:
core/iwasm/common/arch/invokeNative_mips.s: Assembler messages:core/iwasm/common/arch/invokeNative_mips.s:58: Error: opcode not supported on this processor: mips64r2 (mips64r2) ldc1 $f12,0($sp)' core/iwasm/common/arch/invokeNative_mips.s:59: Error: opcode not supported on this processor: mips64r2 (mips64r2) ldc1 $f14,8($sp)'
make[4]: *** [src/wasm/CMakeFiles/vmlib-static.dir/build.make:495: src/wasm/CMakeFiles/vmlib-static.dir/__/__/lib/wasm-micro-runtime-WAMR-1.1.1/core/iwasm/common/arch/invokeNative_mips.s.o] Error 1 make[4]: *** Waiting for unfinished jobs....
- sourcery-mips:
core/iwasm/common/arch/invokeNative_mips.s: Assembler messages:core/iwasm/common/arch/invokeNative_mips.s:58: Error: opcode not supported on this processor: mips32r2 (mips32r2) ldc1 $f12,0($sp)' core/iwasm/common/arch/invokeNative_mips.s:59: Error: opcode not supported on this processor: mips32r2 (mips32r2) ldc1 $f14,8($sp)'
make[4]: *** [src/wasm/CMakeFiles/vmlib-static.dir/build.make:495: src/wasm/CMakeFiles/vmlib-static.dir/__/__/lib/wasm-micro-runtime-WAMR-1.1.1/core/iwasm/common/arch/invokeNative_mips.s.o] Error 1 make[4]: *** Waiting for unfinished jobs....
Fix see: https://github.com/bytecodealliance/wasm-micro-runtime/issues/625
Quoted 2 lines
Quoted 2 lines
Hi, building the
invokeNative_general.cexplicitly is supported now, please pull the latest code and use "cmake -DWAMR_BUILD_INVOKE_NATIVE_GENERAL=1 ..." to build it.
---
v2: No change.
v3: No change.
--- package/fluent-bit/Config.in | 25 ------------------------- package/fluent-bit/fluent-bit.mk | 32 ++++++++++++++++++++++++++++++-- 2 files changed, 30 insertions(+), 27 deletions(-)
package/fluent-bit/Config.in +0 -25
@@ -11,31 +11,6 @@ config BR2_PACKAGE_FLUENT_BIT https://github.com/fluent/fluent-bit -if BR2_PACKAGE_FLUENT_BIT - -config BR2_PACKAGE_FLUENT_BIT_WASM_ARCH_SUPPORTS - bool - # see lib/wasm-micro-runtime-WAMR-1.1.1/README.md#supported-architectures-and-platforms - default y if BR2_arc - default y if BR2_arm || BR2_armeb - default y if BR2_aarch64 || BR2_aarch64_be - default y if BR2_i386 || BR2_x86_64 - default y if BR2_RISCV_64 - default y if BR2_xtensa - -config BR2_PACKAGE_FLUENT_BIT_WASM - bool "wasm runtime support" - depends on BR2_INSTALL_LIBSTDCPP - depends on BR2_PACKAGE_FLUENT_BIT_WASM_ARCH_SUPPORTS - help - Support for WASM-based plugins. - -comment "wasm runtime support needs a toolchain w/ C++" - depends on BR2_PACKAGE_FLUENT_BIT_WASM_ARCH_SUPPORTS - depends on !BR2_INSTALL_LIBSTDCPP - -endif - comment "fluent-bit needs a toolchain w/ threads, dynamic library" depends on BR2_TOOLCHAIN_HAS_SYNC_4 depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
package/fluent-bit/fluent-bit.mk +30 -2
@@ -22,8 +22,36 @@ FLUENT_BIT_CONF_OPTS += \ -DFLB_PREFER_SYSTEM_LIBS=Yes \ -DFLB_BACKTRACE=No -ifeq ($(BR2_PACKAGE_FLUENT_BIT_WASM),y) -FLUENT_BIT_CONF_OPTS += -DFLB_WASM=Yes +# WASM runtime support needs a toolchain w/ C++ +ifeq ($(BR2_INSTALL_LIBSTDCPP),y) +ifeq ($(BR2_aarch64)$(BR2_aarch64_be),y) +FLUENT_BIT_WAMR_BUILD_TARGET = AARCH64 +else ifeq ($(BR2_arcle)$(BR2_arceb),y) +FLUENT_BIT_WAMR_BUILD_TARGET = ARC +else ifeq ($(BR2_arm)$(BR2_armeb),y) +FLUENT_BIT_WAMR_BUILD_TARGET = ARM +else ifeq ($(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el),y) +FLUENT_BIT_WAMR_BUILD_TARGET = MIPS +# https://github.com/bytecodealliance/wasm-micro-runtime/issues/625 +# Fix unknown opcode 'ldc1', seen on mips32r2 and mips64r2. +FLUENT_BIT_CONF_OPTS += \ + -DWAMR_BUILD_INVOKE_NATIVE_GENERAL=1 +else ifeq ($(BR2_riscv)$(BR2_RISCV_32),yy) +FLUENT_BIT_WAMR_BUILD_TARGET = RISCV32 +else ifeq ($(BR2_riscv)$(BR2_RISCV_64),yy) +FLUENT_BIT_WAMR_BUILD_TARGET = RISCV64 +else ifeq ($(BR2_i386),y) +FLUENT_BIT_WAMR_BUILD_TARGET = X86_32 +else ifeq ($(BR2_x86_64),y) +FLUENT_BIT_WAMR_BUILD_TARGET = X86_64 +else ifeq ($(BR2_xtensa),y) +FLUENT_BIT_WAMR_BUILD_TARGET = XTENSA +endif +endif + +ifneq ($(FLUENT_BIT_WAMR_BUILD_TARGET),) +FLUENT_BIT_CONF_OPTS += -DFLB_WASM=Yes \ + -DWAMR_BUILD_TARGET=$(FLUENT_BIT_WAMR_BUILD_TARGET) else FLUENT_BIT_CONF_OPTS += -DFLB_WASM=No endif
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v3 4/4] package/fluent-bit: rework wasm handling
Hello Thomas,
Quoted 8 lines · On Sun, 23 Jul 2023 11:23:14 +0200 Thomas Devoogdt <[email protected]> wrote:
package/fluent-bit/Config.in +0
-8-if BR2_PACKAGE_FLUENT_BIT - -config BR2_PACKAGE_FLUENT_BIT_WASM_ARCH_SUPPORTS - bool - # see lib/wasm-micro-runtime-WAMR-1.1.1/README.md#supported-architectures-and-platforms - default y if BR2_arc - default y if BR2_arm || BR2_armeb - default y if BR2_aarch64 || BR2_aarch64_be
package/fluent-bit/Config.in config BR2_PACKAGE_FLUENT_BIT · line 31
Quoted 10 lines
package/fluent-bit/Config.in +0
-10- default y if BR2_i386 || BR2_x86_64 - default y if BR2_RISCV_64 - default y if BR2_xtensa - -config BR2_PACKAGE_FLUENT_BIT_WASM - bool "wasm runtime support" - depends on BR2_INSTALL_LIBSTDCPP - depends on BR2_PACKAGE_FLUENT_BIT_WASM_ARCH_SUPPORTS - help - Support for WASM-based plugins.
Something that isn't explained in your commit log is why you're making the wasm feature automatically enabled, rather than optional as it was?
What is the size impact? Would someone possibly want fluent-bit without wasm support?
Quoted 24 lines
Two failures:
- sourcery-mips64:
core/iwasm/common/arch/invokeNative_mips.s: Assembler messages:core/iwasm/common/arch/invokeNative_mips.s:58: Error: opcode not
supported on this processor: mips64r2 (mips64r2) `ldc1 $f12,0($sp)'core/iwasm/common/arch/invokeNative_mips.s:59: Error: opcode not
supported on this processor: mips64r2 (mips64r2) `ldc1 $f14,8($sp)'
make[4]: *** [src/wasm/CMakeFiles/vmlib-static.dir/build.make:495:src/wasm/CMakeFiles/vmlib-static.dir/__/__/lib/wasm-micro-runtime-WAMR-1.1.1/core/iwasm/common/arch/invokeNative_mips.s.o] Error 1 make[4]: *** Waiting for unfinished jobs....- sourcery-mips:
core/iwasm/common/arch/invokeNative_mips.s: Assembler messages:core/iwasm/common/arch/invokeNative_mips.s:58: Error: opcode not
supported on this processor: mips32r2 (mips32r2) `ldc1 $f12,0($sp)'core/iwasm/common/arch/invokeNative_mips.s:59: Error: opcode not
supported on this processor: mips32r2 (mips32r2) `ldc1 $f14,8($sp)'
make[4]: *** [src/wasm/CMakeFiles/vmlib-static.dir/build.make:495:src/wasm/CMakeFiles/vmlib-static.dir/__/__/lib/wasm-micro-runtime-WAMR-1.1.1/core/iwasm/common/arch/invokeNative_mips.s.o] Error 1 make[4]: *** Waiting for unfinished jobs....
Quoted 2 lines
Fix see:
https://github.com/bytecodealliance/wasm-micro-runtime/issues/625
This part of your commit log is really not clear: we don't understand if the issue still exists, or is fixed in your commit. You're passing -DWAMR_BUILD_INVOKE_NATIVE_GENERAL=1 for MIPS, but your commit log contains a test-pkg run showing that it still fails to build for MIPS. So?
Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v3 4/4] package/fluent-bit: rework wasm handling
Hi Thomas,
Op zo 23 jul 2023 om 12:06 schreef Thomas Petazzoni <[email protected]>:
Quoted 19 lines
Hello Thomas,
Quoted 13 lines · On Sun, 23 Jul 2023 11:23:14 +0200 Thomas Devoogdt <[email protected]> wrote:
package/fluent-bit/Config.in +0
-13-if BR2_PACKAGE_FLUENT_BIT - -config BR2_PACKAGE_FLUENT_BIT_WASM_ARCH_SUPPORTS - bool - # see lib/wasm-micro-runtime-WAMR-1.1.1/README.md#supported-architectures-and-platforms - default y if BR2_arc - default y if BR2_arm || BR2_armeb - default y if BR2_aarch64 || BR2_aarch64_be - default y if BR2_i386 || BR2_x86_64 - default y if BR2_RISCV_64 - default y if BR2_xtensa - -config BR2_PACKAGE_FLUENT_BIT_WASM
Quoted 8 lines
package/fluent-bit/Config.in config BR2_PACKAGE_FLUENT_BIT · line 31
Quoted 5 lines
package/fluent-bit/Config.in +0
-5- bool "wasm runtime support" - depends on BR2_INSTALL_LIBSTDCPP - depends on BR2_PACKAGE_FLUENT_BIT_WASM_ARCH_SUPPORTS - help - Support for WASM-based plugins.Something that isn't explained in your commit log is why you're making the wasm feature automatically enabled, rather than optional as it was?
I had to re-add the logic to the make file in order to select the right target. I dropped the Config.In logic to avoid double maintenance of the supported architectures.
There is also otherwise no specific reason to not always compile it.
Quoted 2 lines
What is the size impact? Would someone possibly want fluent-bit without wasm support?
FLB_WASM=No : -rwxr-xr-x 1 thomas thomas 31769156 Jul 24 09:10 output/target/usr/lib/fluent-bit/libfluent-bit.so FLB_WASM=Yes: -rwxr-xr-x 1 thomas thomas 33801056 Jul 24 09:07 output/target/usr/lib/fluent-bit/libfluent-bit.so
So the binary goes from 31.8MB to 33.8MB.
Quoted 24 lines
Quoted 24 lines
Two failures:
- sourcery-mips64:
core/iwasm/common/arch/invokeNative_mips.s: Assembler messages:core/iwasm/common/arch/invokeNative_mips.s:58: Error: opcode not
supported on this processor: mips64r2 (mips64r2) `ldc1 $f12,0($sp)'core/iwasm/common/arch/invokeNative_mips.s:59: Error: opcode not
supported on this processor: mips64r2 (mips64r2) `ldc1 $f14,8($sp)'
make[4]: *** [src/wasm/CMakeFiles/vmlib-static.dir/build.make:495:src/wasm/CMakeFiles/vmlib-static.dir/__/__/lib/wasm-micro-runtime-WAMR-1.1.1/core/iwasm/common/arch/invokeNative_mips.s.o] Error 1 make[4]: *** Waiting for unfinished jobs....- sourcery-mips:
core/iwasm/common/arch/invokeNative_mips.s: Assembler messages:core/iwasm/common/arch/invokeNative_mips.s:58: Error: opcode not
supported on this processor: mips32r2 (mips32r2) `ldc1 $f12,0($sp)'core/iwasm/common/arch/invokeNative_mips.s:59: Error: opcode not
supported on this processor: mips32r2 (mips32r2) `ldc1 $f14,8($sp)'
make[4]: *** [src/wasm/CMakeFiles/vmlib-static.dir/build.make:495:src/wasm/CMakeFiles/vmlib-static.dir/__/__/lib/wasm-micro-runtime-WAMR-1.1.1/core/iwasm/common/arch/invokeNative_mips.s.o] Error 1 make[4]: *** Waiting for unfinished jobs....
Quoted 7 lines
Quoted 2 lines
Fix see:
https://github.com/bytecodealliance/wasm-micro-runtime/issues/625This part of your commit log is really not clear: we don't understand if the issue still exists, or is fixed in your commit. You're passing -DWAMR_BUILD_INVOKE_NATIVE_GENERAL=1 for MIPS, but your commit log contains a test-pkg run showing that it still fails to build for MIPS. So?
The log indeed shows that there are two failures, but those are fixed by setting the obscure WAMR_BUILD_INVOKE_NATIVE_GENERAL flag.
Quoted 8 lines
Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training
https://bootlin.com
This git commit message is perhaps better:
_________________
package/fluent-bit: rework wasm handling
Fluent-bit isn't very great at supporting the various architectures, so help a little bit by defining the WAMR_BUILD_TARGET ourselves.
The BR2_PACKAGE_FLUENT_BIT_WASM option is removed to avoid double architecture maintenance in both the KConfig and make file. This means that WAMR will always get compiled resulting in a slightly binary size increase from 31.8MB to 33.8MB.
Two failures while executing ./utils/test-pkg:
- sourcery-mips64:core/iwasm/common/arch/invokeNative_mips.s: Assembler messages:core/iwasm/common/arch/invokeNative_mips.s:58: Error: opcode not
supported on this processor: mips64r2 (mips64r2) `ldc1 $f12,0($sp)' core/iwasm/common/arch/invokeNative_mips.s:59: Error: opcode not
supported on this processor: mips64r2 (mips64r2) `ldc1 $f14,8($sp)'
make[4]: *** [src/wasm/CMakeFiles/vmlib-static.dir/build.make:495:src/wasm/CMakeFiles/vmlib-static.dir/__/__/lib/wasm-micro-runtime-WAMR-1.1.1/core/iwasm/common/arch/invokeNative_mips.s.o] Error 1
make[4]: *** Waiting for unfinished jobs....
- sourcery-mips:core/iwasm/common/arch/invokeNative_mips.s: Assembler messages:core/iwasm/common/arch/invokeNative_mips.s:58: Error: opcode not
supported on this processor: mips32r2 (mips32r2) `ldc1 $f12,0($sp)' core/iwasm/common/arch/invokeNative_mips.s:59: Error: opcode not
supported on this processor: mips32r2 (mips32r2) `ldc1 $f14,8($sp)'
make[4]: *** [src/wasm/CMakeFiles/vmlib-static.dir/build.make:495:src/wasm/CMakeFiles/vmlib-static.dir/__/__/lib/wasm-micro-runtime-WAMR-1.1.1/core/iwasm/common/arch/invokeNative_mips.s.o] Error 1
make[4]: *** Waiting for unfinished jobs....
Which are fixed by setting the obscure flag "WAMR_BUILD_INVOKE_NATIVE_GENERAL".
See https://github.com/bytecodealliance/wasm-micro-runtime/issues/625
for more info:
“Hi, building the invokeNative_general.c explicitly is supported now, please pull the latest code and use
"cmake -DWAMR_BUILD_INVOKE_NATIVE_GENERAL=1 ..." to build it.”
_________________
kr,
Thomas Devoogdt
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v3 4/4] package/fluent-bit: rework wasm handling
Hello Thomas,
Quoted 6 lines · On Mon, 24 Jul 2023 10:29:45 +0200 Thomas Devoogdt <[email protected]> wrote:
Quoted 2 lines
Something that isn't explained in your commit log is why you're making the wasm feature automatically enabled, rather than optional as it was?
I had to re-add the logic to the make file in order to select the right target. I dropped the Config.In logic to avoid double maintenance of the supported architectures.
Well, in fact the logic for the architecture would be cleaner in the Config.in file.
if BR2_PACKAGE_FLUENT_BIT
config BR2_PACKAGE_FLUENT_BIT_WASM_ARCH
string default "AARCH64" if BR2_aarch64 || BR2_aarch64be default "ARC" if BR2_arc || BR2_arceb default "ARM" if BR2_arm || BR2_armeb ...
config BR2_PACKAGE_FLUENT_BIT_WASM_ARCH_SUPPORTS
bool default y if BR2_PACKAGE_FLUENT_BIT_WASM_ARCH != ""
config BR2_PACKAGE_FLUENT_BIT_WASM
bool "wasm runtime support"
depends on BR2_INSTALL_LIBSTDCPP
depends on BR2_PACKAGE_FLUENT_BIT_WASM_ARCH_SUPPORTS help
Support for WASM-based plugins.
...
endif
And then in the Makefile:
FLUENT_BIT_WASM_ARCH = $(call qstrip,$(BR2_PACKAGE_FLUENT_BIT_WASM_ARCH))
and voilà.
Quoted 9 lines
Quoted 2 lines
What is the size impact? Would someone possibly want fluent-bit without wasm support?
FLB_WASM=No : -rwxr-xr-x 1 thomas thomas 31769156 Jul 24 09:10 output/target/usr/lib/fluent-bit/libfluent-bit.so FLB_WASM=Yes: -rwxr-xr-x 1 thomas thomas 33801056 Jul 24 09:07 output/target/usr/lib/fluent-bit/libfluent-bit.so
So the binary goes from 31.8MB to 33.8MB.
Admittedly, it's already a huge thing, so another 2 MB more...
But in general in Buildroot our policy is to ensure things that are optional in upstream are indeed optional in Buildroot.
Quoted 7 lines
package/fluent-bit: rework wasm handling
Fluent-bit isn't very great at supporting the various architectures, so help a little bit by defining the
WAMR_BUILD_TARGETourselves.The
BR2_PACKAGE_FLUENT_BIT_WASMoption is removed to avoid double architecture maintenance in both the KConfig and make file. This
See above: no double maintenance is needed.
Quoted 27 lines
means that WAMR will always get compiled resulting in a slightly binary size increase from 31.8MB to 33.8MB.
Two failures while executing ./utils/test-pkg:
- sourcery-mips64:
core/iwasm/common/arch/invokeNative_mips.s: Assembler messages:core/iwasm/common/arch/invokeNative_mips.s:58: Error: opcode not
supported on this processor: mips64r2 (mips64r2) `ldc1 $f12,0($sp)'core/iwasm/common/arch/invokeNative_mips.s:59: Error: opcode not
supported on this processor: mips64r2 (mips64r2) `ldc1 $f14,8($sp)'
make[4]: *** [src/wasm/CMakeFiles/vmlib-static.dir/build.make:495:src/wasm/CMakeFiles/vmlib-static.dir/__/__/lib/wasm-micro-runtime-WAMR-1.1.1/core/iwasm/common/arch/invokeNative_mips.s.o] Error 1
make[4]: *** Waiting for unfinished jobs....- sourcery-mips:
core/iwasm/common/arch/invokeNative_mips.s: Assembler messages:core/iwasm/common/arch/invokeNative_mips.s:58: Error: opcode not
supported on this processor: mips32r2 (mips32r2) `ldc1 $f12,0($sp)'core/iwasm/common/arch/invokeNative_mips.s:59: Error: opcode not
supported on this processor: mips32r2 (mips32r2) `ldc1 $f14,8($sp)'
make[4]: *** [src/wasm/CMakeFiles/vmlib-static.dir/build.make:495:src/wasm/CMakeFiles/vmlib-static.dir/__/__/lib/wasm-micro-runtime-WAMR-1.1.1/core/iwasm/common/arch/invokeNative_mips.s.o] Error 1
make[4]: *** Waiting for unfinished jobs....
Quoted 7 lines
Which are fixed by setting the obscure flag "
WAMR_BUILD_INVOKE_NATIVE_GENERAL".See https://github.com/bytecodealliance/wasm-micro-runtime/issues/625
for more info:
“Hi, building theinvokeNative_general.cexplicitly is supported now, please pull the latest code and use
"cmake -DWAMR_BUILD_INVOKE_NATIVE_GENERAL=1 ..." to build it.”
Thanks, this explanation looks good.
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v4 1/1 package/fluent-bit: rework wasm handling
In reply to Thomas DevoogdtFluent-bit isn't very great at supporting the various architectures, so help a little bit by defining the WAMR_BUILD_TARGET ourselves.
Two failures for MIPS while executing ./utils/test-pkg:
- sourcery-mips64:core/iwasm/common/arch/invokeNative_mips.s: Assembler messages:core/iwasm/common/arch/invokeNative_mips.s:58: Error: opcode not supported on this processor: mips64r2 (mips64r2) ldc1 $f12,0($sp)' core/iwasm/common/arch/invokeNative_mips.s:59: Error: opcode not supported on this processor: mips64r2 (mips64r2) ldc1 $f14,8($sp)'
make[4]: *** [src/wasm/CMakeFiles/vmlib-static.dir/build.make:495: src/wasm/CMakeFiles/vmlib-static.dir/__/__/lib/wasm-micro-runtime-WAMR-1.1.1/core/iwasm/common/arch/invokeNative_mips.s.o] Error 1 make[4]: *** Waiting for unfinished jobs....
- sourcery-mips:core/iwasm/common/arch/invokeNative_mips.s: Assembler messages:core/iwasm/common/arch/invokeNative_mips.s:58: Error: opcode not supported on this processor: mips32r2 (mips32r2) ldc1 $f12,0($sp)' core/iwasm/common/arch/invokeNative_mips.s:59: Error: opcode not supported on this processor: mips32r2 (mips32r2) ldc1 $f14,8($sp)'
make[4]: *** [src/wasm/CMakeFiles/vmlib-static.dir/build.make:495: src/wasm/CMakeFiles/vmlib-static.dir/__/__/lib/wasm-micro-runtime-WAMR-1.1.1/core/iwasm/common/arch/invokeNative_mips.s.o] Error 1 make[4]: *** Waiting for unfinished jobs....
Which are fixed by setting the obscure flag "WAMR_BUILD_INVOKE_NATIVE_GENERAL".
See https://github.com/bytecodealliance/wasm-micro-runtime/issues/625 for more info:
“Hi, building the invokeNative_general.c explicitly is supported now, please pull the latest code and use
---
v2: No change.
v3: No change.
v4: Restore the BR2_PACKAGE_FLUENT_BIT_WASM_ARCH_SUPPORTS KConfig.
--- package/fluent-bit/Config.in | 20 +++++++++++++------- package/fluent-bit/fluent-bit.mk | 12 +++++++++++- 2 files changed, 24 insertions(+), 8 deletions(-)
package/fluent-bit/Config.in +13 -7
@@ -13,15 +13,21 @@ config BR2_PACKAGE_FLUENT_BIT if BR2_PACKAGE_FLUENT_BIT +config BR2_PACKAGE_FLUENT_BIT_WASM_ARCH + string + default "AARCH64" if BR2_aarch64 || BR2_aarch64be + default "ARC" if BR2_arcle || BR2_arceb + default "ARM" if BR2_arm || BR2_armeb + default "MIPS" if BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el + default "RISCV32" if BR2_riscv && BR2_RISCV_32 + default "RISCV64" if BR2_riscv && BR2_RISCV_64 + default "X86_32" if BR2_i386 + default "X86_64" if BR2_x86_64 + default "XTENSA" if BR2_xtensa + config BR2_PACKAGE_FLUENT_BIT_WASM_ARCH_SUPPORTS bool - # see lib/wasm-micro-runtime-WAMR-1.1.1/README.md#supported-architectures-and-platforms - default y if BR2_arc - default y if BR2_arm || BR2_armeb - default y if BR2_aarch64 || BR2_aarch64_be - default y if BR2_i386 || BR2_x86_64 - default y if BR2_RISCV_64 - default y if BR2_xtensa + default y if BR2_PACKAGE_FLUENT_BIT_WASM_ARCH != "" config BR2_PACKAGE_FLUENT_BIT_WASM bool "wasm runtime support"
package/fluent-bit/fluent-bit.mk +11 -1
@@ -23,7 +23,17 @@ FLUENT_BIT_CONF_OPTS += \ -DFLB_BACKTRACE=No ifeq ($(BR2_PACKAGE_FLUENT_BIT_WASM),y) -FLUENT_BIT_CONF_OPTS += -DFLB_WASM=Yes +FLUENT_BIT_WAMR_ARCH = $(call qstrip,$(BR2_PACKAGE_FLUENT_BIT_WASM_ARCH)) + +# https://github.com/bytecodealliance/wasm-micro-runtime/issues/625 +# Fix unknown opcode 'ldc1', seen on mips32r2 and mips64r2. +ifeq ($(FLUENT_BIT_WAMR_ARCH),MIPS) +FLUENT_BIT_CONF_OPTS += \ + -DWAMR_BUILD_INVOKE_NATIVE_GENERAL=1 +endif + +FLUENT_BIT_CONF_OPTS += -DFLB_WASM=Yes \ + -DWAMR_BUILD_TARGET=$(FLUENT_BIT_WAMR_ARCH) else FLUENT_BIT_CONF_OPTS += -DFLB_WASM=No endif
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Petazzoni via buildroot
AppliedRe: [Buildroot] [PATCH v4] package/fluent-bit: rework wasm handling
Quoted 19 lines · On Mon, 24 Jul 2023 14:04:42 +0200 Thomas Devoogdt <[email protected]> wrote:
Fluent-bit isn't very great at supporting the various architectures, so help a little bit by defining the
WAMR_BUILD_TARGETourselves.Two failures for MIPS while executing ./utils/test-pkg:
- sourcery-mips64:
core/iwasm/common/arch/invokeNative_mips.s: Assembler messages:core/iwasm/common/arch/invokeNative_mips.s:58: Error: opcode not supported on this processor: mips64r2 (mips64r2)ldc1 $f12,0($sp)' core/iwasm/common/arch/invokeNative_mips.s:59: Error: opcode not supported on this processor: mips64r2 (mips64r2)ldc1 $f14,8($sp)'
make[4]: *** [src/wasm/CMakeFiles/vmlib-static.dir/build.make:495:src/wasm/CMakeFiles/vmlib-static.dir/__/__/lib/wasm-micro-runtime-WAMR-1.1.1/core/iwasm/common/arch/invokeNative_mips.s.o] Error 1 make[4]: *** Waiting for unfinished jobs....- sourcery-mips:
core/iwasm/common/arch/invokeNative_mips.s: Assembler messages:core/iwasm/common/arch/invokeNative_mips.s:58: Error: opcode not supported on this processor: mips32r2 (mips32r2)ldc1 $f12,0($sp)' core/iwasm/common/arch/invokeNative_mips.s:59: Error: opcode not supported on this processor: mips32r2 (mips32r2)ldc1 $f14,8($sp)'
make[4]: *** [src/wasm/CMakeFiles/vmlib-static.dir/build.make:495:src/wasm/CMakeFiles/vmlib-static.dir/__/__/lib/wasm-micro-runtime-WAMR-1.1.1/core/iwasm/common/arch/invokeNative_mips.s.o] Error 1 make[4]: *** Waiting for unfinished jobs....
Quoted 6 lines
Which are fixed by setting the obscure flag "
WAMR_BUILD_INVOKE_NATIVE_GENERAL".See https://github.com/bytecodealliance/wasm-micro-runtime/issues/625 for more info:
“Hi, building theinvokeNative_general.cexplicitly is supported now, please pull the latest code and useSigned-off-by Thomas Devoogdt <[email protected]>
Applied to master, thanks.
Thomas
Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v3 1/4] package/fluent-bit: bump to version 2.1.7
In reply to Thomas DevoogdtHello Thomas,
Quoted 25 lines · On Sun, 23 Jul 2023 11:23:11 +0200 Thomas Devoogdt <[email protected]> wrote:
Fluent Bit v2.1 is the start of the new stable series of the project.
Release Notes:
https://fluentbit.io/announcements/v2.1.0/
https://fluentbit.io/announcements/v2.1.1/
https://fluentbit.io/announcements/v2.1.2/
https://fluentbit.io/announcements/v2.1.3/
https://fluentbit.io/announcements/v2.1.4/
https://fluentbit.io/announcements/v2.1.5/
https://fluentbit.io/announcements/v2.1.6/
https://fluentbit.io/announcements/v2.1.7/Fluent Bit v2.1.7 contains this list of upstreamed patches:
https://github.com/fluent/fluent-bit/pull/7266
https://github.com/fluent/fluent-bit/pull/7254
https://github.com/fluent/fluent-bit/pull/7253So the old patches can be dropped.
Signed-off-by Thomas Devoogdt <[email protected]>---
v2: bump from 2.1.3 to 2.1.4
v3: bump from 2.1.4 to 2.1.7
Quoted 11 lines
--- .checkpackageignore | 3 - .../0001-lib-cfl-fixup-static_assert.patch | 33 ----- .../0002-lib-c-ares-fixup-static_assert.patch | 56 -------- .../fluent-bit/0003-fix-build-without-C.patch | 131 ------------------ package/fluent-bit/fluent-bit.hash | 2 +- package/fluent-bit/fluent-bit.mk | 2 +- 6 files changed, 2 insertions(+), 225 deletions(-) delete mode 100644 package/fluent-bit/0001-lib-cfl-fixup-static_assert.patch delete mode 100644 package/fluent-bit/0002-lib-c-ares-fixup-static_assert.patch delete mode 100644 package/fluent-bit/0003-fix-build-without-C.patch
Patches 1/4 to 3/4 applied, thanks! On patch 4/4, I have some questions, so I will reply to it separately.
Best regards,
Thomas
Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot