-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Build cannot find libssl.so.3 #2244
Comments
I played with adding some tracing [1] and this appears to be happening because I don't know how cargo or sqlx are meant to work so I'm not sure what is going wrong:
[1] [2] |
I fixed this by forcing sqlx to use rustls instead of OpenSSL in my Cargo.toml:
You'll probably get the same error when trying to install
(assuming postgres database, replace it with another database if needed) |
I was able to get around this issue by adding I also want to note that before I started using a nix flake for my project very recently, I was building on Arch Linux with system packages and never ran into any issues (and still don't). Nix definitely puts the library in a different path but I'm not sure what Ubuntu does. |
Bug Description
sqlx fails to compile on my machine using the "runtime-tokio-native-tls" feature, despite the existence of the correct library.
I do not believe this is a duplicate of #473 because vendoring openssl does not fix the problem for me.
Minimal Reproduction
This debug output contains a few confusing tidbits:
-L native=/home/brian/wc/ssl-test/target/debug/build/openssl-sys-f07918377ca000c4/out/openssl-build/install/lib
Rustc appears to be given a static library to link against, and has no need to look for a dynamic library:
--extern sqlx_macros=/home/brian/wc/ssl-test/target/debug/deps/libsqlx_macros-668f3e99a9a67f70.so
We had no problem finding the dynamic library when we built sqlx_macros:
Info
Ubuntu 22.04, 5.15.0-56-generic x86_64
rustc --version
:rustc 1.65.0 (897e37553 2022-11-02)
Any help is appreciated, I'm in a bit over my head here.
The text was updated successfully, but these errors were encountered: