cargo-edit
cargo-edit copied to clipboard
openssl error on install on NetBSD (with libressl)
Howdy! I'm trying to install this package but I get a strange ssl error when I compile:
= note: ld: /tmp/cargo-installx1Xcyf/release/deps/libtime-bebaf4ff4764550e.rlib(time-bebaf4ff4764550e.time.6annjl8s-cgu.1.rcgu.o): in function `time::tzset':
time.6annjl8s-cgu.1:(.text._ZN4time5tzset17hc62cbc26919cc829E+0x2): warning: warning: reference to compatibility tzset(); include <time.h> for correct reference
ld: /tmp/cargo-installx1Xcyf/release/deps/liblibgit2_sys-e5720647326f18c9.rlib(openssl.o): in function `git_openssl_stream_global_init':
openssl.c:(.text.git_openssl_stream_global_init+0x18): undefined reference to `SSLv23_method'
ld: /tmp/cargo-installx1Xcyf/release/deps/liblibssh2_sys-51ca111f7a713904.rlib(openssl.o): in function `_libssh2_openssl_crypto_init':
openssl.c:(.text._libssh2_openssl_crypto_init+0x5): undefined reference to `OPENSSL_add_all_algorithms_noconf'
ld: openssl.c:(.text._libssh2_openssl_crypto_init+0xa): undefined reference to `OpenSSL_add_all_ciphers'
ld: openssl.c:(.text._libssh2_openssl_crypto_init+0xf): undefined reference to `OpenSSL_add_all_digests'
ld: /tmp/cargo-installx1Xcyf/release/deps/libopenssl_sys-ac89ca61757a726b.rlib(openssl_sys-ac89ca61757a726b.openssl_sys.58vcrgyx-cgu.10.rcgu.o): in function `std::sync::once::Once::call_once::{{closure}}':
openssl_sys.58vcrgyx-cgu.10:(.text._ZN3std4sync4once4Once9call_once28_$u7b$$u7b$closure$u7d$$u7d$17hd3e8350d87ff2846E+0x1f): undefined reference to `SSL_library_init'
ld: openssl_sys.58vcrgyx-cgu.10:(.text._ZN3std4sync4once4Once9call_once28_$u7b$$u7b$closure$u7d$$u7d$17hd3e8350d87ff2846E+0x25): undefined reference to `SSL_load_error_strings'
ld: openssl_sys.58vcrgyx-cgu.10:(.text._ZN3std4sync4once4Once9call_once28_$u7b$$u7b$closure$u7d$$u7d$17hd3e8350d87ff2846E+0x2b): undefined reference to `OPENSSL_add_all_algorithms_noconf'
ld: openssl_sys.58vcrgyx-cgu.10:(.text._ZN3std4sync4once4Once9call_once28_$u7b$$u7b$closure$u7d$$u7d$17hd3e8350d87ff2846E+0x31): undefined reference to `CRYPTO_num_locks'
ld: openssl_sys.58vcrgyx-cgu.10:(.text._ZN3std4sync4once4Once9call_once28_$u7b$$u7b$closure$u7d$$u7d$17hd3e8350d87ff2846E+0x220): undefined reference to `CRYPTO_set_locking_callback'
ld: openssl_sys.58vcrgyx-cgu.10:(.text._ZN3std4sync4once4Once9call_once28_$u7b$$u7b$closure$u7d$$u7d$17hd3e8350d87ff2846E+0x23b): undefined reference to `CRYPTO_set_id_callback'
For context I'm on NetBSD and I'm using libressl. If it's libressl that's the issue, would this help?
@gigavinyl hey, it seems that openssl_sys dependency is coming from git2: https://github.com/rust-lang/git2-rs/blob/f0bfe7ac0cbee58b11f1708eca4f76b4828146c0/Cargo.toml#L25-L26
Could you try to build that library? Maybe the fix is as simple as to make it cfg(not(target_os = \"netbsd\"))
.
Damn I get this build error:
error[E0432]: unresolved import `tokio::net::TcpStream`
--> tokio-libtls/src/prelude.rs:19:9
|
19 | pub use tokio::net::TcpStream;
| ^^^^^^^^^^^^^^^^^^^^^ no `TcpStream` in `net`
error[E0432]: unresolved import `tokio::net::TcpStream`
--> tokio-libtls/src/lib.rs:87:5
|
87 | use tokio::net::TcpStream;
| ^^^^^^^^^^^^^^^^^^^^^ no `TcpStream` in `net`
error: aborting due to 2 previous errors
```. I'll go report this on the libressl library as well.
Oop never mind using this builds fine :)