redsocks icon indicating copy to clipboard operation
redsocks copied to clipboard

Compile on Ubuntu 18.04 failed

Open jsvisa opened this issue 6 years ago • 6 comments

When I'm build the redsocks on Ubuntu 18.04 with Linux 4.15.0-43-generic,

with openssl version: OpenSSL 1.1.0g 2 Nov 2017.

The error message as below:

Compile with OpenSSL by default. To compile with PolarSSL, run 'make USE_CRYPTO_POLARSSL=true' instead.
cc -fPIC -O3 -D_BSD_SOURCE -D_DEFAULT_SOURCE -Wall -std=c99 -D_XOPEN_SOURCE=600 -DUSE_CRYPTO_OPENSSL   -c -o parser.o parser.c
cc -fPIC -O3 -D_BSD_SOURCE -D_DEFAULT_SOURCE -Wall -std=c99 -D_XOPEN_SOURCE=600 -DUSE_CRYPTO_OPENSSL   -c -o main.o main.c
cc -fPIC -O3 -D_BSD_SOURCE -D_DEFAULT_SOURCE -Wall -std=c99 -D_XOPEN_SOURCE=600 -DUSE_CRYPTO_OPENSSL   -c -o redsocks.o redsocks.c
cc -fPIC -O3 -D_BSD_SOURCE -D_DEFAULT_SOURCE -Wall -std=c99 -D_XOPEN_SOURCE=600 -DUSE_CRYPTO_OPENSSL   -c -o log.o log.c
cc -fPIC -O3 -D_BSD_SOURCE -D_DEFAULT_SOURCE -Wall -std=c99 -D_XOPEN_SOURCE=600 -DUSE_CRYPTO_OPENSSL   -c -o direct.o direct.c
cc -fPIC -O3 -D_BSD_SOURCE -D_DEFAULT_SOURCE -Wall -std=c99 -D_XOPEN_SOURCE=600 -DUSE_CRYPTO_OPENSSL   -c -o ipcache.o ipcache.c
cc -fPIC -O3 -D_BSD_SOURCE -D_DEFAULT_SOURCE -Wall -std=c99 -D_XOPEN_SOURCE=600 -DUSE_CRYPTO_OPENSSL   -c -o autoproxy.o autoproxy.c
cc -fPIC -O3 -D_BSD_SOURCE -D_DEFAULT_SOURCE -Wall -std=c99 -D_XOPEN_SOURCE=600 -DUSE_CRYPTO_OPENSSL   -c -o encrypt.o encrypt.c
In file included from encrypt.c:50:0:
encrypt.h:92:18: error: field ‘evp’ has incomplete type
     cipher_evp_t evp;
                  ^~~
encrypt.c: In function ‘enc_key_init’:
encrypt.c:919:17: error: storage size of ‘cipher_info’ isn’t known
     cipher_kt_t cipher_info;
                 ^~~~~~~~~~~
encrypt.c:919:17: warning: unused variable ‘cipher_info’ [-Wunused-variable]
At top level:
encrypt.c:146:12: warning: ‘crypto_stream_xor_ic’ defined but not used [-Wunused-function]
 static int crypto_stream_xor_ic(uint8_t *c, const uint8_t *m, uint64_t mlen,
            ^~~~~~~~~~~~~~~~~~~~
encrypt.c:139:18: warning: ‘supported_ciphers_key_size’ defined but not used [-Wunused-const-variable=]
 static const int supported_ciphers_key_size[] =
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~
encrypt.c:134:18: warning: ‘supported_ciphers_iv_size’ defined but not used [-Wunused-const-variable=]
 static const int supported_ciphers_iv_size[] =
                  ^~~~~~~~~~~~~~~~~~~~~~~~~
<builtin>: recipe for target 'encrypt.o' failed
make: *** [encrypt.o] Error 1

jsvisa avatar Jan 08 '19 12:01 jsvisa

See #84

semigodking avatar Jan 08 '19 12:01 semigodking

OpenSSL 1.1.1  11 Sep 2018 (Library: OpenSSL 1.1.1d  10 Sep 2019)

$ git apply patches/disable-ss.patch
error: patch failed: Makefile:1
error: Makefile: patch does not apply
error: patch failed: redsocks.c:56
error: redsocks.c: patch does not apply
error: patch failed: redudp.c:64
error: redudp.c: patch does not apply

goldcome avatar Mar 24 '20 00:03 goldcome

make DISABLE_SHADOWSOCKS=true

goldcome [email protected] 于 2020年3月24日周二 08:45写道:

$ git apply patches/disable-ss.patch error: patch failed: Makefile:1 error: Makefile: patch does not apply error: patch failed: redsocks.c:56 error: redsocks.c: patch does not apply error: patch failed: redudp.c:64 error: redudp.c: patch does not apply

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/semigodking/redsocks/issues/107#issuecomment-602937354, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAP2XD5IYADMASRL3CJY4RLRI77CBANCNFSM4GOVN6RA .

semigodking avatar Mar 25 '20 14:03 semigodking

@semigodking 建议删除 shadowsocks 相关代码,一是它更新比较频繁,二来现在的类似方案也很多,反正都会本地建立 socks5 服务,支持 socks5 就足够了。

rampageX avatar Mar 25 '20 16:03 rampageX

@semigodking 建议删除 shadowsocks 相关代码,一是它更新比较频繁,二来现在的类似方案也很多,反正都会本地建立 socks5 服务,支持 socks5 就足够了。

是的,但改成默认不编译ss比较好,万一有人要用也还可以用。欢迎PR

semigodking avatar Mar 29 '20 02:03 semigodking

我现在在Mac上用的是v2ray和Shadsocks客户端,而且是有多节点,可能需要手动切换。配合一个PF小工具使用https://github.com/sonywork/Brick

sonywork avatar Oct 05 '20 19:10 sonywork