penumbra-x / rquest

A high-performance asynchronous Rust HTTP client with TLS, JA3/JA4, and HTTP2 fingerprint spoof
Apache License 2.0
64 stars 12 forks source link

Linux Building Issues #12

Closed shrimpwtf closed 3 weeks ago

shrimpwtf commented 1 month ago

= note: /usr/bin/ld: /root/technique-bot/target/debug/deps/libreqwest-f276817a254bc67b.rlib(reqwest-f276817a254bc67b.reqwest.8514ca024fc66d12-cgu.04.rcgu.o): in function openssl::ssl::SslStream<S>::ssl_read_uninit': /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-0.10.66/src/ssl/mod.rs:3786: undefined reference toSSL_read_ex' /usr/bin/ld: /root/technique-bot/target/debug/deps/libreqwest-f276817a254bc67b.rlib(reqwest-f276817a254bc67b.reqwest.8514ca024fc66d12-cgu.04.rcgu.o): in function openssl::ssl::SslStream<S>::ssl_read_uninit': /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-0.10.66/src/ssl/mod.rs:3786: undefined reference toSSL_read_ex' /usr/bin/ld: /root/technique-bot/target/debug/deps/libreqwest-f276817a254bc67b.rlib(reqwest-f276817a254bc67b.reqwest.8514ca024fc66d12-cgu.04.rcgu.o): in function openssl::ssl::SslStream<S>::ssl_write': /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-0.10.66/src/ssl/mod.rs:3827: undefined reference toSSL_write_ex' /usr/bin/ld: /root/technique-bot/target/debug/deps/libreqwest-f276817a254bc67b.rlib(reqwest-f276817a254bc67b.reqwest.8514ca024fc66d12-cgu.04.rcgu.o): in function openssl::ssl::SslStream<S>::ssl_write': /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-0.10.66/src/ssl/mod.rs:3827: undefined reference toSSL_write_ex' /usr/bin/ld: /root/technique-bot/target/debug/deps/libopenssl-3f289ba261a325fe.rlib(openssl-3f289ba261a325fe.openssl.900132cd52cec8e6-cgu.01.rcgu.o): in function openssl::ssl::SslRef::peer_certificate': /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-0.10.66/src/ssl/mod.rs:2550: undefined reference toSSL_get1_peer_certificate' /usr/bin/ld: /root/technique-bot/target/debug/deps/libopenssl-3f289ba261a325fe.rlib(openssl-3f289ba261a325fe.openssl.900132cd52cec8e6-cgu.04.rcgu.o): in function openssl::error::Error::get': /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-0.10.66/src/error.rs:122: undefined reference toERR_get_error_all' /usr/bin/ld: /root/technique-bot/target/debug/deps/libopenssl_sys-b581f47d7c3eb351.rlib(openssl_sys-b581f47d7c3eb351.openssl_sys.5a879c7844c7c950-cgu.0.rcgu.o): in function openssl_sys::openssl::ssl::SSL_CTX_set_mode': /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-sys-0.9.103/src/./ssl.rs:246: undefined reference toSSL_CTX_ctrl' /usr/bin/ld: /root/technique-bot/target/debug/deps/libopenssl_sys-b581f47d7c3eb351.rlib(openssl_sys-b581f47d7c3eb351.openssl_sys.5a879c7844c7c950-cgu.0.rcgu.o): in function openssl_sys::openssl::ssl::SSL_CTX_add_extra_chain_cert': /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-sys-0.9.103/src/./ssl.rs:384: undefined reference toSSL_CTX_ctrl' /usr/bin/ld: /root/technique-bot/target/debug/deps/libopenssl_sys-b581f47d7c3eb351.rlib(openssl_sys-b581f47d7c3eb351.openssl_sys.5a879c7844c7c950-cgu.0.rcgu.o): in function openssl_sys::openssl::tls1::SSL_set_tlsext_host_name': /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-sys-0.9.103/src/./tls1.rs:24: undefined reference toSSL_ctrl' /usr/bin/ld: /root/technique-bot/target/debug/deps/libopenssl_sys-b581f47d7c3eb351.rlib(openssl_sys-b581f47d7c3eb351.openssl_sys.5a879c7844c7c950-cgu.0.rcgu.o): in function openssl_sys::openssl::ssl::SSL_CTX_set_min_proto_version': /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-sys-0.9.103/src/./ssl.rs:459: undefined reference toSSL_CTX_ctrl' /usr/bin/ld: /root/technique-bot/target/debug/deps/libopenssl_sys-b581f47d7c3eb351.rlib(openssl_sys-b581f47d7c3eb351.openssl_sys.5a879c7844c7c950-cgu.0.rcgu.o): in function openssl_sys::openssl::ssl::SSL_CTX_set_max_proto_version': /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-sys-0.9.103/src/./ssl.rs:468: undefined reference toSSL_CTX_ctrl' collect2: error: ld returned 1 exit status

= note: some extern functions couldn't be found; some native libraries may need to be installed or have their path specified = note: use the -l flag to specify native libraries to link = note: use the cargo:rustc-link-lib directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#rustc-link-lib)

I've tried 4 different linux distributions (ubuntu 20,22,24) and Debian, and all refuse to build. have tried openssl 1.1.1f and 3.x and nothing will seem to correctly build. unsure if this is related to patches etc.

JohnMilnor commented 1 month ago

To compile your Rust project for the x86_64-unknown-linux-musl target, you can use the https://github.com/rust-cross/rust-musl-cross Docker image.

AliaSabur commented 3 weeks ago

Building

sudo apt-get install build-essential cmake perl pkg-config libclang-dev musl-tools -y
cargo build --release