3andne / trojan-oxide

A Rust implementation of Trojan with QUIC tunnel, Lite-TLS and more.
GNU General Public License v3.0
32 stars 6 forks source link

编译失败 #5

Open ArcCal opened 1 year ago

ArcCal commented 1 year ago
系统环境: Mac OS M2(ARM64) 编译过程及报错信息: 第一次编译: cargo build --release --features client_full Downloaded ansi_term v0.12.1 Downloaded slab v0.4.7 Downloaded tokio-macros v1.8.0 Downloaded smallvec v1.9.0 Downloaded tracing-log v0.1.3 Downloaded unicode-segmentation v1.9.0 Downloaded bytes v1.2.1 Downloaded cc v1.0.73 Downloaded cpufeatures v0.2.4 Downloaded chrono v0.4.22 Downloaded thread_local v1.1.4 Downloaded synstructure v0.12.6 Downloaded structopt-derive v0.4.18 Downloaded tracing-core v0.1.29 Downloaded futures-core v0.3.24 Downloaded fxhash v0.2.1 Downloaded futures-util v0.3.24 Downloaded futures v0.3.24 Downloaded block-buffer v0.10.2 Downloaded tracing v0.1.36 Downloaded structopt v0.3.26 Downloaded getrandom v0.2.7 Downloaded rustls-pemfile v1.0.1 Downloaded unicode-width v0.1.9 Downloaded anyhow v1.0.62 Downloaded lock_api v0.4.8 Downloaded proc-macro-error-attr v1.0.4 Downloaded proc-macro-error v1.0.4 Downloaded num_cpus v1.13.1 Downloaded mio v0.8.4 Downloaded heck v0.3.3 Downloaded quinn-udp v0.1.3 Downloaded thiserror v1.0.32 Downloaded thiserror-impl v1.0.32 Downloaded signal-hook-registry v1.4.0 Downloaded sharded-slab v0.1.4 Downloaded syn v1.0.99 Downloaded err-derive v0.3.1 Downloaded socket2 v0.4.6 Downloaded futures-macro v0.3.24 Downloaded futures-sink v0.3.24 Downloaded pem v1.1.0 Downloaded rcgen v0.8.14 warning: spurious network error (2 tries remaining): [56] Failure when receiving data from the peer (LibreSSL SSL_read: error:14FFF3E7:SSL routines:(UNKNOWN)SSL_internal:unknown failure occurred, errno 0) warning: spurious network error (2 tries remaining): [56] Failure when receiving data from the peer (LibreSSL SSL_read: error:14FFF3E7:SSL routines:(UNKNOWN)SSL_internal:unknown failure occurred, errno 0) warning: spurious network error (2 tries remaining): [56] Failure when receiving data from the peer (LibreSSL SSL_read: error:14FFF3E7:SSL routines:(UNKNOWN)SSL_internal:unknown failure occurred, errno 0) warning: spurious network error (2 tries remaining): [56] Failure when receiving data from the peer (LibreSSL SSL_read: error:14FFF3E7:SSL routines:(UNKNOWN)SSL_internal:unknown failure occurred, errno 0) warning: spurious network error (2 tries remaining): [56] Failure when receiving data from the peer (LibreSSL SSL_read: error:14FFF3E7:SSL routines:(UNKNOWN)SSL_internal:unknown failure occurred, errno 0) warning: spurious network error (2 tries remaining): [56] Failure when receiving data from the peer (LibreSSL SSL_read: error:14FFF3E7:SSL routines:(UNKNOWN)SSL_internal:unknown failure occurred, errno 0) warning: spurious network error (2 tries remaining): [56] Failure when receiving data from the peer (LibreSSL SSL_read: error:14FFF3E7:SSL routines:(UNKNOWN)SSL_internal:unknown failure occurred, errno 0) warning: spurious network error (2 tries remaining): [56] Failure when receiving data from the peer (LibreSSL SSL_read: error:14FFF3E7:SSL routines:(UNKNOWN)SSL_internal:unknown failure occurred, errno 0) warning: spurious network error (2 tries remaining): [56] Failure when receiving data from the peer (LibreSSL SSL_read: error:14FFF3E7:SSL routines:(UNKNOWN)SSL_internal:unknown failure occurred, errno 0) warning: spurious network error (2 tries remaining): [56] Failure when receiving data from the peer (LibreSSL SSL_read: error:14FFF3E7:SSL routines:(UNKNOWN)SSL_internal:unknown failure occurred, errno 0) warning: spurious network error (2 tries remaining): [56] Failure when receiving data from the peer (LibreSSL SSL_read: error:14FFF3E7:SSL routines:(UNKNOWN)SSL_internal:unknown failure occurred, errno 0) warning: spurious network error (2 tries remaining): [56] Failure when receiving data from the peer (LibreSSL SSL_read: error:14FFF3E7:SSL routines:(UNKNOWN)SSL_internal:unknown failure occurred, errno 0) warning: spurious network error (2 tries remaining): [56] Failure when receiving data from the peer (LibreSSL SSL_read: error:14FFF3E7:SSL routines:(UNKNOWN)SSL_internal:unknown failure occurred, errno 0) warning: spurious network error (2 tries remaining): [56] Failure when receiving data from the peer (LibreSSL SSL_read: error:06FFF064:digital envelope routines:CRYPTO_internal:bad decrypt, errno 0) Downloaded quote v1.0.21 Downloaded once_cell v1.13.1 Downloaded futures-task v0.3.24 Downloaded futures-executor v0.3.24 Downloaded futures-io v0.3.24 Downloaded futures-channel v0.3.24 Downloaded clap v2.34.0 Downloaded mimalloc v0.1.29 Downloaded yasna v0.4.0 Downloaded security-framework-sys v2.6.1 Downloaded tracing-subscriber v0.3.15 Downloaded rustls-pemfile v0.2.1 Downloaded rustversion v1.0.9 Downloaded tracing-attributes v0.1.22 Downloaded proc-macro2 v1.0.43 Downloaded quinn v0.8.5 Downloaded security-framework v2.7.0 Downloaded quinn-proto v0.8.4 Downloaded tokio v1.20.1 Downloaded unicode-xid v0.2.3 warning: spurious network error (1 tries remaining): [56] Failure when receiving data from the peer (LibreSSL SSL_read: error:14FFF3E7:SSL routines:(UNKNOWN)SSL_internal:unknown failure occurred, errno 0) Downloaded unicode-ident v1.0.3 Downloaded libc v0.2.132 Downloaded libmimalloc-sys v0.1.25 Downloaded 66 crates (5.1 MB) in 9.73s (largest was libmimalloc-sys at 1.1 MB) Compiling libc v0.2.132 Compiling autocfg v1.1.0 Compiling proc-macro2 v1.0.43 Compiling unicode-ident v1.0.3 Compiling quote v1.0.21 Compiling syn v1.0.99 Compiling cfg-if v1.0.0 Compiling version_check v0.9.4 Compiling cc v1.0.73 Compiling log v0.4.17 Compiling once_cell v1.13.1 Compiling pin-project-lite v0.2.9 Compiling memchr v2.5.0 Compiling core-foundation-sys v0.8.3 Compiling untrusted v0.7.1 Compiling ring v0.16.20 Compiling slab v0.4.7 Compiling base64 v0.13.0 Compiling futures-core v0.3.24 Compiling lock_api v0.4.8 Compiling typenum v1.15.0 Compiling smallvec v1.9.0 Compiling parking_lot_core v0.9.3 Compiling futures-channel v0.3.24 Compiling bitflags v1.3.2 Compiling futures-task v0.3.24 Compiling getrandom v0.2.7 Compiling tracing-core v0.1.29 Compiling num-traits v0.2.15 Compiling proc-macro-error-attr v1.0.4 Compiling generic-array v0.14.6 Compiling futures-util v0.3.24 Compiling rustls v0.20.6 Compiling scopeguard v1.1.0 Compiling futures-sink v0.3.24 Compiling rand_core v0.6.3 Compiling security-framework-sys v2.6.1 Compiling core-foundation v0.9.3 Compiling tokio v1.20.1 Compiling num-integer v0.1.45 Compiling proc-macro-error v1.0.4 Compiling bytes v1.2.1 Compiling rustversion v1.0.9 Compiling pin-utils v0.1.0 Compiling ppv-lite86 v0.2.16 Compiling futures-io v0.3.24 Compiling rand_chacha v0.3.1 Compiling security-framework v2.7.0 Compiling futures-macro v0.3.24 Compiling tokio-macros v1.8.0 Compiling tracing-attributes v0.1.22 Compiling thiserror-impl v1.0.32 Compiling webpki v0.22.0 Compiling sct v0.7.0 Compiling parking_lot v0.12.1 Compiling mio v0.8.4 Compiling socket2 v0.4.6 Compiling signal-hook-registry v1.4.0 Compiling num_cpus v1.13.1 Compiling rustls-pemfile v1.0.1 Compiling lazy_static v1.4.0 Compiling tinyvec_macros v0.1.0 Compiling byteorder v1.4.3 Compiling tinyvec v1.6.0 Compiling fxhash v0.2.1 Compiling rustls-native-certs v0.6.2 Compiling tracing v0.1.36 Compiling thiserror v1.0.32 Compiling rand v0.8.5 Compiling rustls-pemfile v0.2.1 Compiling libmimalloc-sys v0.1.25 Compiling unicode-segmentation v1.9.0 Compiling unicode-width v0.1.9 Compiling ansi_term v0.12.1 Compiling err-derive v0.3.1 Compiling heck v0.3.3 Compiling quinn-proto v0.8.4 Compiling textwrap v0.11.0 Compiling chrono v0.4.22 Compiling crypto-common v0.1.6 Compiling block-buffer v0.10.2 Compiling atty v0.2.14 Compiling unicode-xid v0.2.3 Compiling strsim v0.8.0 Compiling vec_map v0.8.2 Compiling anyhow v1.0.62 Compiling clap v2.34.0 Compiling yasna v0.4.0 Compiling synstructure v0.12.6 Compiling digest v0.10.3 Compiling structopt-derive v0.4.18 Compiling quinn-udp v0.1.3 Compiling futures-executor v0.3.24 Compiling tracing-log v0.1.3 Compiling sharded-slab v0.1.4 Compiling dirs-sys v0.3.7 Compiling cpufeatures v0.2.4 Compiling pem v1.1.0 Compiling thread_local v1.1.4 Compiling rcgen v0.8.14 Compiling sha2 v0.10.2 Compiling tracing-subscriber v0.3.15 Compiling directories v4.0.1 Compiling structopt v0.3.26 Compiling futures v0.3.24 Compiling quinn v0.8.5 Compiling tokio-rustls v0.23.4 Compiling mimalloc v0.1.29 Compiling trojan-oxide v0.1.0 (/private/tmp/trojan-oxide) error[E0554]: #![feature] may not be used on the stable release channel --> src/main.rs:3:1 3 #![feature(generic_associated_types)] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the attribute

= help: the feature generic_associated_types has been stable since 1.65.0 and no longer requires an attribute to enable

error[E0554]: #![feature] may not be used on the stable release channel --> src/main.rs:4:1 | 4 | #![feature(type_alias_impl_trait)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0554]: #![feature] may not be used on the stable release channel --> src/main.rs:5:1 | 5 | #![feature(associated_type_defaults)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: the feature generic_associated_types has been stable since 1.65.0 and no longer requires an attribute to enable --> src/main.rs:3:12 3 #![feature(generic_associated_types)] ^^^^^^^^^^^^^^^^^^^^^^^^

= note: #[warn(stable_features)] on by default

For more information about this error, try rustc --explain E0554. warning: trojan-oxide (bin "trojan-oxide") generated 1 warning error: could not compile trojan-oxide due to 3 previous errors; 1 warning emitted

第二次编译:

cargo build --release Compiling trojan-oxide v0.1.0 (/private/tmp/trojan-oxide) error[E0554]: #![feature] may not be used on the stable release channel --> src/main.rs:3:1 3 #![feature(generic_associated_types)] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the attribute

= help: the feature generic_associated_types has been stable since 1.65.0 and no longer requires an attribute to enable

error[E0554]: #![feature] may not be used on the stable release channel --> src/main.rs:4:1 | 4 | #![feature(type_alias_impl_trait)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0554]: #![feature] may not be used on the stable release channel --> src/main.rs:5:1 | 5 | #![feature(associated_type_defaults)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: the feature generic_associated_types has been stable since 1.65.0 and no longer requires an attribute to enable --> src/main.rs:3:12 3 #![feature(generic_associated_types)] ^^^^^^^^^^^^^^^^^^^^^^^^

= note: #[warn(stable_features)] on by default

For more information about this error, try rustc --explain E0554. warning: trojan-oxide (bin "trojan-oxide") generated 1 warning error: could not compile trojan-oxide due to 3 previous errors; 1 warning emitted

ArcCal commented 1 year ago

大佬能排查下原因吗,或者提供预编译的mac arm64和linux arm64二进制版本

3andne commented 1 year ago

你好,请问你有使用nightly rust编译吗?

rustup default nightly
ArcCal commented 1 year ago

没有。需要使用nightly rust编译吗

ArcCal commented 1 year ago

试了好些次,都这样子。vps和树莓派上编译都一样。

3andne commented 1 year ago

印象里用树莓派编译可能要几个小时的样子(性能较弱),请问在m2上可以编译成功吗?

3andne commented 1 year ago

如果是目标为arm平台linux的话,我应该可以帮你cross compile一下,这个项目比较老了,当时没有设置CD(自动发布)

ArcCal commented 1 year ago

谢谢大佬 编译成功了 跑起来了