lparam/xSocks

在mac下,make失败,如何解决?

luckypoem opened this issue · 5 comments

hi。

yudeMacBook-Air:xSocks brite$ make
LINK xSocksd
clang: warning: argument unused during compilation: '-pthread'
ld: unknown option: --gc-sections
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/Users/yuming/xsocks/xSocksd] Error 1
yudeMacBook-Air:xSocks brite$

感觉在windows下,蛮好用。能否提供一个像shadowsocksX-2.6.3.dmg那样的mac下的客户端程序呢?

我手上没有mac机器,你可以尝试一下修改Makefile,把 --gc-sections选项注释掉再编译看看。

hi.我把 --gc-sections选项注释掉了,再编译还是出错,如何解决?

...
acountry.c:276:22: warning: illegal character encoding in string literal
[-Winvalid-source-encoding]
{ 248, "ax", "land Island" },
^~~~
1 warning generated.
libtool: link: gcc -Qunused-arguments -g0 -Os -o acountry acountry-acountry.o acountry-ares_getopt.o acountry-ares_nowarn.o acountry-ares_strcasecmp.o ./.libs/libcares.a
CC src/util.o
CC src/logger.o
CC src/common.o
CC src/crypto.o
CC src/resolver.o
CC src/daemon.o
CC src/signal.o
CC src/consumer.o
CC src/cache.o
CC src/packet.o
CC src/xSocksd_udprelay.o
CC src/xSocksd_client.o
CC src/xSocksd_remote.o
CC src/xSocksd.o
LINK xSocksd
clang: warning: argument unused during compilation: '-pthread'
ld: library not found for -lrt
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/Users/yuming/xSocks/xSocksd] Error 1
yudeMacBook-Air:xSocks brite$

我建议你放弃在mac上使用,因为没有考虑过兼容mac。
如果有条件,建议你在网关上部署(推荐使用 xTun),这是最好的使用方法。