blackbeam / rust-mysql-simple

Mysql client library implemented in rust.
Apache License 2.0
661 stars 144 forks source link

error: could not compile `t6` (bin "t6") due to 1 previous error; 2 warnings emitted #378

Closed zhujintao closed 4 months ago

zhujintao commented 5 months ago

= note: /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lssl: No such file or directory /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lcrypto: No such file or directory /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lz: No such file or directory collect2: error: ld returned 1 exit status

blackbeam commented 5 months ago

Hi.

I bet you are trying to build a statically linked binary. I was never actually tried that but first consider disabling the default set of crate features (default-features = false) and enable only that you actually use. Secondly — if TLS support is necessary, then use rustls-tls instead of native-tls.

Upd: oh, you should also consider chosing the rust backend for the flate2 crate

zhujintao commented 4 months ago

use env: RUSTFLAGS=-C target-feature=-crt-static