Skip to content

Require a minimum of CMake 3.5 compatibility for librdkafka build. #766

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wesc
Copy link

@wesc wesc commented Apr 2, 2025

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.

@vkill
Copy link

vkill commented Apr 12, 2025

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.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants