Skip to contentSkip to conversation

package/fluent-bit: build fix for toolchains w/o CXX

PATCH Applied Thomas Perale via buildroot 2 participants 4 messages Jun 7, 2025 – Jun 12, 2025 Zstd

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/fluent-bit: build fix for toolchains w/o CXX

Since the package bump [1] the fluent-bit package started to fail because of an update introduced in fluent-bit v3.2.7 (see [2]).

The following error appeared on the autobuilder in the LTS branch.

```
CMake Error at /home/buildroot/instance-0/output-1/host/share/cmake-3.31/Modules/CMakeTestCXXCompiler.cmake:73 (message):
  The C++ compiler

    "/bin/false"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: '/home/buildroot/instance-0/output-1/build/fluent-bit-3.2.10/CMakeFiles/CMakeScratch/TryCompile-u4rLgc'

    Run Build Command(s): /home/buildroot/instance-0/output-1/host/bin/ninja -v cmTC_71bbf
    [1/2] /bin/false    -o CMakeFiles/cmTC_71bbf.dir/testCXXCompiler.cxx.o -c /home/buildroot/instance-0/output-1/build/fluent-bit-3.2.10/CMakeFiles/CMakeScratch/TryCompile-u4rLgc/testCXXCompiler.cxx
    FAILED: CMakeFiles/cmTC_71bbf.dir/testCXXCompiler.cxx.o
    /bin/false    -o CMakeFiles/cmTC_71bbf.dir/testCXXCompiler.cxx.o -c /home/buildroot/instance-0/output-1/build/fluent-bit-3.2.10/CMakeFiles/CMakeScratch/TryCompile-u4rLgc/testCXXCompiler.cxx
    ninja: build stopped: subcommand failed.

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  lib/zstd-1.5.7/build/cmake/CMakeLists.txt:36 (project)
```

The commit [3] included two patches to fix the build error for configs using toolchains without CXX.

Since the build error was already present on v3.2.10, those patches actually fix the error for LTS version as well. This patch pick them from the series to apply them on the LTS branch.

[1] 8bc18fad29 package/fluent-bit: bump to 3.2.10
[2] https://github.com/fluent/fluent-bit/commit/0ce59cecdc3c3f8053bebe9d5d9ef7b30fc6c4e6
[3] 8181727e23 package/fluent-bit: bump to 4.0.0

---
 ...able-CXX-support-if-tests-are-requir.patch | 34 +++++++++++++++++++
 ...-lib-miniz-only-require-a-C-compiler.patch | 27 +++++++++++++++
 2 files changed, 61 insertions(+)
 create mode 100644 package/fluent-bit/0006-lib-zstd-only-enable-CXX-support-if-tests-are-requir.patch
 create mode 100644 package/fluent-bit/0007-lib-miniz-only-require-a-C-compiler.patch
package/fluent-bit/0006-lib-zstd-only-enable-CXX-support-if-tests-are-requir.patch new file +34 -0
new file mode 100644
index 0000000000..f7b282165c
@@ -0,0 +1,34 @@
+From b6d898185d441e00acad867c0c80aadf4d7b0d37 Mon Sep 17 00:00:00 2001
+From: Thomas Devoogdt <[email protected]>
+Date: Tue, 1 Apr 2025 22:43:30 +0200
+Subject: [PATCH] lib: zstd: only enable CXX support if tests are required
+
+Upstream: https://github.com/facebook/zstd/pull/4357/files
+Signed-off-by: Thomas Devoogdt <[email protected]>
+---
+ lib/zstd-1.5.7/build/cmake/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/zstd-1.5.7/build/cmake/CMakeLists.txt b/lib/zstd-1.5.7/build/cmake/CMakeLists.txt
+index 347d41c0f..70e233df3 100644
+--- a/lib/zstd-1.5.7/build/cmake/CMakeLists.txt
++++ b/lib/zstd-1.5.7/build/cmake/CMakeLists.txt
+@@ -37,7 +37,6 @@ project(zstd
+   VERSION "${ZSTD_FULL_VERSION}"
+   LANGUAGES C   # Main library is in C
+             ASM # And ASM
+-            CXX # Testing contributed code also utilizes CXX
+   )
+ 
+ message(STATUS "ZSTD VERSION: ${zstd_VERSION}")
+@@ -170,6 +169,7 @@ if (ZSTD_BUILD_PROGRAMS)
+ endif ()
+ 
+ if (ZSTD_BUILD_TESTS)
++    enable_language(CXX)
+     enable_testing()
+     if (NOT ZSTD_BUILD_STATIC)
+         message(SEND_ERROR "You need to build static library to build tests")
+-- 
+2.43.0
+
package/fluent-bit/0007-lib-miniz-only-require-a-C-compiler.patch new file +27 -0
new file mode 100644
index 0000000000..bfd32d6b68
@@ -0,0 +1,27 @@
+From 3732cea4bb3dd9b79732da7bfbf60258bc418195 Mon Sep 17 00:00:00 2001
+From: Thomas Devoogdt <[email protected]>
+Date: Tue, 1 Apr 2025 23:01:13 +0200
+Subject: [PATCH] lib: miniz: only require a C compiler
+
+Upstream: https://github.com/richgel999/miniz/pull/338
+Signed-off-by: Thomas Devoogdt <[email protected]>
+---
+ lib/miniz/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/miniz/CMakeLists.txt b/lib/miniz/CMakeLists.txt
+index ce6ade1c0..91012b36a 100644
+--- a/lib/miniz/CMakeLists.txt
++++ b/lib/miniz/CMakeLists.txt
+@@ -7,7 +7,7 @@ if(DEFINED PROJECT_NAME)
+ endif()
+ 
+ if(CMAKE_MINOR_VERSION LESS 12)
+-  project(miniz)
++  project(miniz C)
+   # see issue https://gitlab.kitware.com/cmake/cmake/merge_requests/1799
+ else()
+   project(miniz C)
+-- 
+2.43.0
+
Signature · 6 lines
2.39.5

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

Hi Thomas Devoogdt,

I didn't manage to reproduce the build error for the lib miniz. Can you confirm it occurs on the v3.2.10 as well.

Thanks.
PERALE Thomas

Quoted 113 lines · Thomas Perale

Since the package bump [1] the fluent-bit package started to fail because of an update introduced in fluent-bit v3.2.7 (see [2]).

The following error appeared on the autobuilder in the LTS branch.

```
CMake Error at /home/buildroot/instance-0/output-1/host/share/cmake-3.31/Modules/CMakeTestCXXCompiler.cmake:73 (message):
   The C++ compiler

     "/bin/false"

   is not able to compile a simple test program.

   It fails with the following output:

     Change Dir: '/home/buildroot/instance-0/output-1/build/fluent-bit-3.2.10/CMakeFiles/CMakeScratch/TryCompile-u4rLgc'

     Run Build Command(s): /home/buildroot/instance-0/output-1/host/bin/ninja -v cmTC_71bbf
     [1/2] /bin/false    -o CMakeFiles/cmTC_71bbf.dir/testCXXCompiler.cxx.o -c /home/buildroot/instance-0/output-1/build/fluent-bit-3.2.10/CMakeFiles/CMakeScratch/TryCompile-u4rLgc/testCXXCompiler.cxx
     FAILED: CMakeFiles/cmTC_71bbf.dir/testCXXCompiler.cxx.o
     /bin/false    -o CMakeFiles/cmTC_71bbf.dir/testCXXCompiler.cxx.o -c /home/buildroot/instance-0/output-1/build/fluent-bit-3.2.10/CMakeFiles/CMakeScratch/TryCompile-u4rLgc/testCXXCompiler.cxx
     ninja: build stopped: subcommand failed.

   CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
   lib/zstd-1.5.7/build/cmake/CMakeLists.txt:36 (project)
```

The commit [3] included two patches to fix the build error for configs using toolchains without CXX.

Since the build error was already present on v3.2.10, those patches actually fix the error for LTS version as well. This patch pick them from the series to apply them on the LTS branch.

[1] 8bc18fad29 package/fluent-bit: bump to 3.2.10
[2] https://github.com/fluent/fluent-bit/commit/0ce59cecdc3c3f8053bebe9d5d9ef7b30fc6c4e6
[3] 8181727e23 package/fluent-bit: bump to 4.0.0

---
  ...able-CXX-support-if-tests-are-requir.patch | 34 +++++++++++++++++++
  ...-lib-miniz-only-require-a-C-compiler.patch | 27 +++++++++++++++
  2 files changed, 61 insertions(+)

create mode 100644 package/fluent-bit/0006-lib-zstd-only-enable-CXX-support-if-tests-are-requir.patch create mode 100644 package/fluent-bit/0007-lib-miniz-only-require-a-C-compiler.patch

package/fluent-bit/0006-lib-zstd-only-enable-CXX-support-if-tests-are-requir.patch new file +34 -0
new file mode 100644
index 0000000000..f7b282165c
@@ -0,0 +1,34 @@
+From b6d898185d441e00acad867c0c80aadf4d7b0d37 Mon Sep 17 00:00:00 2001
+From: Thomas Devoogdt <[email protected]>
+Date: Tue, 1 Apr 2025 22:43:30 +0200
+Subject: [PATCH] lib: zstd: only enable CXX support if tests are required
+
+Upstream: https://github.com/facebook/zstd/pull/4357/files
+Signed-off-by: Thomas Devoogdt <[email protected]>
+---
+ lib/zstd-1.5.7/build/cmake/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/zstd-1.5.7/build/cmake/CMakeLists.txt b/lib/zstd-1.5.7/build/cmake/CMakeLists.txt
+index 347d41c0f..70e233df3 100644
+--- a/lib/zstd-1.5.7/build/cmake/CMakeLists.txt
++++ b/lib/zstd-1.5.7/build/cmake/CMakeLists.txt
+@@ -37,7 +37,6 @@ project(zstd
+   VERSION "${ZSTD_FULL_VERSION}"
+   LANGUAGES C   # Main library is in C
+             ASM # And ASM
+-            CXX # Testing contributed code also utilizes CXX
+   )
+
+ message(STATUS "ZSTD VERSION: ${zstd_VERSION}")
+@@ -170,6 +169,7 @@ if (ZSTD_BUILD_PROGRAMS)
+ endif ()
+
+ if (ZSTD_BUILD_TESTS)
++    enable_language(CXX)
+     enable_testing()
+     if (NOT ZSTD_BUILD_STATIC)
+         message(SEND_ERROR "You need to build static library to build tests")
+--
+2.43.0
+
package/fluent-bit/0007-lib-miniz-only-require-a-C-compiler.patch new file +17 -0
new file mode 100644
index 0000000000..bfd32d6b68
@@ -0,0 +1,27 @@
+From 3732cea4bb3dd9b79732da7bfbf60258bc418195 Mon Sep 17 00:00:00 2001
+From: Thomas Devoogdt <[email protected]>
+Date: Tue, 1 Apr 2025 23:01:13 +0200
+Subject: [PATCH] lib: miniz: only require a C compiler
+
+Upstream: https://github.com/richgel999/miniz/pull/338
+Signed-off-by: Thomas Devoogdt <[email protected]>
+---
+ lib/miniz/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/miniz/CMakeLists.txt b/lib/miniz/CMakeLists.txt
+index ce6ade1c0..91012b36a 100644
+--- a/lib/miniz/CMakeLists.txt
++++ b/lib/miniz/CMakeLists.txt
+@@ -7,7 +7,7 @@ if(DEFINED PROJECT_NAME)
+ endif()

package/fluent-bit/0007-lib-miniz-only-require-a-C-compiler.patch line 27

Quoted 10 lines
package/fluent-bit/0007-lib-miniz-only-require-a-C-compiler.patch new file +10 -0
+
+ if(CMAKE_MINOR_VERSION LESS 12)
+-  project(miniz)
++  project(miniz C)
+   # see issue https://gitlab.kitware.com/cmake/cmake/merge_requests/1799
+ else()
+   project(miniz C)
+--
+2.43.0
+

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

#2 lore raw

Hi Thomas, All,

I tried native compilation using these flags on v3.2.10:

CXX=/bin/false cmake -DCMAKE_INSTALL_PREFIX="/usr" -DCMAKE_INSTALL_RUNSTATEDIR="/run" -DCMAKE_COLOR_MAKEFILE=OFF -DBUILD_DOC=OFF -DBUILD_DOCS=OFF -DBUILD_EXAMPLE=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TEST=OFF -DBUILD_TESTS=OFF -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=ON -DFLB_DEBUG=No -DFLB_RELEASE=Yes -DFLB_SECURITY=No -DFLB_EXAMPLES=No -DFLB_CHUNK_TRACE=No -DFLB_PREFER_SYSTEM_LIB_CARES=Yes -DFLB_PREFER_SYSTEM_LIB_NGHTTP2=Yes -DFLB_WASM=No -DFLB_BACKTRACE=No -DFLB_JEMALLOC=No -DFLB_LUAJIT=No -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_SYSCONFDIR="/etc/" -DCMAKE_EXE_LINKER_FLAGS="-latomic" -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ../

(Just copied it from
https://autobuild.buildroot.org/results/4b0/4b0646e8fcc3f023ab0173ea8725f381e5055152/)

To get it compiled, I needed these commits, on a fresh checkout:

000c68c04 lib: librdkafka: only require a C compiler
(https://github.com/fluent/fluent-bit/pull/10341/commits/7bba635f38b5e11bb2e8c491755bb65e40376b6a)
13d25f1fc lib: zstd: only require a C compiler
(https://github.com/fluent/fluent-bit/pull/10316/commits/1a33abea23004b68098ccc964939f0ae12696999)
45cb424bc lib: miniz: only require a C compiler
(https://github.com/fluent/fluent-bit/commit/9db9746060ffafbf849e8ea253a70a5467f0e827)
--> So yes, miniz is needed to compile it!

So it makes sense to add a patch for zstd and miniz, given that there is already one for librdkafka.

Kr,

Thomas Devoogdt

Op za 7 jun 2025 om 13:47 schreef Thomas Perale <[email protected]>:

Quoted 125 lines

Hi Thomas Devoogdt,

I didn't manage to reproduce the build error for the lib miniz. Can you confirm it occurs on the v3.2.10 as well.

Thanks.
PERALE Thomas

Quoted 115 lines · Thomas Perale

Since the package bump [1] the fluent-bit package started to fail because of an update introduced in fluent-bit v3.2.7 (see [2]).

The following error appeared on the autobuilder in the LTS branch.

```
CMake Error at /home/buildroot/instance-0/output-1/host/share/cmake-3.31/Modules/CMakeTestCXXCompiler.cmake:73 (message):
   The C++ compiler

     "/bin/false"

   is not able to compile a simple test program.

   It fails with the following output:

     Change Dir: '/home/buildroot/instance-0/output-1/build/fluent-bit-3.2.10/CMakeFiles/CMakeScratch/TryCompile-u4rLgc'

     Run Build Command(s): /home/buildroot/instance-0/output-1/host/bin/ninja -v cmTC_71bbf
     [1/2] /bin/false    -o CMakeFiles/cmTC_71bbf.dir/testCXXCompiler.cxx.o -c /home/buildroot/instance-0/output-1/build/fluent-bit-3.2.10/CMakeFiles/CMakeScratch/TryCompile-u4rLgc/testCXXCompiler.cxx
     FAILED: CMakeFiles/cmTC_71bbf.dir/testCXXCompiler.cxx.o
     /bin/false    -o CMakeFiles/cmTC_71bbf.dir/testCXXCompiler.cxx.o -c /home/buildroot/instance-0/output-1/build/fluent-bit-3.2.10/CMakeFiles/CMakeScratch/TryCompile-u4rLgc/testCXXCompiler.cxx
     ninja: build stopped: subcommand failed.

   CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
   lib/zstd-1.5.7/build/cmake/CMakeLists.txt:36 (project)
```

The commit [3] included two patches to fix the build error for configs using toolchains without CXX.

Since the build error was already present on v3.2.10, those patches actually fix the error for LTS version as well. This patch pick them from the series to apply them on the LTS branch.

[1] 8bc18fad29 package/fluent-bit: bump to 3.2.10
[2] https://github.com/fluent/fluent-bit/commit/0ce59cecdc3c3f8053bebe9d5d9ef7b30fc6c4e6
[3] 8181727e23 package/fluent-bit: bump to 4.0.0

---
  ...able-CXX-support-if-tests-are-requir.patch | 34 +++++++++++++++++++
  ...-lib-miniz-only-require-a-C-compiler.patch | 27 +++++++++++++++
  2 files changed, 61 insertions(+)

create mode 100644 package/fluent-bit/0006-lib-zstd-only-enable-CXX-support-if-tests-are-requir.patch create mode 100644 package/fluent-bit/0007-lib-miniz-only-require-a-C-compiler.patch

package/fluent-bit/0006-lib-zstd-only-enable-CXX-support-if-tests-are-requir.patch new file +34 -0
new file mode 100644
index 0000000000..f7b282165c
@@ -0,0 +1,34 @@
+From b6d898185d441e00acad867c0c80aadf4d7b0d37 Mon Sep 17 00:00:00 2001
+From: Thomas Devoogdt <[email protected]>
+Date: Tue, 1 Apr 2025 22:43:30 +0200
+Subject: [PATCH] lib: zstd: only enable CXX support if tests are required
+
+Upstream: https://github.com/facebook/zstd/pull/4357/files
+Signed-off-by: Thomas Devoogdt <[email protected]>
+---
+ lib/zstd-1.5.7/build/cmake/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/zstd-1.5.7/build/cmake/CMakeLists.txt b/lib/zstd-1.5.7/build/cmake/CMakeLists.txt
+index 347d41c0f..70e233df3 100644
+--- a/lib/zstd-1.5.7/build/cmake/CMakeLists.txt
++++ b/lib/zstd-1.5.7/build/cmake/CMakeLists.txt
+@@ -37,7 +37,6 @@ project(zstd
+   VERSION "${ZSTD_FULL_VERSION}"
+   LANGUAGES C   # Main library is in C
+             ASM # And ASM
+-            CXX # Testing contributed code also utilizes CXX
+   )
+
+ message(STATUS "ZSTD VERSION: ${zstd_VERSION}")
+@@ -170,6 +169,7 @@ if (ZSTD_BUILD_PROGRAMS)
+ endif ()
+
+ if (ZSTD_BUILD_TESTS)
++    enable_language(CXX)
+     enable_testing()
+     if (NOT ZSTD_BUILD_STATIC)
+         message(SEND_ERROR "You need to build static library to build tests")
+--
+2.43.0
+
package/fluent-bit/0007-lib-miniz-only-require-a-C-compiler.patch new file +19 -0
new file mode 100644
index 0000000000..bfd32d6b68
@@ -0,0 +1,27 @@
+From 3732cea4bb3dd9b79732da7bfbf60258bc418195 Mon Sep 17 00:00:00 2001
+From: Thomas Devoogdt <[email protected]>
+Date: Tue, 1 Apr 2025 23:01:13 +0200
+Subject: [PATCH] lib: miniz: only require a C compiler
+
+Upstream: https://github.com/richgel999/miniz/pull/338
+Signed-off-by: Thomas Devoogdt <[email protected]>
+---
+ lib/miniz/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/miniz/CMakeLists.txt b/lib/miniz/CMakeLists.txt
+index ce6ade1c0..91012b36a 100644
+--- a/lib/miniz/CMakeLists.txt
++++ b/lib/miniz/CMakeLists.txt
+@@ -7,7 +7,7 @@ if(DEFINED PROJECT_NAME)
+ endif()
+
+ if(CMAKE_MINOR_VERSION LESS 12)
Quoted 9 lines

package/fluent-bit/0007-lib-miniz-only-require-a-C-compiler.patch line 27

Quoted 8 lines
package/fluent-bit/0007-lib-miniz-only-require-a-C-compiler.patch new file +8 -0
+-  project(miniz)
++  project(miniz C)
+   # see issue https://gitlab.kitware.com/cmake/cmake/merge_requests/1799
+ else()
+   project(miniz C)
+--
+2.43.0
+

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

#3 lore raw
In reply to Thomas Perale via buildroot
Quoted 36 lines · Thomas Perale via buildroot

Since the package bump [1] the fluent-bit package started to fail because of an update introduced in fluent-bit v3.2.7 (see [2]).

The following error appeared on the autobuilder in the LTS branch.

```
CMake Error at /home/buildroot/instance-0/output-1/host/share/cmake-3.31/Modules/CMakeTestCXXCompiler.cmake:73 (message):
   The C++ compiler

     "/bin/false"

   is not able to compile a simple test program.

   It fails with the following output:

     Change Dir: '/home/buildroot/instance-0/output-1/build/fluent-bit-3.2.10/CMakeFiles/CMakeScratch/TryCompile-u4rLgc'

     Run Build Command(s): /home/buildroot/instance-0/output-1/host/bin/ninja -v cmTC_71bbf
     [1/2] /bin/false    -o CMakeFiles/cmTC_71bbf.dir/testCXXCompiler.cxx.o -c /home/buildroot/instance-0/output-1/build/fluent-bit-3.2.10/CMakeFiles/CMakeScratch/TryCompile-u4rLgc/testCXXCompiler.cxx
     FAILED: CMakeFiles/cmTC_71bbf.dir/testCXXCompiler.cxx.o
     /bin/false    -o CMakeFiles/cmTC_71bbf.dir/testCXXCompiler.cxx.o -c /home/buildroot/instance-0/output-1/build/fluent-bit-3.2.10/CMakeFiles/CMakeScratch/TryCompile-u4rLgc/testCXXCompiler.cxx
     ninja: build stopped: subcommand failed.

   CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
   lib/zstd-1.5.7/build/cmake/CMakeLists.txt:36 (project)
```

The commit [3] included two patches to fix the build error for configs using toolchains without CXX.

Since the build error was already present on v3.2.10, those patches actually fix the error for LTS version as well. This patch pick them from the series to apply them on the LTS branch.

Quoted 7 lines

[1] 8bc18fad29 package/fluent-bit: bump to 3.2.10
[2] https://github.com/fluent/fluent-bit/commit/0ce59cecdc3c3f8053bebe9d5d9ef7b30fc6c4e6
[3] 8181727e23 package/fluent-bit: bump to 4.0.0

Applied to 2025.02.x, thanks.

Regards,
Arnout

Quoted 70 lines
---
  ...able-CXX-support-if-tests-are-requir.patch | 34 +++++++++++++++++++
  ...-lib-miniz-only-require-a-C-compiler.patch | 27 +++++++++++++++
  2 files changed, 61 insertions(+)

create mode 100644 package/fluent-bit/0006-lib-zstd-only-enable-CXX-support-if-tests-are-requir.patch create mode 100644 package/fluent-bit/0007-lib-miniz-only-require-a-C-compiler.patch

package/fluent-bit/0006-lib-zstd-only-enable-CXX-support-if-tests-are-requir.patch new file +34 -0
new file mode 100644
index 0000000000..f7b282165c
@@ -0,0 +1,34 @@
+From b6d898185d441e00acad867c0c80aadf4d7b0d37 Mon Sep 17 00:00:00 2001
+From: Thomas Devoogdt <[email protected]>
+Date: Tue, 1 Apr 2025 22:43:30 +0200
+Subject: [PATCH] lib: zstd: only enable CXX support if tests are required
+
+Upstream: https://github.com/facebook/zstd/pull/4357/files
+Signed-off-by: Thomas Devoogdt <[email protected]>
+---
+ lib/zstd-1.5.7/build/cmake/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/zstd-1.5.7/build/cmake/CMakeLists.txt b/lib/zstd-1.5.7/build/cmake/CMakeLists.txt
+index 347d41c0f..70e233df3 100644
+--- a/lib/zstd-1.5.7/build/cmake/CMakeLists.txt
++++ b/lib/zstd-1.5.7/build/cmake/CMakeLists.txt
+@@ -37,7 +37,6 @@ project(zstd
+   VERSION "${ZSTD_FULL_VERSION}"
+   LANGUAGES C   # Main library is in C
+             ASM # And ASM
+-            CXX # Testing contributed code also utilizes CXX
+   )
+
+ message(STATUS "ZSTD VERSION: ${zstd_VERSION}")
+@@ -170,6 +169,7 @@ if (ZSTD_BUILD_PROGRAMS)
+ endif ()
+
+ if (ZSTD_BUILD_TESTS)
++    enable_language(CXX)
+     enable_testing()
+     if (NOT ZSTD_BUILD_STATIC)
+         message(SEND_ERROR "You need to build static library to build tests")
+--
+2.43.0
+
package/fluent-bit/0007-lib-miniz-only-require-a-C-compiler.patch new file +17 -0
new file mode 100644
index 0000000000..bfd32d6b68
@@ -0,0 +1,27 @@
+From 3732cea4bb3dd9b79732da7bfbf60258bc418195 Mon Sep 17 00:00:00 2001
+From: Thomas Devoogdt <[email protected]>
+Date: Tue, 1 Apr 2025 23:01:13 +0200
+Subject: [PATCH] lib: miniz: only require a C compiler
+
+Upstream: https://github.com/richgel999/miniz/pull/338
+Signed-off-by: Thomas Devoogdt <[email protected]>
+---
+ lib/miniz/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/miniz/CMakeLists.txt b/lib/miniz/CMakeLists.txt
+index ce6ade1c0..91012b36a 100644
+--- a/lib/miniz/CMakeLists.txt
++++ b/lib/miniz/CMakeLists.txt
+@@ -7,7 +7,7 @@ if(DEFINED PROJECT_NAME)
+ endif()

package/fluent-bit/0007-lib-miniz-only-require-a-C-compiler.patch line 27

Quoted 10 lines
package/fluent-bit/0007-lib-miniz-only-require-a-C-compiler.patch new file +10 -0
+
+ if(CMAKE_MINOR_VERSION LESS 12)
+-  project(miniz)
++  project(miniz C)
+   # see issue https://gitlab.kitware.com/cmake/cmake/merge_requests/1799
+ else()
+   project(miniz C)
+--
+2.43.0
+

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