-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
Extern functions can't be found #126
Comments
that looks like pq trying to use openssl and probably not getting ssl included in linklibs are you doing openssl crate import in the readme? |
I tried following this, and added openssl to my dependencies (It was not in Cargo.toml before). Heres my cargo tree output for the binary that fails (before adding openssl as a dependency):
As you can see in the above, i'm not actually depending on openssl, as i try to use rustls where i can. However, after adding the openssl crate to the Cargo.toml and adding the
@clux Thank you for helping btw. I really appreciate it! |
This comment was marked as resolved.
This comment was marked as resolved.
Out of frustration and curiosity, i tried upgrading Openssl to version 3.0 - This did not solve the issue either. I hope some of you have an idea, cause i am completely lost at this point. Can't figure out what is causing this. |
I found what is causing the error - Haven't found a fix yet though. I'm using the Rocket framework, and Diesel. In order to use these properly together, i'm using rocket_sync_db_pools - This is what is causing the error. I have created a small MVP project, to show the error: 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;
} My question is now - Is this a problem with Rocket? Or can this be fixed here? |
This is probably more interaction (or link order issues) with Tbqh, seeing more of this, plus not seeing any traction on people wanting to statically link My advice would be to take a simpler non-musl path if you are using pq. |
@clux That sucks, but if that's the only proper solution at this point, then that's what i'll have to do. Thank you again, for the help - Really appreciate it |
I recently found this repo - Amazing work. It solved a lot of the issues i had with compiling to musl.
However, i am now encountering an error i simply do not understand.. I think it might be related to #81 but i am not sure.. Can anyone here help me identify if i am making mistakes, or if i have to wait for the issue to be solved?
Thank you in advance!
The text was updated successfully, but these errors were encountered: