Compile error when there is `native_tls` dep in cargo
I want to use QUIC server and TCP TLS Server in one project, but error occurs when compiling
error: linking with cc failed: exit status: 1 | = note: "cc" "-m64" "/home/serzh/dev/avarice/ctr/target/debug/deps/ctr-16db32ebe4e9d794.11ozw1ij8qw1k2vg.rcgu.o" "/home/serzh/dev/avarice/ctr/target/debug/deps/ctr-16db32ebe4e9d794.139wrpjnqrjphyty.rcgu.o" "/home/serzh/dev/avarice/ctr/target/debug/deps/ctr-16db32ebe4e9d794.13khcqg0ews1rtz3.rcgu.o" "/home/serzh/dev/avarice/ctr/target/debug/deps/ctr-16db32ebe4e9d794.16a9a0tg5dhrq7rn.rcgu.o" "/home/serzh/dev/avarice/ctr/target/debug/deps/ctr-16db32ebe4e9d794.17rwgda33h132rny.rcgu.o" "/home/serzh/dev/avarice/ctr/target/debug/deps/ctr-16db32ebe4e9d794.17u8fmxhz3k8m8jf.rcgu.o" "/home/serzh/dev/avarice/ctr/target/debug/deps/ctr-16db32ebe4e9d794.18uq95l16nmwlrez.rcgu.o" "/home/serzh/dev/avarice/ctr/target/debug/deps/ctr-16db32ebe4e9d794.1a0abwjqmtqr9f6g.rcgu.o" "/home/serzh/dev/avarice/ctr/target/debug/deps/ctr-16db32ebe4e9d794.1adqe1qqwwd7h0jz.rcgu.o" "/home/serzh/dev/avarice/ctr/target/debug/deps/ctr-16db32ebe4e9d794.1ax95ecqkd3kuy98.rcgu.o" "/home/serzh/dev/avarice/ctr/target/debug/deps/ctr-16db32ebe4e9d794.1bqr17qnuoxex4ge.rcgu.o" ...
= note: /usr/bin/ld: /home/serzh/dev/avarice/ctr/target/debug/deps/libopenssl_sys-4a583a3a3b3afaf5.rlib(methods.o): in function `TLS_method': /home/serzh/dev/avarice/ctr/target/debug/build/openssl-sys-da888e3fa69a240f/out/openssl-build/build/src/ssl/methods.c:18: multiple definition of `TLS_method'; /home/serzh/dev/avarice/ctr/target/debug/deps/libquiche-f5d4ea6ced956dee.rlib(tls_method.cc.o):/home/serzh/.cargo/registry/src/github.com-1ecc6299db9ec823/quiche-0.10.0/deps/boringssl/src/ssl/tls_method.cc:228: first defined here /usr/bin/ld: /home/serzh/dev/avarice/ctr/target/debug/deps/libopenssl_sys-4a583a3a3b3afaf5.rlib(methods.o): in function `TLS_server_method': /home/serzh/dev/avarice/ctr/target/debug/build/openssl-sys-da888e3fa69a240f/out/openssl-build/build/src/ssl/methods.c:49: multiple definition of `TLS_server_method'; /home/serzh/dev/avarice/ctr/target/debug/deps/libquiche-f5d4ea6ced956dee.rlib(tls_method.cc.o):/home/serzh/.cargo/registry/src/github.com-1ecc6299db9ec823/quiche-0.10.0/deps/boringssl/src/ssl/tls_method.cc:313: first defined here /usr/bin/ld: /home/serzh/dev/avarice/ctr/target/debug/deps/libopenssl_sys-4a583a3a3b3afaf5.rlib(methods.o): in function `TLS_client_method': /home/serzh/dev/avarice/ctr/target/debug/build/openssl-sys-da888e3fa69a240f/out/openssl-build/build/src/ssl/methods.c:82: multiple definition of `TLS_client_method'; /home/serzh/dev/avarice/ctr/target/debug/deps/libquiche-f5d4ea6ced956dee.rlib(tls_method.cc.o):/home/serzh/.cargo/registry/src/github.com-1ecc6299db9ec823/quiche-0.10.0/deps/boringssl/src/ssl/tls_method.cc:317: first defined here /usr/bin/ld: /home/serzh/dev/avarice/ctr/target/debug/deps/libopenssl_sys-4a583a3a3b3afaf5.rlib(methods.o): in function `TLSv1_2_method': /home/serzh/dev/avarice/ctr/target/debug/build/openssl-sys-da888e3fa69a240f/out/openssl-build/build/src/ssl/methods.c:178: multiple definition of `TLSv1_2_method'; /home/serzh/dev/avarice/ctr/target/debug/deps/libquiche-f5d4ea6ced956dee.rlib(tls_method.cc.o):/home/serzh/.cargo/registry/src/github.com-1ecc6299db9ec823/quiche-0.10.0/deps/boringssl/src/ssl/tls_method.cc:252: first defined here /usr/bin/ld: /home/serzh/dev/avarice/ctr/target/debug/deps/libopenssl_sys-4a583a3a3b3afaf5.rlib(methods.o): in function `TLSv1_2_server_method': /home/serzh/dev/avarice/ctr/target/debug/build/openssl-sys-da888e3fa69a240f/out/openssl-build/build/src/ssl/methods.c:183: multiple definition of `TLSv1_2_server_method'; /home/serzh/dev/avarice/ctr/target/debug/deps/libquiche-f5d4ea6ced956dee.rlib(tls_method.cc.o):/home/serzh/.cargo/registry/src/github.com-1ecc6299db9ec823/quiche-0.10.0/deps/boringssl/src/ssl/tls_method.cc:281: first defined here /usr/bin/ld: /home/serzh/dev/avarice/ctr/target/debug/deps/libopenssl_sys-4a583a3a3b3afaf5.rlib(methods.o): in function `TLSv1_2_client_method':
and so on. How can i deal with it?
Is it possible to use BoringSSL and OpenSSL within one project?
No, that is not possible currently due to symbols conflicts between BoringSSL and OpenSSL (as per the logs you posted).