semigodking / redsocks

transparent redirector of any TCP/UDP connection to proxy
Apache License 2.0
1.16k stars 246 forks source link

Build: encrypt.h:92:18: error: field ‘evp’ has incomplete type #203

Open aTanW opened 2 months ago

aTanW commented 2 months ago

During build this error appeared. I missed library or where to look ?

semigodking commented 2 months ago

You have two choices:

KotVnn commented 2 months ago

You have two choices:

  • Do not compile with shadowsocks and https-connect protocols support
  • Compile with old openssl versions, like 1.0.2u

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 -o redsocks2 parser.o main.o redsocks.o log.o direct.o ipcache.o autoproxy.o encrypt.o shadowsocks.o http-connect.o socks4.o socks5.o http-relay.o base.o base64.o md5.o http-auth.o utils.o redudp.o socks5-udp.o shadowsocks-udp.o tcpdns.o gen/version.o -levent -lssl -lcrypto -ldl /usr/bin/ld: main.o: in functionmain': main.c:(.text.startup+0xcc): undefined reference to SSL_library_init' /usr/bin/ld: main.c:(.text.startup+0xd0): undefined reference toERR_load_crypto_strings' /usr/bin/ld: main.c:(.text.startup+0xd4): undefined reference to SSL_load_error_strings' /usr/bin/ld: main.c:(.text.startup+0xd8): undefined reference toOPENSSL_add_all_algorithms_noconf' /usr/bin/ld: main.c:(.text.startup+0x4c0): undefined reference to EVP_cleanup' /usr/bin/ld: main.c:(.text.startup+0x4c4): undefined reference toERR_free_strings' /usr/bin/ld: redsocks.o:(.data.rel+0x30): undefined reference to https_connect_subsys' /usr/bin/ld: encrypt.o: in functionss_encrypt': encrypt.c:(.text+0x41c): undefined reference to EVP_CIPHER_CTX_cleanup' /usr/bin/ld: encrypt.o: in functionss_decrypt': encrypt.c:(.text+0x58c): undefined reference to EVP_CIPHER_CTX_cleanup' /usr/bin/ld: encrypt.o: in functionenc_ctx_init': encrypt.c:(.text+0x638): undefined reference to EVP_CIPHER_CTX_init' /usr/bin/ld: encrypt.c:(.text+0x6c8): undefined reference toEVP_CIPHER_CTX_cleanup' /usr/bin/ld: encrypt.o: in function enc_ctx_free': encrypt.c:(.text+0x6f0): undefined reference toEVP_CIPHER_CTX_cleanup' /usr/bin/ld: encrypt.o: in function enc_init': encrypt.c:(.text+0x2350): undefined reference toOPENSSL_add_all_algorithms_noconf' /usr/bin/ld: utils.o: in function red_connect_relay_ssl': utils.c:(.text+0x4ac): undefined reference tobufferevent_openssl_filter_new' collect2: error: ld returned 1 exit status make: *** [Makefile:153: redsocks2] Error 1`

I meet this error when make in debian with openssl version 1.0.2u, I can't "make".