Shadowsocks-libev: 不能编译ss-libev

Created on 18 Jan 2017  ·  70Comments  ·  Source: shadowsocks/shadowsocks-libev

Please answer these questions before submitting your issue. Thanks!

What version of shadowsocks-libev are you using?

2017.1.18 17:00的版本

What operating system are you using?

centos 7.2 with 4.10.0 rc2

What did you do?

./autogen.sh

What did you expect to see?

What did you see instead?

libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'auto'.
libtoolize: copying file 'auto/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:10: installing 'auto/compile'
configure.ac:12: installing 'auto/missing'
configure.ac:309: error: required file 'libcork/Makefile.in' not found
configure.ac:309: error: required file 'libipset/Makefile.in' not found
src/Makefile.am: installing 'auto/depcomp'
autoreconf: automake failed with exit status: 1

What is your config in detail (with all sensitive info masked)?

Most helpful comment

@Sherlock-Holo

git submodule init && git submodule update

All 70 comments

并且如果继续运行

./configure

会提示

checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking whether make supports nested variables... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking whether make supports nested variables... (cached) yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen... no
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... yes
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for pcre-config... pcre-config
checking for pcre headers in ... not found
checking for library containing pcre_exec... -lpcre
checking pcre.h usability... yes
checking pcre.h presence... yes
checking for pcre.h... yes
checking pcre/pcre.h usability... no
checking pcre/pcre.h presence... no
checking for pcre/pcre.h... no
checking for asciidoc... /usr/bin/asciidoc
checking for xmlto... /usr/bin/xmlto
checking for gzip... /usr/bin/gzip
checking for mv... /usr/bin/mv
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for thread local storage (TLS) class... __thread
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for compress2 in -lz... yes
checking for dlopen... (cached) no
checking for dlopen in -ldl... (cached) yes
checking openssl/evp.h usability... yes
checking openssl/evp.h presence... yes
checking for openssl/evp.h... yes
checking openssl/rsa.h usability... yes
checking openssl/rsa.h presence... yes
checking for openssl/rsa.h... yes
checking openssl/rand.h usability... yes
checking openssl/rand.h presence... yes
checking for openssl/rand.h... yes
checking openssl/err.h usability... yes
checking openssl/err.h presence... yes
checking for openssl/err.h... yes
checking openssl/sha.h usability... yes
checking openssl/sha.h presence... yes
checking for openssl/sha.h... yes
checking openssl/pem.h usability... yes
checking openssl/pem.h presence... yes
checking for openssl/pem.h... yes
checking openssl/engine.h usability... yes
checking openssl/engine.h presence... yes
checking for openssl/engine.h... yes
checking for EVP_EncryptInit_ex in -lcrypto... yes
checking for RAND_pseudo_bytes... yes
checking for EVP_EncryptInit_ex... yes
checking whether OpenSSL_add_all_algorithms is declared... yes
checking for C/C++ restrict keyword... __restrict
checking for netdb.h... yes
checking for library containing inet_ntop... none required
checking whether inet_ntop is declared... yes
checking for what kind of host... Linux
checking if compiler needs -Werror to reject unknown flags... no
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking if -fstack-protector and -fstack-protector-all are supported.... yes
configure: -fstack-protector enabled in CFLAGS
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for stdint.h... (cached) yes
checking for inttypes.h... (cached) yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking for netdb.h... (cached) yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking for unistd.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for net/if.h... yes
checking for linux/if.h... yes
checking for linux/netfilter_ipv4.h... yes
checking for linux/netfilter_ipv6/ip6_tables.h... yes
checking whether byte ordering is bigendian... no
checking for inline... inline
checking for ssize_t... yes
checking whether to enable assertions... yes
checking for ANSI C header files... (cached) yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for an ANSI C-conforming const... yes
checking for pid_t... yes
checking for size_t... yes
checking for ssize_t... (cached) yes
checking for uint16_t... yes
checking for uint8_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking for sys/socket.h... (cached) yes
checking types of arguments for select... int,fd_set *,struct timeval *
checking return type of signal handlers... void
checking for memset... yes
checking for select... yes
checking for setresuid... yes
checking for setreuid... yes
checking for strerror... yes
checking for getpwnam_r... yes
checking for setrlimit... yes
checking for connect in -lsocket... no
checking for malloc... yes
checking for memset... (cached) yes
checking for socket... yes
checking for sodium_init in -lsodium... no
configure: error: Couldn't find libsodium. Try installing libsodium-dev[el].

但是libsodium-devel已经安装了,看到这个也就不敢make下去了

已测试,Arch Linux同样会出现这个问题

Try ls /usr/local/lib/libsodium.* and ls /usr/lib/libsodimu.* and post your output here.

+1 debian8.0同样的问题。

Arch

ls /usr/local/lib/libsodium.*

[root@HostUS ~]# ls /usr/local/lib/
./  ../  libshadowsocks-libev.a  libshadowsocks-libev.la*  pkgconfig/
[root@HostUS ~]# ls /usr/local/lib/libsodium.*
ls: cannot access '/usr/local/lib/libsodium.*': No such file or directory

ls /usr/lib/libsodimu.*

[root@HostUS ~]# ls /usr/lib/libsodimu.*
ls: cannot access '/usr/lib/libsodimu.*': No such file or directory

Fedora

ls /usr/local/lib/libsodium.*

[root@vultr-Fedora ~]# ls /usr/local/lib/libsodium.*
ls: cannot access '/usr/local/lib/libsodium.*': No such file or directory

ls /usr/lib/libsodimu.*

[root@vultr-Fedora ~]# ls /usr/lib/libsodimu.*
ls: cannot access '/usr/lib/libsodimu.*': No such file or directory

~# ls /usr/local/lib/libsodium.*
ls: cannot access /usr/local/lib/libsodium.*: No such file or directory

~# ls /usr/lib/libsodimu.*
ls: cannot access /usr/lib/libsodimu.*: No such file or directory

感觉会不会跟Remove embedded libraries这一次commit有关

According to your output, there is no libsodium installed on your system.

同样的问题,而且系统libsodium已经安装了

是没有安装,但现在Fedora和Arch都安装了libsodium,但是autogen.sh和configure出现同样报错,而且

ls /usr/local/lib/libsodium.*
ls /usr/lib/libsodimu.*

两者同样是no such file or directory

经排查在我这确实libsodium-dev没有安装,装好之后
./autogen.sh继续报错
configure.ac:309: error: required file 'libcork/Makefile.in' not found
configure.ac:309: error: required file 'libipset/Makefile.in' not found

./configure继续报错
configure: error: Couldn't find libudns. Try installing libudns-dev or udns-deve

在Arch上只有libsodium,并没有dev后缀的,而Fedora上是devel后缀,而有无后缀两种都安装了

udns-devel libev-devel这两者需要手动安装,最后会报

config.status: error: cannot find input file: `Makefile.in' 

Clone a clean repo and try again.

@Sherlock-Holo

git submodule init && git submodule update

The best way to verify the building process is check here: https://travis-ci.org/shadowsocks/shadowsocks-libev

已经尝试了删除了整个目录重新clone下来,但是还是这个问题

Try git submodule init && git submodule update

手动安装了所需,删除了整个目录,运行了git submodule init && git submodule update
前面都通过了,make报错,上面我打错了,是debian8.2
make all-recursive
make[1]: Entering directory '/shadowsocks-libev'
Making all in libcork
make[2]: Entering directory '/shadowsocks-libev/libcork'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/shadowsocks-libev/libcork'
Making all in libipset
make[2]: Entering directory '/shadowsocks-libev/libipset'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/shadowsocks-libev/libipset'
Making all in src
make[2]: Entering directory '/shadowsocks-libev/src'
CC libshadowsocks_libev_la-encrypt.lo
encrypt.c: In function 'crypto_stream_xor_ic':
encrypt.c:296:9: error: implicit declaration of function 'crypto_stream_chacha20_ietf_xor_ic' [-Werror=implicit-function-declaration]
return crypto_stream_chacha20_ietf_xor_ic(c, m, mlen, n, (uint32_t)ic, k);
^
cc1: all warnings being treated as errors
Makefile:811: recipe for target 'libshadowsocks_libev_la-encrypt.lo' failed
make[2]: * [libshadowsocks_libev_la-encrypt.lo] Error 1
make[2]: Leaving directory '/shadowsocks-libev/src'
Makefile:463: recipe for target 'all-recursive' failed
make[1]:
[all-recursive] Error 1
make[1]: Leaving directory '/shadowsocks-libev'
Makefile:371: recipe for target 'all' failed
make: *
* [all] Error 2

成功了,thanks for your help
另外,是不是仓库直接引用了他人的仓库而引起的?这是咱的推断

encrypt.c:296:9: error: implicit declaration of function 'crypto_stream_chacha20_ietf_xor_ic' [-Werror=implicit-function-declaration]
return crypto_stream_chacha20_ietf_xor_ic(c, m, mlen, n, (uint32_t)ic, k);
^

你的libsodium太旧了

@wongsyrone
好的,我尝试下编译。

@wongsyrone
谢谢各位,我卸载了老版本的libsodium。
根据上面@madeye给的链接
git clone https://github.com/jedisct1/libsodium
./autogen.sh
./configure && make
make install
最终通过了

ls /usr/local/lib/libsodium.*                                                                                                                                          
/usr/local/lib/libsodium.a  /usr/local/lib/libsodium.la  /usr/local/lib/libsodium.so  /usr/local/lib/libsodium.so.18  /usr/local/lib/libsodium.so.18.1.1
ls /usr/lib/lib*                                                                                                                                                                              [11:51:08]
/usr/lib/libsodium.a  /usr/lib/libsodium.la  /usr/lib/libsodium.so  /usr/lib/libsodium.so.18  /usr/lib/libsodium.so.18.1.1



md5-f03412e8e2890c78759bd7e0b14f7ee3



configure: error: Couldn't find libudns. Try installing libudns-dev or udns-devel.



md5-f03412e8e2890c78759bd7e0b14f7ee3



yum install udns-devel                                                                                                                                                 
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 base: muug.ca
 extras: muug.ca
 updates: muug.ca
No package udns-devel available.
Error: Nothing to do



md5-f03412e8e2890c78759bd7e0b14f7ee3



yum install libudns-dev                                                                                                                                               
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 base: muug.ca
 extras: muug.ca
 updates: muug.ca
No package libudns-dev available.
Error: Nothing to do



md5-f03412e8e2890c78759bd7e0b14f7ee3



yum install udns-devel libev-devel                                                                                                                                     [11:58:22]
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: muug.ca
 * extras: muug.ca
 * updates: muug.ca
No package udns-devel available.
Package libev-devel-4.15-6.el7.x86_64 already installed and latest version
Nothing to do

configure: error: Couldn't find libudns. Try installing libudns-dev or udns-devel.

已经安装了 https://github.com/jedisct1/libsodium 还是不能通过编译

@wongsyrone @Sherlock-Holo 能不能帮忙看一下

@baggiogogo 请问libsodium安装到哪个目录?

如果原来有的话要卸载,用git clone然后进入libsodium目录编译,和编译ss是一样的。
git clone https://github.com/jedisct1/libsodium
cd libsodium
./autogen.sh
./configure && make
make install
完成后再进入ss目录编译ss,确定是和我一样的问题再这样操作,他们直接安装libsodium也通过了,我这个大概是少数派。
这三个是必须安装的:libev-dev libudns-dev libsodium-dev

@baggiogogo 试过编译libsodium一直都不成功. 后来用了 yum install epel-release yum install libsodium-devel 成功

Ubuntu 16.04上面一直搞不定,returned exit code 2,说是dependency没有,我看了一下,所有的依赖包都应该安装了。

还是有错误
ss_local-encrypt.o: In function crypto_stream_xor_ic': /root/shadowsocks-libev/src/encrypt.c:296: undefined reference tocrypto_stream_chacha20_ietf_xor_ic'
collect2: error: ld returned 1 exit status
Makefile:635: recipe for target 'ss-local' failed
make[3]: * [ss-local] Error 1
make[3]: Leaving directory '/root/shadowsocks-libev/src'
Makefile:463: recipe for target 'all-recursive' failed
make[2]:
[all-recursive] Error 1
make[2]: Leaving directory '/root/shadowsocks-libev'
Makefile:371: recipe for target 'all' failed
make[1]:
[all] Error 2
make[1]: Leaving directory '/root/shadowsocks-libev'
dh_auto_build: make -j1 returned exit code 2
debian/rules:25: recipe for target 'build' failed
make: *
[build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

You need a patch, like jessie-backports, to remove chacha20-ietf support.

Refer 0003 patch on page:

Why this patch has not been merged ?

@debiansid the patch is only for old system, which doesn't support chacha20-ietf cipher. Debian Stretch doesn't need this patch, either (which means Stretch does support chacha20-ietf).

debian8 编译libsodium后还是错误:

dpkg-shlibdeps: error: no dependency information found for /usr/local/lib/libsodium.so.18 (used by debian/shadowsocks-libev/usr/bin/ss-redir)
Hint: check if the library actually comes from a package.
dh_shlibdeps: dpkg-shlibdeps -Tdebian/shadowsocks-libev.substvars debian/shadowsocks-libev/usr/bin/ss-redir debian/shadowsocks-libev/usr/bin/ss-local debian/shadowsocks-libev/usr/bin/ss-tunnel debian/shadowsocks-libev/usr/bin/ss-server debian/shadowsocks-libev/usr/bin/ss-manager returned exit code 2
debian/rules:25: recipe for target 'binary' failed
make: * [binary] Error 2
dpkg-buildpackage: error: debian/rules binary gave error exit status 2

If you want to use chacha20-ietf, you may compile latest libsodium release on old Debian distro.
For CentOS family, you have to add ldconfig searching dir in case dynamic libraries not found.

If just want to pass the compilation, you can simply comment out that line.

I got same error here

root@VPS:~/shadowsocks-libev# ./autogen.sh && dpkg-buildpackage -b -us -uc -i
Can't exec "aclocal": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 326.
autoreconf: failed to run aclocal: No such file or directory

@debiansid my solution is that edit /usr/bin/dpkg-shlibdeps and change "my $ignore_missing_info = 0" to "my $ignore_missing_info = 1".

ubuntu 14 installed libsodium git version,still got errors like this.

dpkg-shlibdeps: error: no dependency information found for /usr/lib/libsodium.so.18 (used by debian/shadowsocks-libev/usr/bin/ss-local)
dh_shlibdeps: dpkg-shlibdeps -Tdebian/shadowsocks-libev.substvars debian/shadowsocks-libev/usr/bin/ss-manager debian/shadowsocks-libev/usr/bin/ss-tunnel debian/shadowsocks-libev/usr/bin/ss-local debian/shadowsocks-libev/usr/bin/ss-redir debian/shadowsocks-libev/usr/bin/ss-server returned exit code 2
make: * [binary] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2

@jiee006 thanks that did the trick,but I believe there should be better way to fix it.

编译不通过,按照以上的方法,dpkg的时候出现undefined reference to `crypto_stream_chacha20_ietf_xor_ic',最新的libsodium编译。Debian 8.

dpkg-shlibdeps: error: no dependency information found for /usr/local/lib/libsodium.so.18 (used by debian/shadowsocks-libev/usr/bin/ss-tunnel)
Hint: check if the library actually comes from a package.
dh_shlibdeps: dpkg-shlibdeps -Tdebian/shadowsocks-libev.substvars debian/shadowsocks-libev/usr/bin/ss-server debian/shadowsocks-libev/usr/bin/ss-manager debian/shadowsocks-libev/usr/bin/ss-redir debian/shadowsocks-libev/usr/bin/ss-tunnel debian/shadowsocks-libev/usr/bin/ss-local returned exit code 2
debian/rules:25: recipe for target 'binary' failed
make: * [binary] Error 2
dpkg-buildpackage: error: debian/rules binary gave error exit status 2

============
以上运行于Ubuntu 16.04的出错信息。

@regers0 Too bad! When I install those packages, I always found "Unable to locate package xxx". What should I do? What respo I should add to /etc/apt/sources.list?

My OS is Ubuntu 16.04 but I am not that sure if the VPS supplier has the entire system deployed on my VPS.

@muronghan more detailed log, please.

@regers0
E: Unable to locate package asciidoc-base
E: Unable to locate package libcork-dev
E: Unable to locate package libcorkipset-dev

@regers0 OK, it seems you guys are busy in handling other emergency. I noticed it kept updated every a few hours. I will wait until a stable version would be released in near future. Thanks for your guys efforts.

@muronghan for asciidoc-base, it should be asciidoc for ubuntu 16.04.
for libcork*, maybe you can find it in universe repo:

v2.6.2 compiles well under debian unstable:

and debian jessie-backports as well:

sources (with a few backported patches):

@debiansid regarding the "error: no dependency information found" problem under ubuntu 14,
just cp /usr/local/lib/libsodim.so /usr/lib/ and cp /usr/local/lib/libsodim.so.18 /usr/lib/ then it will work. I installed the latest libsodium using @baggiogogo 's way, and it seems the libraries only installed into/usr/local/lib.

No I managed to install libsodium into /use/lib
@ramnode:~$ ls /usr/lib/libso*
/usr/lib/libsodium.a /usr/lib/libsodium.so.18
/usr/lib/libsodium.la /usr/lib/libsodium.so.18.1.1
/usr/lib/libsodium.so

Now, I have the newest libsodium-dev installed on Ubuntu Server 14.04.5 (4.4.0-59). And followed @sxcsfan instruction to cp ,,,,, to ....... but stop at "dpkg-buildpackage -b -us -uc -i:. The error displayed as:

undefined reference to crypto_stream_chacha20_ietf_xor_ic' collect2: error: ld returned 1 exit status make[3]: *** [ss-local] Error 1 make[3]: Leaving directory/tmp/shadowsocks-libev/src'
make[2]: * [all-recursive] Error 1
make[2]: Leaving directory /tmp/shadowsocks-libev' make[1]: *** [all] Error 2 make[1]: Leaving directory/tmp/shadowsocks-libev'
dh_auto_build: make -j1 returned exit code 2
make: *
[build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

So there needs a patch to remove chacha20_ietf? How and where should I put this patch?

Mannnnn, looks mess everywhere now.

For debian8,
echo "deb http://ftp.jp.debian.org/debian sid main" >> /etc/apt/sources.list
apt-get install libsodium-dev
you can install the latest libsodium and everything will be ok.

@muronghan for debian 8 (jessie), you don't need to compile anything, just use standard apt repo.
it's described in wiki:

If you really want to build ss-libev from source, you still can install all build dependencies from jessie-backports.

@rogers0 thank you very much, but it still had following errors:

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
shadowsocks-libev : Depends: init-system-helpers (>= 1.18~) but 1.14ubuntu1 is to be installed
Depends: libpcre3 (>= 1:8.35) but 1:8.31-2ubuntu2.3 is to be installed
E: Unable to correct problems, you have held broken packages.

...
It seems to request latest version of the dependencies package. All the issues above seems to ask so. Now the thing is, people may deploy ss in all kinds of environment that the packages may not be fully upgrade or even they do not know how to upgrade them...... so can you guys go back a little bit?

通过源码编译libsodium,并且顺利编译出ss,但无法运行出现下面报错的话,运行下ldconfig就行。

error while loading shared libraries: libsodium.so.18: cannot open shared object file: No such file or directory

@muronghan the log shows that you want to install ss-libev from debian unstable to your ubuntu system. That's very wrong.
I cannot comment anything on this case.

@rogers0 I have successfully deployed ss on my VPS with Ubuntu Server 16.04. Thanks!

I installed all the dependency packages what could be found, including the latest one instructed by baddiogogo i.e. the libsodium project. And then followed sxcsfan's instruction to copy two files of libosdium from /usr/local/lib/ /usr/lib/.

Then it worked. (however I am not sure if the same thing could worked on Ubuntu 14.04)

Dependency issues fixed by code I believe

I tried to compile it on an OpenVZ VPS under Ubuntu 14.04.5 (kernel 2.6). It failed as expected, mostly because the dependencies were too out-of-date. So can I say it safely that this new version ss is not applicable to be deployed on OVZ VPS?

Compiled the recent ss on Ubuntu Server 14.04.5 (kernel 3.13) successfully. But if not cp the two libsodium files frm /usr/local/lib/ to /usr/lib/ manually, when run dpkg -i shadowsocks-libev, it will report the error as:

Preparing to unpack shadowsocks-libev_2.6.2-1_amd64.deb ...
Unpacking shadowsocks-libev (2.6.2-1) ...
Setting up shadowsocks-libev (2.6.2-1) ...
/usr/bin/ss-server: error while loading shared libraries: libsodium.so.18: cannot open shared object file: No such file or directory
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for ureadahead (0.100.0-16) ...
ureadahead will be reprofiled on next reboot

Please refer to the comment I made in another thread:

checking for setreuid... yes
checking for strerror... yes
checking for getpwnam_r... yes
checking for setrlimit... yes
checking for connect in -lsocket... no
checking for malloc... yes
checking for memset... (cached) yes
checking for socket... yes
checking udns.h usability... yes
checking udns.h presence... yes
checking for udns.h... yes
checking for dns_dnlen in -ludns... yes
checking ev.h usability... no
checking ev.h presence... no
checking for ev.h... no
configure: error: Couldn't find libev. Try installing libev-dev[el].

yum install libev-devel

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

  • base: centos.ustc.edu.cn
  • extras: mirrors.zju.edu.cn
  • updates: mirrors.zju.edu.cn
    Setting up Install Process
    Package libev-devel-4.03-3.el6.x86_64 already installed and latest version
    Nothing to do

表示已经装了libev-devel 的,但是./configure 时,
提示我configure: error: Couldn't find libev. Try installing libev-dev[el].

请大神们救救我

关于 ./configure 出现 configure: error: Couldn't find libev. Try installing libev-dev[el].

问题已解决:
要安装libev4.x86_64 而不是libev.x86_64

Hi, I am also meet the same problem when I run the below command in ubuntu 16.04 64-bit

make package/shadowsocks-libev/compile V=99

The error message like this:

checking` for sodium_init in -lsodium... no
configure: error: The Sodium crypto library libraries not found.

And I have install the libsodium by the source file.

$ ls /usr/local/lib/libsodium.* 
/usr/local/lib/libsodium.a   /usr/local/lib/libsodium.so     /usr/local/lib/libsodium.so.18.4.0
/usr/local/lib/libsodium.la  /usr/local/lib/libsodium.so.18

$ ls /usr/lib/libsodimu.*:
ls: cannot access '/usr/lib/libsodimu.*': No such file or directory

Why it still can not find the sodium lib?
I tried to cp the sodium source files to the package dir , but it still fail.

maybe your libsodium version is not support
you need to change libsodium version and try again
but i use old version ss-libev now

Jerning Chan

在 2017年9月30日 星期六,16:39,oldstar 写道:

Hi, I am also meet the same problem when I run the below command in ubuntu 16.04 64-bit
make package/shadowsocks-libev/compile V=99
The error message like this:
checking` for sodium_init in -lsodium... no configure: error: The Sodium crypto library libraries not found.
And I have install the libsodium by the source file.
$ ls /usr/local/lib/libsodium.* /usr/local/lib/libsodium.a /usr/local/lib/libsodium.so /usr/local/lib/libsodium.so.18.4.0 /usr/local/lib/libsodium.la (http://libsodium.la) /usr/local/lib/libsodium.so.18 $ ls /usr/lib/libsodimu.: ls: cannot access '/usr/lib/libsodimu.': No such file or directory
Why it still can not find the sodium lib?
I tried to cp the sodium source files to the package dir , but it still fail.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub (https://github.com/shadowsocks/shadowsocks-libev/issues/1093#issuecomment-333293981), or mute the thread (https://github.com/notifications/unsubscribe-auth/AMCNwrLWH3BiHdd62BL5oRS_eXp0094Kks5snf5LgaJpZM4Lmn4M).

@Jerning Yes, you are rigth. It need the 1.0.10 version.Thanks!

其实咱们好像可以用中文😂
我英文太烂了。。。
不客气,你现在是make 哪个版本呀?
我已经换回旧版的ss-libev了

Jerning Chan

在 2017年9月30日 星期六,17:40,oldstar 写道:

@Jerning (https://github.com/jerning) Yes, you are rigth. It need the 1.0.10 version.Thanks!


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub (https://github.com/shadowsocks/shadowsocks-libev/issues/1093#issuecomment-333297082), or mute the thread (https://github.com/notifications/unsubscribe-auth/AMCNwpqA29C5bc6SgaZMSP0jJyteL26Oks5sngx7gaJpZM4Lmn4M).

哈哈哈, 好吧, 我也是蹩脚英文...我是用openwrt的交叉编译工具的,想用在rasp上, 但老遇到奇奇怪怪的问题。现在还没编译通过...又缺一个c-ares的库

rasp呀,这个确实是有点点麻烦的,你是在rasp 上 安装 openwrt么?
不过如果你打算长期用rasp来做fq 网关的话,我建议你换x86架构的机器
因为我帮别人弄了2部rasp做这种网络,但是都分别在使用1年和半年后,出现好像供电不足的情况
当然,他是 7x24 开着的
现在也换成x86的机器来做了

Jerning Chan

在 2017年9月30日 星期六,17:56,oldstar 写道:

哈哈哈, 好吧, 我也是蹩脚英文...我是用openwrt的交叉编译工具的,想用在rasp上, 但老遇到奇奇怪怪的问题。现在还没编译通过...又缺一个c-ares的库


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub (https://github.com/shadowsocks/shadowsocks-libev/issues/1093#issuecomment-333297852), or mute the thread (https://github.com/notifications/unsubscribe-auth/AMCNwngJez2BOwIB9Eh1AIDvPiupxgNiks5snhA0gaJpZM4Lmn4M).

Was this page helpful?
0 / 5 - 0 ratings