0xlearner opened a new issue, #15342:
URL: https://github.com/apache/datafusion/issues/15342

   ### 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
   1. Create a new Rust project:
      ```bash
      cargo new reproduce_conflict
      cd reproduce_conflict
   2. Cargo.toml:
        ```bash
        [package]
       name = "reproduce_conflict"
       version = "0.1.0"
       edition = "2024"
   
       [dependencies]
       rquest = { version = "3.0.5", features = ["full"] }
       datafusion = "46.0.1"
   
   3. 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?
   
   ### To Reproduce
   
   _No response_
   
   ### Expected behavior
   
   _No response_
   
   ### Additional context
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to