shadowsocks / shadowsocks-rust

A Rust port of shadowsocks
https://shadowsocks.org/
MIT License
8.6k stars 1.17k forks source link

build failed on Ubuntu 18.04 #181

Closed sv158 closed 4 years ago

sv158 commented 4 years ago

libssl-dev,libsodium-dev和pkg-config的问题都解决了,最后还是没编译成功。

   Compiling shadowsocks-rust v1.7.0                                                 
error: failed to compile `shadowsocks-rust v1.7.0`, intermediate artifacts can be fou
nd at `/tmp/cargo-installdZOdTw`                                                     

Caused by:                                                                           
  Could not compile `shadowsocks-rust`.                                              

Caused by:                                                                           
  process didn't exit successfully: `rustc --edition=2018 --crate-name ssdns /home/e/
.cargo/registry/src/github.com-1ecc6299db9ec823/shadowsocks-rust-1.7.0/src/bin/ssdns.
rs --color always --crate-type bin --emit=dep-info,link -C opt-level=3 -C lto --cfg '
feature="default"' --cfg 'feature="libsodium-ffi"' --cfg 'feature="rc4"' --cfg 'featu
re="sodium"' -C metadata=cf9d49de4d3a6786 -C extra-filename=-cf9d49de4d3a6786 --out-d
ir /tmp/cargo-installdZOdTw/release/deps -L dependency=/tmp/cargo-installdZOdTw/relea
se/deps --extern base64=/tmp/cargo-installdZOdTw/release/deps/libbase64-d3408742df60c
c17.rlib --extern byte_string=/tmp/cargo-installdZOdTw/release/deps/libbyte_string-67
2f0b9affb5aefe.rlib --extern byteorder=/tmp/cargo-installdZOdTw/release/deps/libbyteo
rder-5825d27fedd80f37.rlib --extern bytes=/tmp/cargo-installdZOdTw/release/deps/libby
tes-da033372f3cc27b5.rlib --extern clap=/tmp/cargo-installdZOdTw/release/deps/libclap
-501f3dd426296d6e.rlib --extern digest=/tmp/cargo-installdZOdTw/release/deps/libdiges
t-c471f6ac00506f3c.rlib --extern dns_parser=/tmp/cargo-installdZOdTw/release/deps/lib
dns_parser-c204cbf593d19921.rlib --extern env_logger=/tmp/cargo-installdZOdTw/release
/deps/libenv_logger-d2fd4547feabf6ad.rlib --extern futures=/tmp/cargo-installdZOdTw/r
elease/deps/libfutures-bb66ba5ef54e4cb3.rlib --extern json5=/tmp/cargo-installdZOdTw/
release/deps/libjson5-b8a6868cf0d80118.rlib --extern libc=/tmp/cargo-installdZOdTw/re
lease/deps/liblibc-53a89e3341a1f396.rlib --extern libsodium_ffi=/tmp/cargo-installdZO
dTw/release/deps/liblibsodium_ffi-0b269b20fef81bbb.rlib --extern log=/tmp/cargo-insta
lldZOdTw/release/deps/liblog-ebe287ae0f504a1d.rlib --extern lru_cache=/tmp/cargo-inst
alldZOdTw/release/deps/liblru_cache-9216739ee7e7acbf.rlib --extern md5=/tmp/cargo-ins
alldZOdTw/release/deps/liblru_cache-9216739ee7e7acbf.rlib --extern md5=/tmp/cargo-ins
talldZOdTw/release/deps/libmd5-2c50e817d506de9c.rlib --extern openssl=/tmp/cargo-inst
alldZOdTw/release/deps/libopenssl-64be53f9768ab3b9.rlib --extern qrcode=/tmp/cargo-in
stalldZOdTw/release/deps/libqrcode-236e0e687efbe3ce.rlib --extern rand=/tmp/cargo-ins
talldZOdTw/release/deps/librand-1ce35a1b73cf8e13.rlib --extern ring=/tmp/cargo-instal
ldZOdTw/release/deps/libring-c00a21f5b5f8c04f.rlib --extern serde=/tmp/cargo-installd
ZOdTw/release/deps/libserde-2d59b5a40945d100.rlib --extern serde_urlencoded=/tmp/carg
o-installdZOdTw/release/deps/libserde_urlencoded-6114c7ff556d5942.rlib --extern shado
wsocks=/tmp/cargo-installdZOdTw/release/deps/libshadowsocks-2af084cf636ce407.rlib --e
xtern spin=/tmp/cargo-installdZOdTw/release/deps/libspin-90665ba58dfedf86.rlib --exte
rn time=/tmp/cargo-installdZOdTw/release/deps/libtime-0c8a3e0632bf7dc2.rlib --extern
tokio=/tmp/cargo-installdZOdTw/release/deps/libtokio-dbdc6d7629efed54.rlib --extern t
okio_io=/tmp/cargo-installdZOdTw/release/deps/libtokio_io-e335c9549691c6c9.rlib --ext
ern tokio_process=/tmp/cargo-installdZOdTw/release/deps/libtokio_process-01c3b1108f25
e746.rlib --extern tokio_signal=/tmp/cargo-installdZOdTw/release/deps/libtokio_signal
-f567c5a1978e947a.rlib --extern trust_dns_resolver=/tmp/cargo-installdZOdTw/release/d
eps/libtrust_dns_resolver-026c46d77d2694a4.rlib --extern typenum=/tmp/cargo-installdZ
OdTw/release/deps/libtypenum-29c38691d6a529f6.rlib --extern url=/tmp/cargo-installdZO
dTw/release/deps/liburl-a8dfa42fb6ace4af.rlib --cap-lints allow -L native=/usr/lib/x8
6_64-linux-gnu -L native=/tmp/cargo-installdZOdTw/release/build/ring-5cf0a6971c5c7574
/out -L native=/tmp/cargo-installdZOdTw/release/build/backtrace-sys-fc2eb0b98a6f19e6/
out` (signal: 9, SIGKILL: kill)
zonyitoo commented 4 years ago

(signal: 9, SIGKILL: kill)

rustc进程被系统KILL了,内存不足?另外为啥编译的是v1.7.0,现在已经在做v1.8.0了。

如果只是想使用的话直接在这里下载 https://github.com/shadowsocks/shadowsocks-rust/releases/tag/v1.8.0-alpha.4 可执行文件就可以

sv158 commented 4 years ago

@zonyitoo

zonyitoo commented 4 years ago

再次尝试install 默认版本,无报错。应该是偶然内存过高了

最后Link的步骤需要较多内存。

release的可执行文件有在用,不过对比了一下编译生成的结果,好像少了个ssurl?

少了个ssdnsssurl肯定是有的。

尝试了下ssurl输出qrcode(ssurl -c config.json),没成功

ssurl -c -e config.json