Skip to content
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

Building dependency rdkafka with cmake-build feature fails #138

Open
JorritSalverda opened this issue Feb 18, 2022 · 1 comment
Open

Building dependency rdkafka with cmake-build feature fails #138

JorritSalverda opened this issue Feb 18, 2022 · 1 comment
Assignees
Labels

Comments

@JorritSalverda
Copy link

What did you try to do?

I'm trying to build a Lambda function in Rust to write to Kafka using the rdkafka crate as follows:

[dependencies]
rdkafka = { version = "0.28.0", features = ["ssl-vendored", "gssapi-vendored", "libz-static", "cmake-build"] }

I'm building it using ekidd/rust-musl-builder:1.57.0 with apt-get package libsasl2-dev installed before running cargo build --release --target x86_64-unknown-linux-musl.

What happened?

However that fails with the following error:

running: "cmake" "--build" "." "--target" "install" "--config" "Release" "--parallel" "4"

  --- stderr
  Building and linking librdkafka statically
  CMake Warning:
    Manually-specified variables were not used by the project:

      CMAKE_ASM_COMPILER
      CMAKE_ASM_FLAGS


  Unknown argument --parallel
  Unknown argument 4
  Usage: cmake --build <dir> [options] [-- [native-options]]
  Options:
    <dir>          = Project binary directory to be built.
    --target <tgt> = Build <tgt> instead of default targets.
                     May only be specified once.
    --config <cfg> = For multi-configuration tools, choose <cfg>.
    --clean-first  = Build target 'clean' first, then build.
                     (To clean only, use --target 'clean'.)
    --use-stderr   = Ignored.  Behavior is default in CMake >= 3.0.
    --             = Pass remaining options to the native tool.
  thread 'main' panicked at '
  command did not execute successfully, got: exit status: 1

  build script failed, must exit now', /home/rust/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.48/src/lib.rs:975:5

The cmake-build feature makes it include the cmake crate version 0.1.48, which then apparently issues this unsupported flag.

What did you hope to happen?

Build a statically linked binary with security.protocol=SASL_SSL used to connect to Kafka (on confluent.io)

@0xDjole
Copy link

0xDjole commented Dec 14, 2022

@JorritSalverda Were you able to fix this? I have the same issue. Im thinking of switching libraries.

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

No branches or pull requests

3 participants