Compiling rocket with sync-db-pools for Alpine (musl) #2712
-
Hello Rocket community. Love the project, but i recently stumbled into an unfortunate problem. I'm currently in the progress of recompiling my Rocket project for Alpine Linux running in Docker. Everything worked great (Some minor issues with Diesel and Openssl) until i had to compile one of my binaries which uses the rocket_sync_db_pools library to pool my Diesel connections. It won't compile, no matter what i do.. I'm using clux/muslrust to compile the project, and have also opened an issue on their repo, because i needed some help. But now it is only this library that won't work. I get the following error:
After some trial and error, i've managed to create an MVP project that fails with the above error, when compiled using the muslrust docker-image: Cargo.toml [package]
name = "pq-test"
version = "0.1.0"
edition = "2021"
[dependencies]
rocket = { version = "0.5.0", features = ["json"] }
rocket_sync_db_pools = { version = "0.1.0", features = ["diesel_postgres_pool"] }
diesel = { version = "2.1.4", features = ["postgres"] }
openssl = { version = "0.10.34", features = ["vendored"] } main.rs #[macro_use]
extern crate rocket;
extern crate openssl;
extern crate diesel;
use rocket_sync_db_pools::database;
/// A connection pool for the Hipster database
#[database("hipster")]
pub struct Pool(diesel::PgConnection);
#[rocket::main]
async fn main() {
let _ = rocket::build().attach(Pool::fairing()).launch().await;
} Am i doing something wrong? Does anyone else have this issue? Hope you can help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The last comment in your other issue is spot on clux/muslrust#126 (comment). |
Beta Was this translation helpful? Give feedback.
The last comment in your other issue is spot on clux/muslrust#126 (comment).