Comments (9)
I made a new branch, dyn_lib
, that will check whether the right version of librdkafka is installed and if that's the case will link it dynamically. I've tested on my ubuntu machine and it seems to work.
Please let me know if it works on yours as well.
from rust-rdkafka.
It bundles librdkafka 0.9.5, as stated in the readme. The git commands are actually fairly common in other libraries as well (see libgit2-sys for example), and the SHA is defined by the git submodule, currently pinned to 0d540ab4e78a3e36.
It's common for other Rust wrappers to check if the C library is installed on the system first, and compile from sources if that's not the case. However in case of librdkafka is unlikely to be already installed on the system, and to have the latest version (the one we normally target).
I can give it a try on Arch and see if there are ways to make it work. Suggestions are welcome! :)
from rust-rdkafka.
I'll appreciate if you check my system first, or use a feature. It's likely to be there where people develop kafka tools.
I dug a little further, and found that it's the build script of rdkafka that requires static lz4 no matter what. (Fortunately it doesn't require static openssl things as I though previously.) It's strange that the AUR package builds fine for me (and link to dynamic lz4).
FYI, replacing lz4 with a custom build is dangerous for Arch users because systemd stuff (among a lot others) depends on it, and it's known to break compatibility without bumping soname version (so when it breaks you won't know by checking statically).
from rust-rdkafka.
The branch works well on my Arch.
from rust-rdkafka.
I also use Arch and was experiencing the same issue. I tried the dyn_lib
branch with success.
Unfortunately, when specifying rust-rdkafka
as a dependency in a project pointing to the git repo and using the dyn_lib
branch, it still tried to compile and fails.
I'm still trying to figure out why.
from rust-rdkafka.
The error I was getting was this one, and using the env variable described here fixed it: https://github.com/alexcrichton/pkg-config-rs/blob/3cf9b12d06b2991cb3af2218d413539b0f62b2a7/src/lib.rs#L144
from rust-rdkafka.
Thanks! Do you think there is anything we can add to the documentation for the next person that will run into the same issue? Or maybe in the build code?
from rust-rdkafka.
The dyn_lib
branch has been merged to master.
from rust-rdkafka.
@fede1024 I don't think anything more should be changed in the code, but I don't fully understand this pkg-config
cross compilation thing so I can't recommend something yet.
Thanks for the work on this PR.
from rust-rdkafka.
Related Issues (20)
- Add TLS support to rdkafka crate HOT 2
- did it have a methed called 'fetch_consumer_group_offsets' ?
- Client fails to reconnect to kafka once the kafka broker restarts or down and comes back up
- Emit kafka C library logs as tracing events HOT 5
- `StreamConsumer` not waking HOT 1
- Implement `std::convert::From<anyhow::Error>` for `rdkafka::error::KafkaError`
- Question - Why is only Consumer's session timed out? HOT 1
- Failed compile with `cmake-build` on windows11
- BaseProducer Poll and Flush no longer clearing queue after `Move to Event-based API` commit
- Nothing gets consumed from at_least_once example
- FromBytes impl for u8 should have no error case
- TopicPartitionList::elements violates unsafe precondition in slice::from_raw_parts_mut
- No stats being printed to logs HOT 1
- Unable to run example simple consumer
- How to batch insert headers? HOT 3
- how to use Dockerfile to build image of rust-kafka HOT 1
- Enable the development of custom consumers HOT 4
- Config values can contain null characters resulting to panic HOT 3
- rustls support
- Failed to retrieve OIDC token from Let's Encrypt https endpoint HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust-rdkafka.