-
Notifications
You must be signed in to change notification settings - Fork 287
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
Error linking libzstd.so on ubuntu 19.04 #125
Comments
adding a build.rs file with
and adding to Cargo.toml in the package section:
makes it work, but I think there should be a better solution |
I just ran into a similar issue when trying to use rust-rdkafka as a dependency on an archlinux system. e.g.
I couldn't fix this with a to fix it i had to set |
Running into this on macos mojave as well. the build.rs solution fixed it. |
On macOS I was able to get around this by adding the following to a [target.x86_64-apple-darwin]
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
] I assume one might try a similar technique in linux. Maybe replace the flags above to just:
|
Thanks, @marianoguerra. You saved the day. I have to add "static" to make it work in my case, though.
|
Is it possible to somehow link it to zstd-sys? |
For Archlinux you need to install |
0efbcf3 Fixes this for me! |
Urgh, it's unfortunate that we're now forcing everyone to take a dependency on libzstd. This is actually an upstream problem, as librdkafka's build system forces you to depend on libzstd: confluentinc/librdkafka#2305. Once that lands I'd like to put the support for libzstd behind a feature flag, unless someone objects. |
For those following along: confluentinc/librdkafka#2305 has landed, so as soon as that makes it into an upstream release, we can make zstd support conditional. |
Since #163, zstd support is now properly conditional. Closing this out, as there's nothing left to do! |
building this repo or a project with it as a dependency on ubuntu 19.04 I get this error:
if I copy the command in
note:
and add"-lzstd"
it seems to linkfrom
to
here is a Dockerfile to reproduce:
then
it seems for some reason it doesn't find libzstd
I tried creating symbolic links in /usr/local/lib just in case but it didn't work.
The text was updated successfully, but these errors were encountered: