shadowsocksr-backup / shadowsocksr-libev

libev port of ShadowsocksR
GNU General Public License v3.0
768 stars 807 forks source link

ubuntu 下编译不过啊 #8

Open lersh opened 6 years ago

lersh commented 6 years ago

ubuntu 16.04 按照教程编译,最后报错

.libs/libshadowsocks_libev_la-tls.o:(.data.rel.ro.local+0x10): multiple definition of `tls_protocol'
.libs/libshadowsocks_libev_la-local.o:(.bss+0x20): first defined here
collect2: error: ld returned 1 exit status
Makefile:573: recipe for target 'libshadowsocks-libev.la' failed
make[3]: *** [libshadowsocks-libev.la] Error 1
make[3]: Leaving directory '/home/selphy/shadowsocksr-libev/src'
Makefile:478: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/selphy/shadowsocksr-libev'
Makefile:387: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/selphy/shadowsocksr-libev'
dh_auto_build: make -j1 returned exit code 2
debian/rules:25: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: 错误: debian/rules build 提供错误退出状态 2
onlinedj commented 6 years ago

diff --git a/src/http.h b/src/http.h index 914815a..e312dd3 100644 --- a/src/http.h +++ b/src/http.h @@ -29,6 +29,6 @@

include

include "protocol.h"

-const protocol_t const http_protocol; +extern const protocol_t const http_protocol;

endif

diff --git a/src/tls.h b/src/tls.h index 3998913..ddbee11 100644 --- a/src/tls.h +++ b/src/tls.h @@ -28,6 +28,6 @@

include "protocol.h"

-const protocol_t const tls_protocol; +extern const protocol_t const tls_protocol;