Skip to contentSkip to conversation

package/librdkafka: bump to v2.16.0

PATCH Applied Thomas Devoogdt 2 participants 2 messages Oct 24

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/librdkafka: bump to v2.16.0

News: https://github.com/confluentinc/librdkafka/releases#release-v2.16.0

Dropped 0002-src-rdkafka_conf.c-fix-curl-curl.h-include-when-WITH.patch, fix merged in https://github.com/confluentinc/librdkafka/pull/5136.

Refreshed 0001-CMakeLists.txt-allow-compilation-without-C-support.patch (upstream: https://github.com/confluentinc/librdkafka/pull/5311).

Added 0002-Guard-fenv.h-usage-behind-HAVE_FENV-5650.patch, as fenv.h is not available on uClibc toolchains without FENV support, which broke the build since v2.16.0:
fatal error: fenv.h: No such file or directory
Reported in https://github.com/confluentinc/librdkafka/issues/5650,
fix proposed in https://github.com/confluentinc/librdkafka/pull/5651.

---
 ...-allow-compilation-without-C-support.patch |  36 ++--
 ...d-fenv.h-usage-behind-HAVE_FENV-5650.patch | 158 ++++++++++++++++++
 ....c-fix-curl-curl.h-include-when-WITH.patch |  32 ----
 package/librdkafka/librdkafka.hash            |   4 +-
 package/librdkafka/librdkafka.mk              |   2 +-
 5 files changed, 185 insertions(+), 47 deletions(-)
 create mode 100644 package/librdkafka/0002-Guard-fenv.h-usage-behind-HAVE_FENV-5650.patch
 delete mode 100644 package/librdkafka/0002-src-rdkafka_conf.c-fix-curl-curl.h-include-when-WITH.patch
package/librdkafka/0001-CMakeLists.txt-allow-compilation-without-C-support.patch +24 -12
index 9615aef408c..d38d60bdea3 100644
@@ -1,19 +1,25 @@
-From 4584734fc039e06dea71c94045283f3108c7fae8 Mon Sep 17 00:00:00 2001
+From 184ab88b6911e128319ae5ee75b6a7444af2982e Mon Sep 17 00:00:00 2001
 From: Thomas Devoogdt <[email protected]>
 Date: Sun, 15 Feb 2026 20:41:10 +0100
 Subject: [PATCH] CMakeLists.txt: allow compilation without C++ support
 
-$ CXX=/bin/false cmake . && make
+Only require a C compiler by default, and enable C++ only when a C++
+compiler is found (check_language). When it is missing, skip src-cpp,
+the C++ examples and the tests (which need C++), and default
+RDKAFKA_BUILD_TESTS to OFF. Explicitly enabling the tests without a C++
+compiler is a configure error.
+
+Verified with: CXX=/bin/false cmake . && make
 
 Upstream: https://github.com/confluentinc/librdkafka/pull/5311
 Signed-off-by: Thomas Devoogdt <[email protected]>
 ---
- CMakeLists.txt          | 25 ++++++++++++++++++++-----
+ CMakeLists.txt          | 30 +++++++++++++++++++++++++-----
  examples/CMakeLists.txt | 30 ++++++++++++++++++++----------
- 2 files changed, 40 insertions(+), 15 deletions(-)
+ 2 files changed, 45 insertions(+), 15 deletions(-)
 
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index f3d05bad..7676f897 100644
+index 1e3c4450..c9c65c2e 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
 @@ -3,7 +3,15 @@ cmake_minimum_required(VERSION 3.5)
@@ -33,16 +39,21 @@ index f3d05bad..7676f897 100644
  
  set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/packaging/cmake/Modules/")
  
-@@ -181,7 +189,7 @@ endif()
+@@ -181,7 +189,12 @@ endif()
  
  option(RDKAFKA_BUILD_STATIC "Build static rdkafka library" OFF)
  option(RDKAFKA_BUILD_EXAMPLES "Build examples" ON)
 -option(RDKAFKA_BUILD_TESTS "Build tests" ON)
-+option(RDKAFKA_BUILD_TESTS "Build tests" CMAKE_CXX_COMPILER)
++if(CMAKE_CXX_COMPILER)
++  set(build_tests_default ON)
++else()
++  set(build_tests_default OFF)
++endif()
++option(RDKAFKA_BUILD_TESTS "Build tests" ${build_tests_default})
  if(WIN32)
      option(WITHOUT_WIN32_CONFIG "Avoid including win32_config.h on cmake builds" ON)
  endif(WIN32)
-@@ -279,13 +287,20 @@ install(
+@@ -279,13 +292,20 @@ install(
  )
  
  add_subdirectory(src)
@@ -63,11 +74,11 @@ index f3d05bad..7676f897 100644
 +    enable_testing()
 +    add_subdirectory(tests)
 +  else()
-+    message(FATAL_ERROR "Building tests needs C++ suport")
++    message(FATAL_ERROR "Building tests needs C++ support")
 +  endif()
  endif()
 diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
-index 91851d2c..28ce6e79 100644
+index d9ce7ac2..a71cd136 100644
 --- a/examples/CMakeLists.txt
 +++ b/examples/CMakeLists.txt
 @@ -5,8 +5,10 @@ endif(WIN32)
@@ -110,7 +121,7 @@ index 91851d2c..28ce6e79 100644
  
  add_executable(misc misc.c ${win32_sources})
  target_link_libraries(misc PUBLIC rdkafka)
-@@ -73,7 +81,9 @@ if(NOT WIN32)
+@@ -73,8 +81,10 @@ if(NOT WIN32)
      add_executable(rdkafka_complex_consumer_example rdkafka_complex_consumer_example.c)
      target_link_libraries(rdkafka_complex_consumer_example PUBLIC rdkafka)
  
@@ -121,7 +132,8 @@ index 91851d2c..28ce6e79 100644
 +        target_link_libraries(kafkatest_verifiable_client PUBLIC rdkafka++)
 +    endif(CMAKE_CXX_COMPILER)
  
- endif(NOT WIN32)
+     add_executable(share_consumer share_consumer.c)
+     target_link_libraries(share_consumer PUBLIC rdkafka)
 -- 
 2.43.0
 
package/librdkafka/0002-Guard-fenv.h-usage-behind-HAVE_FENV-5650.patch new file +158 -0

158 lines not on this page · raw message

package/librdkafka/0002-src-rdkafka_conf.c-fix-curl-curl.h-include-when-WITH.patch deleted +0 -32
deleted file mode 100644
index dec80d538c9..00000000000
@@ -1,32 +0,0 @@
-From 5061a5b33dce11ada740e2a34137dce6934b731a Mon Sep 17 00:00:00 2001
-From: Thomas Devoogdt <[email protected]>
-Date: Sun, 15 Feb 2026 18:37:16 +0100
-Subject: [PATCH] src/rdkafka_conf.c: fix curl/curl.h include when
- WITH_CURL=OFF
-
-Change #ifdef to #if for WITH_OAUTHBEARER_OIDC preprocessor check.
-When using CMake's cmakedefine01, the macro is always defined (as 0 or 1),
-so #ifdef always evaluates to true. Using #if correctly checks the value.
-
-Upstream: https://github.com/confluentinc/librdkafka/pull/5309
-Signed-off-by: Thomas Devoogdt <[email protected]>
----
- src/rdkafka_conf.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/rdkafka_conf.c b/src/rdkafka_conf.c
-index 0e346e74..f8f0d0ca 100644
---- a/src/rdkafka_conf.c
-+++ b/src/rdkafka_conf.c
-@@ -56,7 +56,7 @@
- #include <windows.h>
- #endif
- 
--#ifdef WITH_OAUTHBEARER_OIDC
-+#if WITH_OAUTHBEARER_OIDC
- #include <curl/curl.h>
- #endif
- 
--- 
-2.43.0
-
package/librdkafka/librdkafka.hash +2 -2
index f745e55b819..aea35f7412b 100644
@@ -1,4 +1,4 @@
-# From https://github.com/confluentinc/librdkafka/releases/tag/v2.13.2
-sha256  14972092e4115f6e99f798a7cb420cbf6daa0c73502b3c52ae42fb5b418eea8f  librdkafka-2.13.2.tar.gz
+# From https://github.com/confluentinc/librdkafka/releases/tag/v2.16.0
+sha256  e6b61de61d3282879a88e4ee3d9f634a8b05bf78a9198dfc25c4820c0c9ed231  librdkafka-2.16.0.tar.gz
 # Locally computed
 sha256  b9e4616bb9dd0c9ce3fa52e81c7bfc596e60b8855a1df5dce5fa50732b1ccdec  LICENSES.txt
package/librdkafka/librdkafka.mk +1 -1
index 0cbab11d496..636765b3f5d 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LIBRDKAFKA_VERSION = 2.13.2
+LIBRDKAFKA_VERSION = 2.16.0
 LIBRDKAFKA_SITE = $(call github,confluentinc,librdkafka,v$(LIBRDKAFKA_VERSION))
 LIBRDKAFKA_LICENSE = BSD-2-Clause
 LIBRDKAFKA_LICENSE_FILES = LICENSES.txt
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 8 lines · Thomas Devoogdt

News: https://github.com/confluentinc/librdkafka/releases#release-v2.16.0

Dropped 0002-src-rdkafka_conf.c-fix-curl-curl.h-include-when-WITH.patch, fix merged in https://github.com/confluentinc/librdkafka/pull/5136.

Refreshed 0001-CMakeLists.txt-allow-compilation-without-C-support.patch (upstream: https://github.com/confluentinc/librdkafka/pull/5311).

Quoted 8 lines

Added 0002-Guard-fenv.h-usage-behind-HAVE_FENV-5650.patch, as fenv.h is not available on uClibc toolchains without FENV support, which broke the build since v2.16.0:
fatal error: fenv.h: No such file or directory
Reported in https://github.com/confluentinc/librdkafka/issues/5650,
fix proposed in https://github.com/confluentinc/librdkafka/pull/5651.

Applied to master, thanks!

Best regards,

Thomas Petazzoni

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot