-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Description
When using rquest
with datafusion
, a dependency conflict occurs because both crates depend on libraries that link to the native lzma
library.
Steps to Reproduce
- Create a new Rust project:
cargo new reproduce_conflict cd reproduce_conflict
- Cargo.toml:
[package] name = "reproduce_conflict" version = "0.1.0" edition = "2024" [dependencies] rquest = { version = "3.0.5", features = ["full"] } datafusion = "46.0.1"
- Run
cargo run
Actual Behavior:
error: failed to select a version for `xz2`.
... required by package `datafusion v46.0.1`
... which satisfies dependency `datafusion = "^46.0.1"` of package `reproduce_conflict v0.1.0 (/path/to/reproduce_conflict)`
versions that meet the requirements `^0.1` are: 0.1.7, 0.1.6, 0.1.5, 0.1.4, 0.1.3, 0.1.2, 0.1.1, 0.1.0
the package `xz2` links to the native library `lzma`, but it conflicts with a previous package which links to `lzma` as well:
package `datafusion-datasource v46.0.1`
... which satisfies dependency `datafusion-datasource = "^46.0.1"` of package `datafusion v46.0.1`
... which satisfies dependency `datafusion = "^46.0.1"` of package `reproduce_conflict v0.1.0 (/path/to/reproduce_conflict)`
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 = "lzma"` value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.
the package `datafusion` depends on `xz2`, with features: `static` but `xz2` does not have these features.
all possible versions conflict with previously selected packages.
previously selected package `async-compression v0.4.21`
... which satisfies dependency `async-compression = "^0.4.20"` of package `rquest v3.0.5`
... which satisfies dependency `rquest = "^3.0.5"` of package `reproduce_conflict v0.1.0 (/path/to/reproduce_conflict)`
failed to select a version for `xz2` which could resolve this conflict
Is there any way to resolve this conflict to build this successfully?
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working