Linking with `cc` failed: exit status: 1 When using quiche crate

I wanted to build an app that use quic protocol, using the quiche crate, the problem is when I run (using cargo 1.5.3) :

cargo build

I'm getting :

linking with cc failed: exit status: 1 and some errors related to undefined reference to SSL_CTX_ctrl'`

Once I remove the quiche crate from my Cargo.toml the app build successfully.

Any ideas why my build failed when I'm using quiche ?

This looks like problem linking with OpenSSL (or the BoringSSL flavor that quiche uses). Do you have it installed? Is it new-enough version?

You can also try enabling boringssl-vendored feature in quiche to compile BoringSSL. You're going to need cmake installed for this.

Hi thanks for the reply, yes I do have openSSl installed "OpenSSL 1.1.1k 25 Mar 2021"...unfortunately enabling the feature boringssl-vendored didn't fix the problem.

Any more thoughts or progress on this problem? I'm having the same issue myself.

I figured out how to fix this. the problem occurred because I had reqwest crate in my toml...since it uses openssl too, there were some I had to enable this feature : reqwest = { version="0.xx", default-features=false, features=["rustls-tls"] } to fix the conflicts.

great. thank you! was able to find he offending dependency that included SSL and remove it.

Yes, in general using rustls will save you from alot of these compiling problems (as opposed to native-tls). Also, if the only available crate for a project is native-tls, you can use the "vendored" feature to make cross-compiling more friendly.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.