aws / aws-lc-rs

aws-lc-rs is a cryptographic library using AWS-LC for its cryptographic operations. The library strives to be API-compatible with the popular Rust library named ring.
Other
272 stars 50 forks source link

aws-lc-sys --features ssl,bindgen failed to build #348

Closed zh-jq closed 7 months ago

zh-jq commented 7 months ago
cargo build -p aws-lc-sys --features ssl,bindgen

failed to compile, the output:

error[E0425]: cannot find function, tuple struct or tuple variant `BIO_ctrl` in this scope
  --> aws-lc-sys/src/lib.rs:82:14
   |
82 |     unsafe { BIO_ctrl(b, BIO_CTRL_INFO, 0, pp.cast::<c_void>()) }
   |              ^^^^^^^^ not found in this scope

error[E0425]: cannot find function, tuple struct or tuple variant `CRYPTO_library_init` in this scope
  --> aws-lc-sys/src/lib.rs:86:14
   |
86 |     unsafe { CRYPTO_library_init() }
   |              ^^^^^^^^^^^^^^^^^^^ not found in this scope

For more information about this error, try `rustc --explain E0425`.
error: could not compile `aws-lc-sys` (lib) due to 2 previous errors

the function name in the bindgen.rs is

extern "C" {
    pub fn aws_lc_0_13_0_CRYPTO_library_init();
}

which is different than the pre-generated one:

extern "C" {
    #[link_name = "\u{1}aws_lc_0_13_0_CRYPTO_library_init"]
    pub fn CRYPTO_library_init();
}
justsmth commented 7 months ago

Thanks for the report. I yanked v0.13.1 so we can investigate.

justsmth commented 7 months ago

This was the result of a bad release of our sys-crates. The issue is addressed in this PR. Another release will be out soon.

justsmth commented 7 months ago

We've released aws-ls-sys v0.13.2.