Skip to content
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

Pointing my cargo.toml to the latest GIT gives an error #1377

Closed
proofrock opened this issue Aug 12, 2023 · 4 comments
Closed

Pointing my cargo.toml to the latest GIT gives an error #1377

proofrock opened this issue Aug 12, 2023 · 4 comments

Comments

@proofrock
Copy link

Hi!
I tried to declare the current main repo as my dependency:

[dependencies]
rusqlite = { git = "https://github.com/rusqlite/rusqlite" }

but it gives the error below (even after a cargo clean). Am I doing something wrong?

Thanks for your work,

-- G.

error: failed to select a version for `libsqlite3-sys`.
    ... required by package `rusqlite v0.29.0`
    ... which satisfies dependency `rusqlite = "^0.29"` (locked to 0.29.0) of package `serde_rusqlite v0.33.1`
    ... which satisfies dependency `serde_rusqlite = "~0"` (locked to 0.33.1) of package `sqliterg v0.0.0 (/home/mano/sqliterg)`
versions that meet the requirements `^0.26.0` (locked to 0.26.0) are: 0.26.0

the package `libsqlite3-sys` links to the native library `sqlite3`, but it conflicts with a previous package which links to `sqlite3` as well:
package `libsqlite3-sys v0.26.0 (https://github.com/rusqlite/rusqlite#e093d7db)`
    ... which satisfies git dependency `libsqlite3-sys` of package `rusqlite v0.29.0 (https://github.com/rusqlite/rusqlite#e093d7db)`
    ... which satisfies git dependency `rusqlite` of package `sqliterg v0.0.0 (/home/mano/sqliterg)`
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 ='libsqlite3-sys' value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.

failed to select a version for `libsqlite3-sys` which could resolve this conflict
@gwenn
Copy link
Collaborator

gwenn commented Aug 13, 2023

Cannot reproduce:

cargo new rusqlite-dep-git
cd rusqlite-dep-git
cargo add --git https://github.com/rusqlite/rusqlite rusqlite
cargo run

@proofrock
Copy link
Author

It cannot be denied that you're right. I'll try "bisect" my cargo.toml to see if there's some kind of interference with other packages.

@proofrock
Copy link
Author

Ah, of course. It interferes with serde_rusqlite, that imports rusqlite itself... I don't know much yet about dependency trees, I think the best thing in the long term would be to avoid using the util library, I'll work towards that. Thanks for taking the time to try end reproduce!

@proofrock
Copy link
Author

Works like a charm. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants