Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/4] package/fluent-bit: bump to version 2.1.4
@ 2023-06-10 13:32 Thomas Devoogdt
  2023-06-10 13:32 ` [Buildroot] [PATCH v2 2/4] package/fluent-bit: use the system provided LuaJIT Thomas Devoogdt
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Thomas Devoogdt @ 2023-06-10 13:32 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Devoogdt

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.

Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
---
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

diff --git a/.checkpackageignore b/.checkpackageignore
index c2316d1d4e..b4fcb051c3 100644
--- a/.checkpackageignore
+++ b/.checkpackageignore
@@ -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
diff --git a/package/fluent-bit/0001-lib-cfl-fixup-static_assert.patch b/package/fluent-bit/0001-lib-cfl-fixup-static_assert.patch
deleted file mode 100644
index 19dab7cac6..0000000000
--- a/package/fluent-bit/0001-lib-cfl-fixup-static_assert.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From e4f825dd9e952f4a056bf89342049e67102ae6bb Mon Sep 17 00:00:00 2001
-From: Thomas Devoogdt <thomas.devoogdt@barco.com>
-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 <thomas.devoogdt@barco.com>
----
- 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
-
diff --git a/package/fluent-bit/0002-lib-c-ares-fixup-static_assert.patch b/package/fluent-bit/0002-lib-c-ares-fixup-static_assert.patch
deleted file mode 100644
index d9b918ea8a..0000000000
--- a/package/fluent-bit/0002-lib-c-ares-fixup-static_assert.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From f55f9bf6d9201169d2e5d3782068b03ff17dec90 Mon Sep 17 00:00:00 2001
-From: Thomas Devoogdt <thomas.devoogdt@barco.com>
-Date: Wed, 1 Feb 2023 11:26:56 +0100
-Subject: [PATCH] lib: c-ares: fixup static_assert
-
-"undefined reference to 'static_assert'"
-
-Not defined when using uClibc or if not C++ >= 11.
-
-upstream: https://github.com/c-ares/c-ares/issues/504
-
-Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
----
- lib/c-ares-1.19.0/configure                      | 4 ++++
- lib/c-ares-1.19.0/m4/ax_cxx_compile_stdcxx_11.m4 | 3 +++
- 2 files changed, 7 insertions(+)
-
-diff --git a/lib/c-ares-1.19.0/configure b/lib/c-ares-1.19.0/configure
-index 4c5e1a966..58712ec34 100755
---- a/lib/c-ares-1.19.0/configure
-+++ b/lib/c-ares-1.19.0/configure
-@@ -6317,6 +6317,8 @@ else $as_nop
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- 
-+#define static_assert _Static_assert
-+
-   template <typename T>
-     struct check
-     {
-@@ -6394,6 +6396,8 @@ else $as_nop
-          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- 
-+#define static_assert _Static_assert
-+
-   template <typename T>
-     struct check
-     {
-diff --git a/lib/c-ares-1.19.0/m4/ax_cxx_compile_stdcxx_11.m4 b/lib/c-ares-1.19.0/m4/ax_cxx_compile_stdcxx_11.m4
-index 229de3091..fe4a11c67 100644
---- a/lib/c-ares-1.19.0/m4/ax_cxx_compile_stdcxx_11.m4
-+++ b/lib/c-ares-1.19.0/m4/ax_cxx_compile_stdcxx_11.m4
-@@ -37,6 +37,9 @@
- #serial 9
- 
- m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [[
-+
-+#define static_assert _Static_assert
-+
-   template <typename T>
-     struct check
-     {
--- 
-2.34.1
-
diff --git a/package/fluent-bit/0003-fix-build-without-C.patch b/package/fluent-bit/0003-fix-build-without-C.patch
deleted file mode 100644
index 0f0b239216..0000000000
--- a/package/fluent-bit/0003-fix-build-without-C.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-From f2aeca6fcc37bf22dd7307cab8fc9db6b53dd652 Mon Sep 17 00:00:00 2001
-From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-Date: Tue, 21 Feb 2023 00:09:57 +0100
-Subject: [PATCH] fix build without C++
-
-Fix the following build failure without C++:
-
--- Check for working CXX compiler: /usr/bin/c++ - broken
-CMake Error at /home/autobuild/autobuild/instance-15/output-1/per-package/fluent-bit/host/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:62 (message):
-  The C++ compiler
-
-    "/usr/bin/c++"
-
-  is not able to compile a simple test program.
-
-  It fails with the following output:
-
-    Change Dir: /home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp
-
-    Run Build Command(s):/home/autobuild/make/make -f Makefile cmTC_bfb29/fast && make[1]: Entering directory '/home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp'
-    /home/autobuild/make/make  -f CMakeFiles/cmTC_bfb29.dir/build.make CMakeFiles/cmTC_bfb29.dir/build
-    make[2]: Entering directory '/home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp'
-    Building CXX object CMakeFiles/cmTC_bfb29.dir/testCXXCompiler.cxx.o
-    /usr/bin/c++ --sysroot=/home/autobuild/autobuild/instance-15/output-1/per-package/fluent-bit/host/xtensa-buildroot-linux-uclibc/sysroot   -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -mlongcalls -mauto-litpools -O2 -g0  -fcommon -U_FILE_OFFSET_BITS  -g -fPIE -o CMakeFiles/cmTC_bfb29.dir/testCXXCompiler.cxx.o -c /home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
-    c++: error: unrecognized command-line option '-mlongcalls'
-    c++: error: unrecognized command-line option '-mauto-litpools'
-    make[2]: *** [CMakeFiles/cmTC_bfb29.dir/build.make:78: CMakeFiles/cmTC_bfb29.dir/testCXXCompiler.cxx.o] Error 1
-    make[2]: Leaving directory '/home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp'
-    make[1]: *** [Makefile:127: cmTC_bfb29/fast] Error 2
-    make[1]: Leaving directory '/home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp'
-
-  CMake will not be able to correctly generate this project.
-Call Stack (most recent call first):
-  lib/msgpack-c/CMakeLists.txt:2 (project)
-
-Fixes:
- - http://autobuild.buildroot.org/results/4b0f90d79d6dbbf976acf1da839260b0ee94ddda
-
-Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-[Upstream status: https://github.com/fluent/fluent-bit/pull/6893]
----
- lib/chunkio/CMakeLists.txt          | 2 +-
- lib/lwrb/CMakeLists.txt             | 2 +-
- lib/msgpack-c/CMakeLists.txt        | 2 +-
- lib/onigmo/CMakeLists.txt           | 2 +-
- lib/snappy-fef67ac/CMakeLists.txt   | 2 +-
- lib/tutf8e/CMakeLists.txt           | 2 +-
- src/stream_processor/CMakeLists.txt | 2 +-
- 7 files changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/lib/chunkio/CMakeLists.txt b/lib/chunkio/CMakeLists.txt
-index 233bce35c..8bfe5199d 100644
---- a/lib/chunkio/CMakeLists.txt
-+++ b/lib/chunkio/CMakeLists.txt
-@@ -1,5 +1,5 @@
- cmake_minimum_required(VERSION 3.0)
--project(chunk-io)
-+project(chunk-io C)
- 
- set(CIO_VERSION_MAJOR  1)
- set(CIO_VERSION_MINOR  4)
-diff --git a/lib/lwrb/CMakeLists.txt b/lib/lwrb/CMakeLists.txt
-index 2fabd6319..031cbc1dd 100644
---- a/lib/lwrb/CMakeLists.txt
-+++ b/lib/lwrb/CMakeLists.txt
-@@ -1,7 +1,7 @@
- cmake_minimum_required(VERSION 3.0)
- 
- # Setup project
--project(LwLibPROJECT)
-+project(LwLibPROJECT C)
- 
- # -------------------------------------------------
- # This CMakeLists.txt is used only if it is a top-level file.
-diff --git a/lib/msgpack-c/CMakeLists.txt b/lib/msgpack-c/CMakeLists.txt
-index 810ad609a..ffbbc5ddb 100644
---- a/lib/msgpack-c/CMakeLists.txt
-+++ b/lib/msgpack-c/CMakeLists.txt
-@@ -1,5 +1,5 @@
- cmake_minimum_required(VERSION 2.8)
--project(msgpack-c)
-+project(msgpack-c C)
- 
- set(src
-     src/objectc.c
-diff --git a/lib/onigmo/CMakeLists.txt b/lib/onigmo/CMakeLists.txt
-index 4a3b30d7d..66865130a 100644
---- a/lib/onigmo/CMakeLists.txt
-+++ b/lib/onigmo/CMakeLists.txt
-@@ -1,5 +1,5 @@
- cmake_minimum_required(VERSION 3.4)
--project(onigmo)
-+project(onigmo C)
- 
- # Onigmo Version
- set(ONIGMO_VERSION_MAJOR  6)
-diff --git a/lib/snappy-fef67ac/CMakeLists.txt b/lib/snappy-fef67ac/CMakeLists.txt
-index 8bb1e9598..ae9225c49 100644
---- a/lib/snappy-fef67ac/CMakeLists.txt
-+++ b/lib/snappy-fef67ac/CMakeLists.txt
-@@ -1,5 +1,5 @@
- cmake_minimum_required(VERSION 2.8)
--project(snappy-c)
-+project(snappy-c C)
- 
- set(CMAKE_POSITION_INDEPENDENT_CODE ON)
- 
-diff --git a/lib/tutf8e/CMakeLists.txt b/lib/tutf8e/CMakeLists.txt
-index 35cbe01ad..a056ef83c 100644
---- a/lib/tutf8e/CMakeLists.txt
-+++ b/lib/tutf8e/CMakeLists.txt
-@@ -1,5 +1,5 @@
- cmake_minimum_required(VERSION 2.8)
--project(tutf8e)
-+project(tutf8e C)
- 
- # Not supported: -std=c90 (lacks support for inline)
- # Supported:     -std=gnu90, -std=c99 or -std=gnu99
-diff --git a/src/stream_processor/CMakeLists.txt b/src/stream_processor/CMakeLists.txt
-index 8c5d70d13..de2c2fe38 100644
---- a/src/stream_processor/CMakeLists.txt
-+++ b/src/stream_processor/CMakeLists.txt
-@@ -1,4 +1,4 @@
--project(stream-processor)
-+project(stream-processor C)
- 
- include_directories(${CMAKE_CURRENT_SOURCE_DIR})
- 
--- 
-2.39.1
-
diff --git a/package/fluent-bit/fluent-bit.hash b/package/fluent-bit/fluent-bit.hash
index d60531438a..ec55038f3a 100644
--- a/package/fluent-bit/fluent-bit.hash
+++ b/package/fluent-bit/fluent-bit.hash
@@ -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
diff --git a/package/fluent-bit/fluent-bit.mk b/package/fluent-bit/fluent-bit.mk
index 319815f056..a6080b0aab 100644
--- a/package/fluent-bit/fluent-bit.mk
+++ b/package/fluent-bit/fluent-bit.mk
@@ -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
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v2 2/4] package/fluent-bit: use the system provided LuaJIT
  2023-06-10 13:32 [Buildroot] [PATCH v2 1/4] package/fluent-bit: bump to version 2.1.4 Thomas Devoogdt
@ 2023-06-10 13:32 ` Thomas Devoogdt
  2023-06-10 13:32 ` [Buildroot] [PATCH v2 3/4] package/fluent-bit: drop cxx handling Thomas Devoogdt
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 14+ messages in thread
From: Thomas Devoogdt @ 2023-06-10 13:32 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Devoogdt

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.

Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
---
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

diff --git a/package/fluent-bit/0001-build-use-the-system-provided-LuaJIT-if-found.patch b/package/fluent-bit/0001-build-use-the-system-provided-LuaJIT-if-found.patch
new file mode 100644
index 0000000000..9f6f4d0ebb
--- /dev/null
+++ b/package/fluent-bit/0001-build-use-the-system-provided-LuaJIT-if-found.patch
@@ -0,0 +1,62 @@
+From 4f8eb7bb5a39d83374806928b7a5b622136ef055 Mon Sep 17 00:00:00 2001
+From: Thomas Devoogdt <thomas@devoogdt.com>
+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 <thomas@devoogdt.com>
+---
+ 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
+
diff --git a/package/fluent-bit/fluent-bit.mk b/package/fluent-bit/fluent-bit.mk
index a6080b0aab..2949c5cdd0 100644
--- a/package/fluent-bit/fluent-bit.mk
+++ b/package/fluent-bit/fluent-bit.mk
@@ -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)
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v2 3/4] package/fluent-bit: drop cxx handling
  2023-06-10 13:32 [Buildroot] [PATCH v2 1/4] package/fluent-bit: bump to version 2.1.4 Thomas Devoogdt
  2023-06-10 13:32 ` [Buildroot] [PATCH v2 2/4] package/fluent-bit: use the system provided LuaJIT Thomas Devoogdt
@ 2023-06-10 13:32 ` Thomas Devoogdt
  2023-06-10 13:32 ` [Buildroot] [PATCH v2 4/4] package/fluent-bit: rework wasm handling Thomas Devoogdt
  2023-07-23  9:23 ` [Buildroot] [PATCH v3 1/4] package/fluent-bit: bump to version 2.1.7 Thomas Devoogdt
  3 siblings, 0 replies; 14+ messages in thread
From: Thomas Devoogdt @ 2023-06-10 13:32 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Devoogdt

Fluent-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.

Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
---
v2: No change.
---
 package/fluent-bit/fluent-bit.mk | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/package/fluent-bit/fluent-bit.mk b/package/fluent-bit/fluent-bit.mk
index 2949c5cdd0..9df34efd78 100644
--- a/package/fluent-bit/fluent-bit.mk
+++ b/package/fluent-bit/fluent-bit.mk
@@ -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 \
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v2 4/4] package/fluent-bit: rework wasm handling
  2023-06-10 13:32 [Buildroot] [PATCH v2 1/4] package/fluent-bit: bump to version 2.1.4 Thomas Devoogdt
  2023-06-10 13:32 ` [Buildroot] [PATCH v2 2/4] package/fluent-bit: use the system provided LuaJIT Thomas Devoogdt
  2023-06-10 13:32 ` [Buildroot] [PATCH v2 3/4] package/fluent-bit: drop cxx handling Thomas Devoogdt
@ 2023-06-10 13:32 ` Thomas Devoogdt
  2023-07-23  9:23 ` [Buildroot] [PATCH v3 1/4] package/fluent-bit: bump to version 2.1.7 Thomas Devoogdt
  3 siblings, 0 replies; 14+ messages in thread
From: Thomas Devoogdt @ 2023-06-10 13:32 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Devoogdt

Fluent-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]: OK

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....

Fix see: https://github.com/bytecodealliance/wasm-micro-runtime/issues/625

>> 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.

Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
---
v2: No change.
---
 package/fluent-bit/Config.in     | 25 -------------------------
 package/fluent-bit/fluent-bit.mk | 32 ++++++++++++++++++++++++++++++--
 2 files changed, 30 insertions(+), 27 deletions(-)

diff --git a/package/fluent-bit/Config.in b/package/fluent-bit/Config.in
index bfdea895b0..dc477e9f39 100644
--- a/package/fluent-bit/Config.in
+++ b/package/fluent-bit/Config.in
@@ -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
diff --git a/package/fluent-bit/fluent-bit.mk b/package/fluent-bit/fluent-bit.mk
index 9df34efd78..46f7c603b5 100644
--- a/package/fluent-bit/fluent-bit.mk
+++ b/package/fluent-bit/fluent-bit.mk
@@ -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
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v3 1/4] package/fluent-bit: bump to version 2.1.7
  2023-06-10 13:32 [Buildroot] [PATCH v2 1/4] package/fluent-bit: bump to version 2.1.4 Thomas Devoogdt
                   ` (2 preceding siblings ...)
  2023-06-10 13:32 ` [Buildroot] [PATCH v2 4/4] package/fluent-bit: rework wasm handling Thomas Devoogdt
@ 2023-07-23  9:23 ` Thomas Devoogdt
  2023-07-23  9:23   ` [Buildroot] [PATCH v3 2/4] package/fluent-bit: use the system provided LuaJIT Thomas Devoogdt
                     ` (3 more replies)
  3 siblings, 4 replies; 14+ messages in thread
From: Thomas Devoogdt @ 2023-07-23  9:23 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Devoogdt, Thomas Petazzoni

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/7253

So the old patches can be dropped.

Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
---
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

diff --git a/.checkpackageignore b/.checkpackageignore
index 5fcb292629..b9265ae2e4 100644
--- a/.checkpackageignore
+++ b/.checkpackageignore
@@ -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
diff --git a/package/fluent-bit/0001-lib-cfl-fixup-static_assert.patch b/package/fluent-bit/0001-lib-cfl-fixup-static_assert.patch
deleted file mode 100644
index 19dab7cac6..0000000000
--- a/package/fluent-bit/0001-lib-cfl-fixup-static_assert.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From e4f825dd9e952f4a056bf89342049e67102ae6bb Mon Sep 17 00:00:00 2001
-From: Thomas Devoogdt <thomas.devoogdt@barco.com>
-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 <thomas.devoogdt@barco.com>
----
- 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
-
diff --git a/package/fluent-bit/0002-lib-c-ares-fixup-static_assert.patch b/package/fluent-bit/0002-lib-c-ares-fixup-static_assert.patch
deleted file mode 100644
index d9b918ea8a..0000000000
--- a/package/fluent-bit/0002-lib-c-ares-fixup-static_assert.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From f55f9bf6d9201169d2e5d3782068b03ff17dec90 Mon Sep 17 00:00:00 2001
-From: Thomas Devoogdt <thomas.devoogdt@barco.com>
-Date: Wed, 1 Feb 2023 11:26:56 +0100
-Subject: [PATCH] lib: c-ares: fixup static_assert
-
-"undefined reference to 'static_assert'"
-
-Not defined when using uClibc or if not C++ >= 11.
-
-upstream: https://github.com/c-ares/c-ares/issues/504
-
-Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
----
- lib/c-ares-1.19.0/configure                      | 4 ++++
- lib/c-ares-1.19.0/m4/ax_cxx_compile_stdcxx_11.m4 | 3 +++
- 2 files changed, 7 insertions(+)
-
-diff --git a/lib/c-ares-1.19.0/configure b/lib/c-ares-1.19.0/configure
-index 4c5e1a966..58712ec34 100755
---- a/lib/c-ares-1.19.0/configure
-+++ b/lib/c-ares-1.19.0/configure
-@@ -6317,6 +6317,8 @@ else $as_nop
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- 
-+#define static_assert _Static_assert
-+
-   template <typename T>
-     struct check
-     {
-@@ -6394,6 +6396,8 @@ else $as_nop
-          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- 
-+#define static_assert _Static_assert
-+
-   template <typename T>
-     struct check
-     {
-diff --git a/lib/c-ares-1.19.0/m4/ax_cxx_compile_stdcxx_11.m4 b/lib/c-ares-1.19.0/m4/ax_cxx_compile_stdcxx_11.m4
-index 229de3091..fe4a11c67 100644
---- a/lib/c-ares-1.19.0/m4/ax_cxx_compile_stdcxx_11.m4
-+++ b/lib/c-ares-1.19.0/m4/ax_cxx_compile_stdcxx_11.m4
-@@ -37,6 +37,9 @@
- #serial 9
- 
- m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [[
-+
-+#define static_assert _Static_assert
-+
-   template <typename T>
-     struct check
-     {
--- 
-2.34.1
-
diff --git a/package/fluent-bit/0003-fix-build-without-C.patch b/package/fluent-bit/0003-fix-build-without-C.patch
deleted file mode 100644
index 0f0b239216..0000000000
--- a/package/fluent-bit/0003-fix-build-without-C.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-From f2aeca6fcc37bf22dd7307cab8fc9db6b53dd652 Mon Sep 17 00:00:00 2001
-From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-Date: Tue, 21 Feb 2023 00:09:57 +0100
-Subject: [PATCH] fix build without C++
-
-Fix the following build failure without C++:
-
--- Check for working CXX compiler: /usr/bin/c++ - broken
-CMake Error at /home/autobuild/autobuild/instance-15/output-1/per-package/fluent-bit/host/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:62 (message):
-  The C++ compiler
-
-    "/usr/bin/c++"
-
-  is not able to compile a simple test program.
-
-  It fails with the following output:
-
-    Change Dir: /home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp
-
-    Run Build Command(s):/home/autobuild/make/make -f Makefile cmTC_bfb29/fast && make[1]: Entering directory '/home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp'
-    /home/autobuild/make/make  -f CMakeFiles/cmTC_bfb29.dir/build.make CMakeFiles/cmTC_bfb29.dir/build
-    make[2]: Entering directory '/home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp'
-    Building CXX object CMakeFiles/cmTC_bfb29.dir/testCXXCompiler.cxx.o
-    /usr/bin/c++ --sysroot=/home/autobuild/autobuild/instance-15/output-1/per-package/fluent-bit/host/xtensa-buildroot-linux-uclibc/sysroot   -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -mlongcalls -mauto-litpools -O2 -g0  -fcommon -U_FILE_OFFSET_BITS  -g -fPIE -o CMakeFiles/cmTC_bfb29.dir/testCXXCompiler.cxx.o -c /home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
-    c++: error: unrecognized command-line option '-mlongcalls'
-    c++: error: unrecognized command-line option '-mauto-litpools'
-    make[2]: *** [CMakeFiles/cmTC_bfb29.dir/build.make:78: CMakeFiles/cmTC_bfb29.dir/testCXXCompiler.cxx.o] Error 1
-    make[2]: Leaving directory '/home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp'
-    make[1]: *** [Makefile:127: cmTC_bfb29/fast] Error 2
-    make[1]: Leaving directory '/home/autobuild/autobuild/instance-15/output-1/build/fluent-bit-2.0.9/CMakeFiles/CMakeTmp'
-
-  CMake will not be able to correctly generate this project.
-Call Stack (most recent call first):
-  lib/msgpack-c/CMakeLists.txt:2 (project)
-
-Fixes:
- - http://autobuild.buildroot.org/results/4b0f90d79d6dbbf976acf1da839260b0ee94ddda
-
-Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-[Upstream status: https://github.com/fluent/fluent-bit/pull/6893]
----
- lib/chunkio/CMakeLists.txt          | 2 +-
- lib/lwrb/CMakeLists.txt             | 2 +-
- lib/msgpack-c/CMakeLists.txt        | 2 +-
- lib/onigmo/CMakeLists.txt           | 2 +-
- lib/snappy-fef67ac/CMakeLists.txt   | 2 +-
- lib/tutf8e/CMakeLists.txt           | 2 +-
- src/stream_processor/CMakeLists.txt | 2 +-
- 7 files changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/lib/chunkio/CMakeLists.txt b/lib/chunkio/CMakeLists.txt
-index 233bce35c..8bfe5199d 100644
---- a/lib/chunkio/CMakeLists.txt
-+++ b/lib/chunkio/CMakeLists.txt
-@@ -1,5 +1,5 @@
- cmake_minimum_required(VERSION 3.0)
--project(chunk-io)
-+project(chunk-io C)
- 
- set(CIO_VERSION_MAJOR  1)
- set(CIO_VERSION_MINOR  4)
-diff --git a/lib/lwrb/CMakeLists.txt b/lib/lwrb/CMakeLists.txt
-index 2fabd6319..031cbc1dd 100644
---- a/lib/lwrb/CMakeLists.txt
-+++ b/lib/lwrb/CMakeLists.txt
-@@ -1,7 +1,7 @@
- cmake_minimum_required(VERSION 3.0)
- 
- # Setup project
--project(LwLibPROJECT)
-+project(LwLibPROJECT C)
- 
- # -------------------------------------------------
- # This CMakeLists.txt is used only if it is a top-level file.
-diff --git a/lib/msgpack-c/CMakeLists.txt b/lib/msgpack-c/CMakeLists.txt
-index 810ad609a..ffbbc5ddb 100644
---- a/lib/msgpack-c/CMakeLists.txt
-+++ b/lib/msgpack-c/CMakeLists.txt
-@@ -1,5 +1,5 @@
- cmake_minimum_required(VERSION 2.8)
--project(msgpack-c)
-+project(msgpack-c C)
- 
- set(src
-     src/objectc.c
-diff --git a/lib/onigmo/CMakeLists.txt b/lib/onigmo/CMakeLists.txt
-index 4a3b30d7d..66865130a 100644
---- a/lib/onigmo/CMakeLists.txt
-+++ b/lib/onigmo/CMakeLists.txt
-@@ -1,5 +1,5 @@
- cmake_minimum_required(VERSION 3.4)
--project(onigmo)
-+project(onigmo C)
- 
- # Onigmo Version
- set(ONIGMO_VERSION_MAJOR  6)
-diff --git a/lib/snappy-fef67ac/CMakeLists.txt b/lib/snappy-fef67ac/CMakeLists.txt
-index 8bb1e9598..ae9225c49 100644
---- a/lib/snappy-fef67ac/CMakeLists.txt
-+++ b/lib/snappy-fef67ac/CMakeLists.txt
-@@ -1,5 +1,5 @@
- cmake_minimum_required(VERSION 2.8)
--project(snappy-c)
-+project(snappy-c C)
- 
- set(CMAKE_POSITION_INDEPENDENT_CODE ON)
- 
-diff --git a/lib/tutf8e/CMakeLists.txt b/lib/tutf8e/CMakeLists.txt
-index 35cbe01ad..a056ef83c 100644
---- a/lib/tutf8e/CMakeLists.txt
-+++ b/lib/tutf8e/CMakeLists.txt
-@@ -1,5 +1,5 @@
- cmake_minimum_required(VERSION 2.8)
--project(tutf8e)
-+project(tutf8e C)
- 
- # Not supported: -std=c90 (lacks support for inline)
- # Supported:     -std=gnu90, -std=c99 or -std=gnu99
-diff --git a/src/stream_processor/CMakeLists.txt b/src/stream_processor/CMakeLists.txt
-index 8c5d70d13..de2c2fe38 100644
---- a/src/stream_processor/CMakeLists.txt
-+++ b/src/stream_processor/CMakeLists.txt
-@@ -1,4 +1,4 @@
--project(stream-processor)
-+project(stream-processor C)
- 
- include_directories(${CMAKE_CURRENT_SOURCE_DIR})
- 
--- 
-2.39.1
-
diff --git a/package/fluent-bit/fluent-bit.hash b/package/fluent-bit/fluent-bit.hash
index d60531438a..7e2059109a 100644
--- a/package/fluent-bit/fluent-bit.hash
+++ b/package/fluent-bit/fluent-bit.hash
@@ -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
diff --git a/package/fluent-bit/fluent-bit.mk b/package/fluent-bit/fluent-bit.mk
index 319815f056..6cfa601614 100644
--- a/package/fluent-bit/fluent-bit.mk
+++ b/package/fluent-bit/fluent-bit.mk
@@ -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
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v3 2/4] package/fluent-bit: use the system provided LuaJIT
  2023-07-23  9:23 ` [Buildroot] [PATCH v3 1/4] package/fluent-bit: bump to version 2.1.7 Thomas Devoogdt
@ 2023-07-23  9:23   ` Thomas Devoogdt
  2023-07-23  9:23   ` [Buildroot] [PATCH v3 3/4] package/fluent-bit: drop cxx handling Thomas Devoogdt
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 14+ messages in thread
From: Thomas Devoogdt @ 2023-07-23  9:23 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Devoogdt, Thomas Petazzoni

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.

Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
---
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

diff --git a/package/fluent-bit/0001-build-use-the-system-provided-LuaJIT-if-found.patch b/package/fluent-bit/0001-build-use-the-system-provided-LuaJIT-if-found.patch
new file mode 100644
index 0000000000..9f6f4d0ebb
--- /dev/null
+++ b/package/fluent-bit/0001-build-use-the-system-provided-LuaJIT-if-found.patch
@@ -0,0 +1,62 @@
+From 4f8eb7bb5a39d83374806928b7a5b622136ef055 Mon Sep 17 00:00:00 2001
+From: Thomas Devoogdt <thomas@devoogdt.com>
+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 <thomas@devoogdt.com>
+---
+ 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
+
diff --git a/package/fluent-bit/fluent-bit.mk b/package/fluent-bit/fluent-bit.mk
index 6cfa601614..b26ec2b0b6 100644
--- a/package/fluent-bit/fluent-bit.mk
+++ b/package/fluent-bit/fluent-bit.mk
@@ -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)
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v3 3/4] package/fluent-bit: drop cxx handling
  2023-07-23  9:23 ` [Buildroot] [PATCH v3 1/4] package/fluent-bit: bump to version 2.1.7 Thomas Devoogdt
  2023-07-23  9:23   ` [Buildroot] [PATCH v3 2/4] package/fluent-bit: use the system provided LuaJIT Thomas Devoogdt
@ 2023-07-23  9:23   ` Thomas Devoogdt
  2023-07-23  9:23   ` [Buildroot] [PATCH v3 4/4] package/fluent-bit: rework wasm handling Thomas Devoogdt
  2023-07-23 10:01   ` [Buildroot] [PATCH v3 1/4] package/fluent-bit: bump to version 2.1.7 Thomas Petazzoni via buildroot
  3 siblings, 0 replies; 14+ messages in thread
From: Thomas Devoogdt @ 2023-07-23  9:23 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Devoogdt, Thomas Petazzoni

Fluent-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.

Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
---
v2: No change.
v3: No change.
---
 package/fluent-bit/fluent-bit.mk | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/package/fluent-bit/fluent-bit.mk b/package/fluent-bit/fluent-bit.mk
index b26ec2b0b6..cd8f347768 100644
--- a/package/fluent-bit/fluent-bit.mk
+++ b/package/fluent-bit/fluent-bit.mk
@@ -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 \
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v3 4/4] package/fluent-bit: rework wasm handling
  2023-07-23  9:23 ` [Buildroot] [PATCH v3 1/4] package/fluent-bit: bump to version 2.1.7 Thomas Devoogdt
  2023-07-23  9:23   ` [Buildroot] [PATCH v3 2/4] package/fluent-bit: use the system provided LuaJIT Thomas Devoogdt
  2023-07-23  9:23   ` [Buildroot] [PATCH v3 3/4] package/fluent-bit: drop cxx handling Thomas Devoogdt
@ 2023-07-23  9:23   ` Thomas Devoogdt
  2023-07-23 10:06     ` Thomas Petazzoni via buildroot
  2023-07-24 12:04     ` [Buildroot] [PATCH v4] " Thomas Devoogdt
  2023-07-23 10:01   ` [Buildroot] [PATCH v3 1/4] package/fluent-bit: bump to version 2.1.7 Thomas Petazzoni via buildroot
  3 siblings, 2 replies; 14+ messages in thread
From: Thomas Devoogdt @ 2023-07-23  9:23 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Devoogdt, Thomas Petazzoni

Fluent-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]: OK

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....

Fix see: https://github.com/bytecodealliance/wasm-micro-runtime/issues/625

>> 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.

Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
---
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(-)

diff --git a/package/fluent-bit/Config.in b/package/fluent-bit/Config.in
index bfdea895b0..dc477e9f39 100644
--- a/package/fluent-bit/Config.in
+++ b/package/fluent-bit/Config.in
@@ -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
diff --git a/package/fluent-bit/fluent-bit.mk b/package/fluent-bit/fluent-bit.mk
index cd8f347768..c863e62fdb 100644
--- a/package/fluent-bit/fluent-bit.mk
+++ b/package/fluent-bit/fluent-bit.mk
@@ -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
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v3 1/4] package/fluent-bit: bump to version 2.1.7
  2023-07-23  9:23 ` [Buildroot] [PATCH v3 1/4] package/fluent-bit: bump to version 2.1.7 Thomas Devoogdt
                     ` (2 preceding siblings ...)
  2023-07-23  9:23   ` [Buildroot] [PATCH v3 4/4] package/fluent-bit: rework wasm handling Thomas Devoogdt
@ 2023-07-23 10:01   ` Thomas Petazzoni via buildroot
  3 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-07-23 10:01 UTC (permalink / raw)
  To: Thomas Devoogdt; +Cc: buildroot

Hello Thomas,

On Sun, 23 Jul 2023 11:23:11 +0200
Thomas Devoogdt <thomas@devoogdt.com> 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/7253
> 
> So the old patches can be dropped.
> 
> Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
> ---
> 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

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
-- 
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] 14+ messages in thread

* Re: [Buildroot] [PATCH v3 4/4] package/fluent-bit: rework wasm handling
  2023-07-23  9:23   ` [Buildroot] [PATCH v3 4/4] package/fluent-bit: rework wasm handling Thomas Devoogdt
@ 2023-07-23 10:06     ` Thomas Petazzoni via buildroot
  2023-07-24  8:29       ` Thomas Devoogdt
  2023-07-24 12:04     ` [Buildroot] [PATCH v4] " Thomas Devoogdt
  1 sibling, 1 reply; 14+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-07-23 10:06 UTC (permalink / raw)
  To: Thomas Devoogdt; +Cc: buildroot

Hello Thomas,

On Sun, 23 Jul 2023 11:23:14 +0200
Thomas Devoogdt <thomas@devoogdt.com> wrote:

> -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.

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?

> 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....
> 
> 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
-- 
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] 14+ messages in thread

* Re: [Buildroot] [PATCH v3 4/4] package/fluent-bit: rework wasm handling
  2023-07-23 10:06     ` Thomas Petazzoni via buildroot
@ 2023-07-24  8:29       ` Thomas Devoogdt
  2023-07-24  8:45         ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 14+ messages in thread
From: Thomas Devoogdt @ 2023-07-24  8:29 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Thomas Devoogdt, buildroot

Hi Thomas,

Op zo 23 jul 2023 om 12:06 schreef Thomas Petazzoni
<thomas.petazzoni@bootlin.com>:
>
> Hello Thomas,
>
> On Sun, 23 Jul 2023 11:23:14 +0200
> Thomas Devoogdt <thomas@devoogdt.com> wrote:
>
> > -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.
>
> 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.

> 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.

> > 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....
> >
> > 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?

The log indeed shows that there are two failures, but those are fixed
by setting the obscure WAMR_BUILD_INVOKE_NATIVE_GENERAL flag.

> 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.”

Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
_________________

kr,

Thomas Devoogdt
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v3 4/4] package/fluent-bit: rework wasm handling
  2023-07-24  8:29       ` Thomas Devoogdt
@ 2023-07-24  8:45         ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-07-24  8:45 UTC (permalink / raw)
  To: Thomas Devoogdt; +Cc: buildroot

Hello Thomas,

On Mon, 24 Jul 2023 10:29:45 +0200
Thomas Devoogdt <thomas@devoogdt.com> wrote:

> > 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à.

> > 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.

> 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

See above: no double maintenance is needed.

> 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.”

Thanks, this explanation looks good.

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] 14+ messages in thread

* [Buildroot] [PATCH v4] package/fluent-bit: rework wasm handling
  2023-07-23  9:23   ` [Buildroot] [PATCH v3 4/4] package/fluent-bit: rework wasm handling Thomas Devoogdt
  2023-07-23 10:06     ` Thomas Petazzoni via buildroot
@ 2023-07-24 12:04     ` Thomas Devoogdt
  2023-07-25 16:38       ` Thomas Petazzoni via buildroot
  1 sibling, 1 reply; 14+ messages in thread
From: Thomas Devoogdt @ 2023-07-24 12:04 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Devoogdt, Thomas Petazzoni

Fluent-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

Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
---
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(-)

diff --git a/package/fluent-bit/Config.in b/package/fluent-bit/Config.in
index bfdea895b0..9ffde5b315 100644
--- a/package/fluent-bit/Config.in
+++ b/package/fluent-bit/Config.in
@@ -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"
diff --git a/package/fluent-bit/fluent-bit.mk b/package/fluent-bit/fluent-bit.mk
index cd8f347768..1185860661 100644
--- a/package/fluent-bit/fluent-bit.mk
+++ b/package/fluent-bit/fluent-bit.mk
@@ -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
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v4] package/fluent-bit: rework wasm handling
  2023-07-24 12:04     ` [Buildroot] [PATCH v4] " Thomas Devoogdt
@ 2023-07-25 16:38       ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-07-25 16:38 UTC (permalink / raw)
  To: Thomas Devoogdt; +Cc: buildroot

On Mon, 24 Jul 2023 14:04:42 +0200
Thomas Devoogdt <thomas@devoogdt.com> wrote:

> Fluent-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
> 
> Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>

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] 14+ messages in thread

end of thread, other threads:[~2023-07-25 16:39 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-10 13:32 [Buildroot] [PATCH v2 1/4] package/fluent-bit: bump to version 2.1.4 Thomas Devoogdt
2023-06-10 13:32 ` [Buildroot] [PATCH v2 2/4] package/fluent-bit: use the system provided LuaJIT Thomas Devoogdt
2023-06-10 13:32 ` [Buildroot] [PATCH v2 3/4] package/fluent-bit: drop cxx handling Thomas Devoogdt
2023-06-10 13:32 ` [Buildroot] [PATCH v2 4/4] package/fluent-bit: rework wasm handling Thomas Devoogdt
2023-07-23  9:23 ` [Buildroot] [PATCH v3 1/4] package/fluent-bit: bump to version 2.1.7 Thomas Devoogdt
2023-07-23  9:23   ` [Buildroot] [PATCH v3 2/4] package/fluent-bit: use the system provided LuaJIT Thomas Devoogdt
2023-07-23  9:23   ` [Buildroot] [PATCH v3 3/4] package/fluent-bit: drop cxx handling Thomas Devoogdt
2023-07-23  9:23   ` [Buildroot] [PATCH v3 4/4] package/fluent-bit: rework wasm handling Thomas Devoogdt
2023-07-23 10:06     ` Thomas Petazzoni via buildroot
2023-07-24  8:29       ` Thomas Devoogdt
2023-07-24  8:45         ` Thomas Petazzoni via buildroot
2023-07-24 12:04     ` [Buildroot] [PATCH v4] " Thomas Devoogdt
2023-07-25 16:38       ` Thomas Petazzoni via buildroot
2023-07-23 10:01   ` [Buildroot] [PATCH v3 1/4] package/fluent-bit: bump to version 2.1.7 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