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

error: multiple packages link to native library sqlite3, but a native library can be linked only once #6

Open
sbrl opened this issue Mar 28, 2020 · 5 comments

Comments

@sbrl
Copy link

sbrl commented Mar 28, 2020

If I try to install this package like this:

schemamama = "*"
schemamama_rusqlite = "*"
# This is the latest version
rusqlite = "0.21.0"

....I get this error message when compiling:

error: multiple packages link to native library `sqlite3`, but a native library can be linked only once

package `libsqlite3-sys v0.4.0`
    ... which is depended on by `rusqlite v0.6.1`
    ... which is depended on by `schemamama_rusqlite v0.5.0`
    ... which is depended on by `wopplebloxd v0.1.0 (/home/sbrl/Documents/code/rust/woppleblox/wopplebloxd)`
links to native library `sqlite3`

package `libsqlite3-sys v0.17.1`
    ... which is depended on by `rusqlite v0.21.0`
    ... which is depended on by `wopplebloxd v0.1.0 (/home/sbrl/Documents/code/rust/woppleblox/wopplebloxd)`
also links to native library `sqlite3`
[Finished running. Exit status: 101]

If I use the (extremely) old version 0.2.0 as the documentation suggests of rusqlite, I get a very similar error too :-/

@flipsasser
Copy link

@sbrl did you ever find a schema library that's been updated w/the latest Rusqlite versions?

@cmsd2
Copy link
Owner

cmsd2 commented Jan 15, 2021

apologies.
i'm not sure i have a good long term solution for this apart from try harder to keep releasing versions whenever rusqlite upgrades to a new libsqlite3-sys.
for now i've pushed a version 0.8.0 which depends on rusqlite 0.24.2

@flipsasser
Copy link

@cmsd2 no apology needed! You put something awesome into the world, for free. I just had a newer dependency. Thanks for the quick fix and for doing any of this in the first place!

@sbrl
Copy link
Author

sbrl commented Jan 31, 2021

Hey there! Sorry I haven't replied. I ended up giving up on Rust completely, due to a whole slew of issues that kept popping up over and over and over again.

I haven't yet gotten back to the project that I originally wanted to use Rust for, but when I do it's unlikely to be in Rust unfortunately.

Edit: It sounds like Rust itself needs a better way of managing multiple versions of the same package.

@flipsasser
Copy link

@sbrl thanks for the reply! I'm curious what eventually drove you away, and what you chose as an alternative, if anything?

I personally found the learning curve w/the borrowing system in particular to be pretty steep. Once I got over that, I enjoyed the journey a little more. Borrowing still caused weird headaches from time-to-time, but most of the issues I had were related to an argument parsing crate that believes pointers to be the only acceptable input. Sigh.

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

3 participants