Closed simonsmh closed 7 years ago
It seems that openssl failed to compile in your environment.
Please try to compile this crate in your environment: https://github.com/sfackler/rust-openssl
I also encountered this problem. When I tried installing openssl, the response tells me that it has already been installed. However, pkg-config failed to resolve openssl.pc.
After installing package libssl-dev, the package compiles successfully. And when I type pkg-config --libs --cflags openssl
again, it returns the cflags correctly.
Can you compile the rust-openssl
crate?
Yes I can, by installing first libssl-dev
package.
Can you compile shadowsocks-rust
now? Can you provide the full version of error logs? How can I reproduce it?
Compiling shadowsocks-rust v1.3.0 (file:///root/shadowsocks-rust)
Running `rustc src/lib.rs --crate-name shadowsocks --crate-type lib -g -C metadata=2fc07067b8de6c6d -C extra-filename=-2fc07067b8de6c6d --out-dir /root/shadowsocks-rust/target/debug/deps --emit=dep-info,link -L dependency=/root/shadowsocks-rust/target/debug/deps --extern env_logger=/root/shadowsocks-rust/target/debug/deps/libenv_logger-b5cbb3261a7cf0b9.rlib --extern net2=/root/shadowsocks-rust/target/debug/deps/libnet2-b6b6880cb3760238.rlib --extern time=/root/shadowsocks-rust/target/debug/deps/libtime-7aab5f3d0922a9c7.rlib --extern tokio_core=/root/shadowsocks-rust/target/debug/deps/libtokio_core-0e3b140a238a4fac.rlib --extern rand=/root/shadowsocks-rust/target/debug/deps/librand-35167bebb3b301e7.rlib --extern serde_json=/root/shadowsocks-rust/target/debug/deps/libserde_json-495865e2a32427b9.rlib --extern num_cpus=/root/shadowsocks-rust/target/debug/deps/libnum_cpus-ab660b52aabdf27e.rlib --extern clap=/root/shadowsocks-rust/target/debug/deps/libclap-3dd1816abdd6d05f.rlib --extern log=/root/shadowsocks-rust/target/debug/deps/liblog-3f5cdedd18fc1617.rlib --extern lru_cache=/root/shadowsocks-rust/target/debug/deps/liblru_cache-c88a2240722514d9.rlib --extern tokio_io=/root/shadowsocks-rust/target/debug/deps/libtokio_io-4c864bc373e642f9.rlib --extern futures=/root/shadowsocks-rust/target/debug/deps/libfutures-869f64ff8eedaf94.rlib --extern openssl=/root/shadowsocks-rust/target/debug/deps/libopenssl-6efc5177c7886417.rlib --extern libc=/root/shadowsocks-rust/target/debug/deps/liblibc-b2b114c5e6d5dfb5.rlib --extern bytes=/root/shadowsocks-rust/target/debug/deps/libbytes-e331f03e535ffb30.rlib --extern crypto=/root/shadowsocks-rust/target/debug/deps/libcrypto-0c6fe23f715e724b.rlib --extern lazy_static=/root/shadowsocks-rust/target/debug/deps/liblazy_static-6f95aedc50e46c4f.rlib --extern base64=/root/shadowsocks-rust/target/debug/deps/libbase64-842526b6c0d7016e.rlib --extern qrcode=/root/shadowsocks-rust/target/debug/deps/libqrcode-19223e4abbbc3aaf.rlib --extern domain=/root/shadowsocks-rust/target/debug/deps/libdomain-c5c968620668b77d.rlib --extern byteorder=/root/shadowsocks-rust/target/debug/deps/libbyteorder-77f0324d9153219f.rlib -L native=/root/shadowsocks-rust/target/debug/build/rust-crypto-ed6f35bcd4283630/out`
error[E0252]: a value named `SOCKS5_AUTH_METHOD_NONE` has already been imported in this module
--> src/relay/socks5.rs:27:5
|
25 | pub use self::consts::{SOCKS5_AUTH_METHOD_NONE, SOCKS5_AUTH_METHOD_GSSAPI, SOCKS5_AUTH_METHOD_PASSWORD,
| ----------------------- previous import of `SOCKS5_AUTH_METHOD_NONE` here
26 | SOCKS5_AUTH_METHOD_NOT_ACCEPTABLE};
27 | use self::consts::*;
| ^^^^^^^^^^^^^^^^ already imported
error[E0252]: a value named `SOCKS5_AUTH_METHOD_PASSWORD` has already been imported in this module
--> src/relay/socks5.rs:27:5
|
25 | pub use self::consts::{SOCKS5_AUTH_METHOD_NONE, SOCKS5_AUTH_METHOD_GSSAPI, SOCKS5_AUTH_METHOD_PASSWORD,
| --------------------------- previous import of `SOCKS5_AUTH_METHOD_PASSWORD` here
26 | SOCKS5_AUTH_METHOD_NOT_ACCEPTABLE};
27 | use self::consts::*;
| ^^^^^^^^^^^^^^^^ already imported
error[E0252]: a value named `SOCKS5_AUTH_METHOD_GSSAPI` has already been imported in this module
--> src/relay/socks5.rs:27:5
|
25 | pub use self::consts::{SOCKS5_AUTH_METHOD_NONE, SOCKS5_AUTH_METHOD_GSSAPI, SOCKS5_AUTH_METHOD_PASSWORD,
| ------------------------- previous import of `SOCKS5_AUTH_METHOD_GSSAPI` here
26 | SOCKS5_AUTH_METHOD_NOT_ACCEPTABLE};
27 | use self::consts::*;
| ^^^^^^^^^^^^^^^^ already imported
error[E0252]: a value named `SOCKS5_AUTH_METHOD_NOT_ACCEPTABLE` has already been imported in this module
--> src/relay/socks5.rs:27:5
|
26 | SOCKS5_AUTH_METHOD_NOT_ACCEPTABLE};
| --------------------------------- previous import of `SOCKS5_AUTH_METHOD_NOT_ACCEPTABLE` here
27 | use self::consts::*;
| ^^^^^^^^^^^^^^^^ already imported
error: aborting due to 4 previous errors
error: Could not compile `shadowsocks-rust`.
Caused by:
process didn't exit successfully: `rustc src/lib.rs --crate-name shadowsocks --crate-type lib -g -C metadata=2fc07067b8de6c6d -C extra-filename=-2fc07067b8de6c6d --out-dir /root/shadowsocks-rust/target/debug/deps --emit=dep-info,link -L dependency=/root/shadowsocks-rust/target/debug/deps --extern env_logger=/root/shadowsocks-rust/target/debug/deps/libenv_logger-b5cbb3261a7cf0b9.rlib --extern net2=/root/shadowsocks-rust/target/debug/deps/libnet2-b6b6880cb3760238.rlib --extern time=/root/shadowsocks-rust/target/debug/deps/libtime-7aab5f3d0922a9c7.rlib --extern tokio_core=/root/shadowsocks-rust/target/debug/deps/libtokio_core-0e3b140a238a4fac.rlib --extern rand=/root/shadowsocks-rust/target/debug/deps/librand-35167bebb3b301e7.rlib --extern serde_json=/root/shadowsocks-rust/target/debug/deps/libserde_json-495865e2a32427b9.rlib --extern num_cpus=/root/shadowsocks-rust/target/debug/deps/libnum_cpus-ab660b52aabdf27e.rlib --extern clap=/root/shadowsocks-rust/target/debug/deps/libclap-3dd1816abdd6d05f.rlib --extern log=/root/shadowsocks-rust/target/debug/deps/liblog-3f5cdedd18fc1617.rlib --extern lru_cache=/root/shadowsocks-rust/target/debug/deps/liblru_cache-c88a2240722514d9.rlib --extern tokio_io=/root/shadowsocks-rust/target/debug/deps/libtokio_io-4c864bc373e642f9.rlib --extern futures=/root/shadowsocks-rust/target/debug/deps/libfutures-869f64ff8eedaf94.rlib --extern openssl=/root/shadowsocks-rust/target/debug/deps/libopenssl-6efc5177c7886417.rlib --extern libc=/root/shadowsocks-rust/target/debug/deps/liblibc-b2b114c5e6d5dfb5.rlib --extern bytes=/root/shadowsocks-rust/target/debug/deps/libbytes-e331f03e535ffb30.rlib --extern crypto=/root/shadowsocks-rust/target/debug/deps/libcrypto-0c6fe23f715e724b.rlib --extern lazy_static=/root/shadowsocks-rust/target/debug/deps/liblazy_static-6f95aedc50e46c4f.rlib --extern base64=/root/shadowsocks-rust/target/debug/deps/libbase64-842526b6c0d7016e.rlib --extern qrcode=/root/shadowsocks-rust/target/debug/deps/libqrcode-19223e4abbbc3aaf.rlib --extern domain=/root/shadowsocks-rust/target/debug/deps/libdomain-c5c968620668b77d.rlib --extern byteorder=/root/shadowsocks-rust/target/debug/deps/libbyteorder-77f0324d9153219f.rlib -L native=/root/shadowsocks-rust/target/debug/build/rust-crypto-ed6f35bcd4283630/out` (exit code: 101)
# root @ simonsmh in ~/shadowsocks-rust on git:master o [9:45:13] C:101
$
Both openssl and openssl-sys package build properly on my device now.
What is your rustc
version?
Have you modified anything in this project? Is that from master
branch?
That should not happen, I can't reproduce it both on my laptop and my VPS.
I clone this port without any modification...
And I don't think I have anything like rustc
cargo version is 0.15
rustc 1.14 🤣
Please try to upgrade it to v1.16
Is it fixed already? @simonsmh
Uh I haven't test it. It's not in the Debian testing repo.
Y. T. CHUNG notifications@github.com于2017年3月25日周六 22:58写道:
Is it fixed already? @simonsmh https://github.com/simonsmh
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/zonyitoo/shadowsocks-rust/issues/36#issuecomment-289216919, or mute the thread https://github.com/notifications/unsubscribe-auth/AJEkgz7Hp4WAwrODsNmGLoMgmwFwpvguks5rpSuYgaJpZM4LY3K2 .
According to travis' build, it should works fine for the latest version of stable and nightly rust.
Closing now. Reopen if you still have problems after upgraded.
😂I cant reopen it haha Anyway thanks for your wonderful work!
Y. T. CHUNG notifications@github.com于2017年3月25日周六 23:04写道:
According to travis' build https://travis-ci.org/zonyitoo/shadowsocks-rust, it should works fine for the latest version of stable and nightly rust.
Closing now. Reopen if you still have problems after upgraded.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zonyitoo/shadowsocks-rust/issues/36#issuecomment-289217274, or mute the thread https://github.com/notifications/unsubscribe-auth/AJEkgzX_u70ygJnzLfGlN0XrrkpaekL9ks5rpSzwgaJpZM4LY3K2 .
BTW, I have pushed some modifications, which should make it work for old version of rustc
. Please try again.
Confirmed that it works now. Thx.
BTW I set up the rust/cargo environment by apt.