redsocks icon indicating copy to clipboard operation
redsocks copied to clipboard

根据wiki的教程编译,出现链接失败

Open ghost opened this issue 4 years ago • 1 comments

root@CulturedYearly-VM:~/redsocks-master# aarch64-linux-android-gcc -I/root/android-arm64/include -fPIC -O3 -DDISABLE_SHADOWSOCKS -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 socks5.o base.o base64.o md5.o utils.o redudp.o socks5-udp.o gen/version.o -L/root/android-arm64/lib -Wl,-Bstatic -levent -lssl -lcrypto -Wl,-Bdynamic -ldl -lz
main.o:(.data+0x10): undefined reference to `autoproxy_app_subsys'
main.o:(.data+0x18): undefined reference to `cache_app_subsys'
main.o:(.data+0x28): undefined reference to `tcpdns_subsys'
redsocks.o: In function `redsocks_drop_client':
redsocks.c:(.text+0x7a4): undefined reference to `autoproxy_subsys'
redsocks.c:(.text+0x7a8): undefined reference to `autoproxy_subsys'
redsocks.o: In function `redsocks_accept_client':
redsocks.c:(.text+0x1fdc): undefined reference to `autoproxy_subsys'
redsocks.c:(.text+0x1fe8): undefined reference to `autoproxy_subsys'
redsocks.o: In function `redsocks_onenter':
redsocks.c:(.text+0x2544): undefined reference to `direct_connect_subsys'
redsocks.c:(.text+0x2548): undefined reference to `http_connect_subsys'
redsocks.c:(.text+0x254c): undefined reference to `direct_connect_subsys'
redsocks.c:(.text+0x2550): undefined reference to `http_connect_subsys'
redsocks.c:(.text+0x2554): undefined reference to `http_relay_subsys'
redsocks.c:(.text+0x2558): undefined reference to `socks4_subsys'redsocks.c:(.text+0x2564): undefined reference to `http_relay_subsys'
redsocks.c:(.text+0x2568): undefined reference to `socks4_subsys'redsocks.o:(.data.rel.ro+0x0): undefined reference to `direct_connect_subsys'
redsocks.o:(.data.rel.ro+0x8): undefined reference to `http_connect_subsys'
redsocks.o:(.data.rel.ro+0x10): undefined reference to `http_relay_subsys'
redsocks.o:(.data.rel.ro+0x18): undefined reference to `socks4_subsys'
clang80: error: linker command failed with exit code 1 (use -v to see invocation)
root@CulturedYearly-VM:~/redsocks-master#

ghost avatar Feb 02 '21 13:02 ghost

这个教程略微旧了一点。后期增加的一些文件对应的.o文件没有加入那个命令行中。 自己把命令行改一下把autoproxy.o direct.o http-relay.o http-connect.o ipcache.o tcpdns.o socks4.o 加上去应该就可以了

shpask [email protected] 于 2021年2月2日周二 21:02写道:

root@CulturedYearly-VM:/redsocks-master# aarch64-linux-android-gcc -I/root/android-arm64/include -fPIC -O3 -DDISABLE_SHADOWSOCKS -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 socks5.o base.o base64.o md5.o utils.o redudp.o socks5-udp.o gen/version.o -L/root/android-arm64/lib -Wl,-Bstatic -levent -lssl -lcrypto -Wl,-Bdynamic -ldl -lz main.o:(.data+0x10): undefined reference to autoproxy_app_subsys' main.o:(.data+0x18): undefined reference to cache_app_subsys' main.o:(.data+0x28): undefined reference to tcpdns_subsys' redsocks.o: In function redsocks_drop_client': redsocks.c:(.text+0x7a4): undefined reference to autoproxy_subsys' redsocks.c:(.text+0x7a8): undefined reference to autoproxy_subsys' redsocks.o: In function redsocks_accept_client': redsocks.c:(.text+0x1fdc): undefined reference to autoproxy_subsys' redsocks.c:(.text+0x1fe8): undefined reference to autoproxy_subsys' redsocks.o: In function redsocks_onenter': redsocks.c:(.text+0x2544): undefined reference to direct_connect_subsys' redsocks.c:(.text+0x2548): undefined reference to http_connect_subsys' redsocks.c:(.text+0x254c): undefined reference to direct_connect_subsys' redsocks.c:(.text+0x2550): undefined reference to http_connect_subsys' redsocks.c:(.text+0x2554): undefined reference to http_relay_subsys' redsocks.c:(.text+0x2558): undefined reference to socks4_subsys'redsocks.c:(.text+0x2564): undefined reference to http_relay_subsys' redsocks.c:(.text+0x2568): undefined reference to socks4_subsys'redsocks.o:(.data.rel.ro+0x0): undefined reference to direct_connect_subsys' redsocks.o:(.data.rel.ro+0x8): undefined reference to http_connect_subsys' redsocks.o:(.data.rel.ro+0x10): undefined reference to http_relay_subsys' redsocks.o:(.data.rel.ro+0x18): undefined reference to socks4_subsys' clang80: error: linker command failed with exit code 1 (use -v to see invocation) root@CulturedYearly-VM:/redsocks-master#

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/semigodking/redsocks/issues/160, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAP2XD57CNNCM4TA2W226KDS47ZVPANCNFSM4W6S74PA .

semigodking avatar Feb 07 '21 04:02 semigodking