rust-rdkafka icon indicating copy to clipboard operation
rust-rdkafka copied to clipboard

Require a minimum of CMake 3.5 compatibility for librdkafka build.

Open wesc opened this issue 9 months ago • 1 comments

The most recent CMake (released March 28, 2025) drops 3.2 compatibility, which the version of librdkafka in rdkafka-sys (2.3.0) depends on. Recent versions of librdkafka increase the min cmake version to 3.5. Rather than upgrade rdkafka-sys to a new librdkafka or patch that source, this PR simply specifies a new min CMake version in the build.rs file.

To check that it's working, you can just run cargo build --features cmake-build, which fails on head in master.

wesc avatar Apr 02 '25 19:04 wesc

P.S. Compatibility with versions of CMake older than 3.5 has been removed. in CMake 4.0 https://cmake.org/cmake/help/latest/release/4.0.html#deprecated-and-removed-features

So we see this error

  --- stderr
  Building and linking librdkafka statically
  CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 3.5 has been removed from CMake.

    Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
    to tell CMake that the project requires at least <min> but has been updated
    to work with policies introduced by <max> or earlier.

    Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.


vkill avatar Apr 12 '25 17:04 vkill

👋 can you cut a new release per this PR merge?

chenrui333 avatar Jun 30 '25 00:06 chenrui333

Release 0.38.0 has been published.

fede1024 avatar Jul 05 '25 10:07 fede1024