You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I stated to learn Rust and got stocked when using reqwest- it having an dependency on rust-openssl. And openssl I'm not able to build.
To have shorter try-and-err cycles, I set up a simple project, only using rust-openssl.
Here my Cargo.toml:
[package]
name = "build_openssl"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
#openssl = {version = "0.10.45", feature = "vendored"}
#openssl-sys = {version = "0.9.80", feature = "vendored"}
openssl = {version = "0.10.45"}
openssl-sys = {version = "0.9.80"}
.cargo/config.toml continas
[build]
target = "wasm32-unknown-unknown"
I inseted some println! macros (output recognizable by 'Obioma: ...') in the build rust code, trying to understand the topic - but nada. Got stocked.
Here the output from cargo build -vv
Hi Steven,
thx, will investigate into that direction.
In the meantime I saw that in the Cargo.toml for openssl-sys version 1.1.1. from Openssl is referred as depenency.
[build-dependencies.openssl-src]
version = "111"
optional = true
While in openssl-src it is stated that main is targeting main which builds OpenSSL 3.0.
As this is optional I try to link to a static OpenSsl 3.0 library I don't believe it is related to my problem, but it might be worth to adjust.
Got it working,root cause was me setting the environment variables wrong. The compiler message referring to the -L flag confused me, but now I got it right.
Here my settings (for Linux), in case anybody has similar issues.
# .bashrc
export OPENSSL_LIBS=ssl:crypto
export OPENSSL_STATIC=1
export OPENSSL_INCLUDE_DIR=/<PATH_TO_STATIC LIBRARY_FOR_OPENSSL>/openssl-3.0.7 # <-- not sure if needed for static linkage
export OPENSSL_LIB_DIR=/<PATH_TO_STATIC LIBRARY_FOR_OPENSSL/openssl-3.0.7
Hi,
I stated to learn Rust and got stocked when using reqwest- it having an dependency on rust-openssl. And openssl I'm not able to build.
To have shorter try-and-err cycles, I set up a simple project, only using rust-openssl.
Here my Cargo.toml:
.cargo/config.toml continas
I inseted some println! macros (output recognizable by 'Obioma: ...') in the build rust code, trying to understand the topic - but nada. Got stocked.
Here the output from cargo build -vv
I also tried export
, no success. I have not too many ideas what else to fix, any suggestions?
Thx in advance
The text was updated successfully, but these errors were encountered: