Shadowsocks-libev: 不能编译

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

Please answer these questions before submitting your issue. Thanks!

What version of shadowsocks-libev are you using?

2.6.2

What operating system are you using?

Ubuntu 16.04 x64

What did you do?

cd shadowsocks-libev
sudo apt-get install --no-install-recommends build-essential autoconf libtool libssl-dev \
gawk debhelper dh-systemd init-system-helpers pkg-config asciidoc xmlto apg libpcre3-dev zlib1g-dev \
libev-dev libudns-dev libsodium-dev
./autogen.sh

What did you expect to see?

What did you see instead?

./autogen.sh
.^Hlibtoolize: 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)?

aliyun.com hk

Most helpful comment

try
git submodule init && git submodule update

All 11 comments

same here

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

Ubuntu 16.04.1 with kernel 4.9.0-040900-generic #201612111631

$ cd shadowsocks-libev
$ git reset --hard origin/master
$ git pull
$ git submodule init && git submodule update
$ sudo apt-get install --no-install-recommends build-essential autoconf libtool libssl-dev \
    gawk debhelper dh-systemd init-system-helpers pkg-config asciidoc xmlto apg libpcre3-dev zlib1g-dev \
    libev-dev libudns-dev libsodium-dev
$ ./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
$ sudo apt-get install automake
...
Everthing goes ok.

i cloned the latest version code and compile.
my os is ubuntu16.04 lts too,all package installed.
i tried install automake,then:
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

now i changed to version 2.6.2 and all works fine.

try
git submodule init && git submodule update

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的出错信息。

@muronghan

`

Debian / Ubuntu

sudo apt-get install --no-install-recommends autoconf libtool asciidoc zlib1g-dev libssl-dev libpcre3 libpcre3-dev build-essential libpcre3 asciidoc libpcre3-dev zlib1g-dev libssl-dev automake libudns-dev libev-dev xmlto -y

cd shadowsocks-libev

git submodule update --init --recursive

git clone https://github.com/jedisct1/libsodium.git

cd libsodium

./autogen.sh

./configure

make && make install

cd ./..

./

./autogen.sh

./configure

make && make install`

For Debian Jessie/Stretch, please just install from official mirror:
https://github.com/shadowsocks/shadowsocks-libev#debian--ubuntu

For Ubuntu 16.04, please try build script below. (May also work for 14.04 after some minor patch)
It won't build the latest source, but I, as a Debian package maintainer, recommend this way.

If this works, we may add this script to the repo.

# please add xenial-backports repo to your apt source list
# because we use debhelper 10 in that repo
apt install -y git-buildpackage

# build libcork deb if you don't have
gbp clone --pristine-tar https://github.com/rogers0/libcork
cd libcork
git checkout debian
BUILD_DEP=$(perl -ne 'next if /^#/; $p=(s/^Build-Depends:\s*/ / or (/^ / and $p)); s/,|\n|\([^)]+\)//mg; print if $p' < debian/control)
apt install -y $BUILD_DEP
gbp buildpackage -us -uc --git-ignore-branch --git-pristine-tar
cd ..
dpkg -i libcork-dev_*.deb libcork16_*.deb

# build libcorkipset deb if you don't have
gbp clone --pristine-tar https://github.com/rogers0/libcorkipset
cd libcorkipset
git checkout debian
BUILD_DEP=$(perl -ne 'next if /^#/; $p=(s/^Build-Depends:\s*/ / or (/^ / and $p)); s/,|\n|\([^)]+\)//mg; print if $p' < debian/control)
apt install -y $BUILD_DEP
gbp buildpackage -us -uc --git-ignore-branch --git-pristine-tar
cd ..
dpkg -i libcorkipset-dev_*.deb libcorkipset1_*.deb

# build shadowsocks-libev
gbp clone --pristine-tar https://anonscm.debian.org/git/collab-maint/shadowsocks-libev.git
cd shadowsocks-libev
git checkout jessie-backports
BUILD_DEP=$(perl -ne 'next if /^#/; $p=(s/^Build-Depends:\s*/ / or (/^ / and $p)); s/,|\n|\([^)]+\)//mg; print if $p' < debian/control)
apt install -y $BUILD_DEP
gbp buildpackage -us -uc --git-ignore-branch --git-pristine-tar
cd ..
dpkg -i shadowsocks-libev_*.deb

@Windendless thanks,after 'git submodule init && git submodule update' works fine for me

Was this page helpful?
0 / 5 - 0 ratings