Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upMultiple packages link to native library sqlite3 #1703
Comments
This comment has been minimized.
|
|
weiznich
closed this
May 18, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hanckmann commentedMay 18, 2018
Versions
Feature Flags
[dependencies]
...
diesel = { version = "1.0.0", features = ["sqlite"] }
diesel_codegen = { version = "*", features = ["sqlite"] }
Problem Description
The build failes with the following message:
λ ~/Projects/zen-api/ master* cargo build
error: multiple packages link to native library
sqlite3, but a native library can be linked only oncepackage
libsqlite3-sys v0.9.1... which is depended on by
diesel v1.2.2... which is depended on by
zen-api v0.1.0 (file:///Users/patrick/Projects/zen-api)links to native library
sqlite3package
libsqlite3-sys v0.8.1... which is depended on by
diesel v0.16.0... which is depended on by
diesel_infer_schema v0.16.0... which is depended on by
diesel_codegen v0.16.0... which is depended on by
zen-api v0.1.0 (file:///Users/patrick/Projects/zen-api)also links to native library
sqlite3What are you trying to accomplish?
I am using diesel with rocket and serde. Basically following this tutorial: https://medium.com/sean3z/building-a-restful-crud-api-with-rust-1867308352d8
The only thing I fundamentally changed is the database, as I am using sqlite. My db.rs is taken from: https://github.com/SergioBenitez/Rocket/blob/d4e590af83097c275e76550950156e9ce30a048f/examples/todo/src/db.rs
and: https://github.com/SergioBenitez/Rocket/blob/d4e590af83097c275e76550950156e9ce30a048f/examples/todo/src/main.rs
What is the expected output?
I expect the code to compile.
What is the actual output?
The error as presented above.
Are you seeing any additional errors?
Nope
Steps to reproduce
I do not mind to share my code. However, I doubt the usefullness of doing this at this moment. I guess this is a relatively easy question for you... for me... these are my first steps into rust (and hence into diesel). If the codebase does help, please let me know and I will send it.
Also, I am not sure why I require nightly (the tutorial tells me to do so). Could the issue be in this part?