pingora icon indicating copy to clipboard operation
pingora copied to clipboard

zstd-sys incompatible version

Open samdvr opened this issue 11 months ago • 6 comments

Describe the bug

Cannot build the project due to zstd-sys conflict

Pingora info

Please include the following information about your environment:

Pingora version: 0.0.1 Rust version: i.e. cargo --version 1.76.0 Operating system version: Apple Silicon

Steps to reproduce

add this to cargo.toml

pingora = { version = "0.1.0", features = ["pingora-proxy"] }

cargo build Updating crates.io index error: failed to select a version for zstd-sys. ... required by package zstd-safe v4.1.1+zstd.1.5.0 ... which satisfies dependency zstd-safe = "=4.1.1" of package zstd v0.9.0+zstd.1.5.0 ... which satisfies dependency zstd = "^0.9.0" of package pingora-header-serde v0.1.0 ... which satisfies dependency pingora-header-serde = "^0.1.0" of package pingora-cache v0.1.0 ... which satisfies dependency pingora-cache = "^0.1.0" of package pingora-proxy v0.1.0 ... which satisfies dependency pingora-proxy = "^0.1.0" of package pingora v0.1.0 ... which satisfies dependency pingora = "^0.1.0" (locked to 0.1.0) of package load_balancer v0.1.0 (/load_balancer) versions that meet the requirements =1.6.1 are: 1.6.1+zstd.1.5.0

the package zstd-sys links to the native library zstd, but it conflicts with a previous package which links to zstd as well: package zstd-sys v2.0.9+zstd.1.5.5 ... which satisfies dependency zstd-sys = "^2.0.9" (locked to 2.0.9+zstd.1.5.5) of package load_balancer v0.1.0 (/Users/sam/Documents/RustProjects/load_balancer) Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the links = "zstd" value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.

samdvr avatar Feb 29 '24 03:02 samdvr

How did you solve this? I'm currently having the same issue on a Ubuntu 23.10 machine

AMacedoP avatar Mar 02 '24 15:03 AMacedoP

when I add the dependencies explicitly in Cargo.toml it works not through cargo add

[dependencies]
async-trait = "0.1.77"
pingora = { version = "0.1.0", features = [
  "pingora-proxy",
  "pingora-load-balancing",
  "lb",
] }

Seems to be an ordering issue on adding dependencies

samdvr avatar Mar 02 '24 16:03 samdvr

Well, in my machine it's still failing after adding the explicit dependecies. I'll have to wait until this is resolved before trying pingora

AMacedoP avatar Mar 03 '24 20:03 AMacedoP

I'm currently having the same issue on a macOS 14.3.1(mbp M3 ) machine.

pdap avatar Mar 06 '24 06:03 pdap

Delete your Cargo.lock file after changing Pingora's feature list and rebuild. That should work. Not ideal but it'll unblock you all.

Note: you also need to have cmake installed.

foo4u avatar Mar 06 '24 14:03 foo4u

Delete your Cargo.lock file after changing Pingora's feature list and rebuild. That should work. Not ideal but it'll unblock you all.

Note: you also need to have cmake installed.

thanks,it works for me

pdap avatar Mar 12 '24 03:03 pdap

Delete your Cargo.lock file after changing Pingora's feature list and rebuild. That should work. Not ideal but it'll unblock you all.

Note: you also need to have cmake installed.

thank you, also worked for me

esemeniuc avatar Jun 23 '24 17:06 esemeniuc

This question has been stale for a week. It will be closed in an additional day if not updated.

github-actions[bot] avatar Jul 06 '24 01:07 github-actions[bot]

This issue has been closed because it has been stalled with no activity.

github-actions[bot] avatar Jul 07 '24 01:07 github-actions[bot]