3.3.0
macOS 10.14.5
I tried to build statically with all library needed so that I could share the binary with friends. However, after I specified the libev lib location, the binary can't be excuted and prompted that it needs the libev dynamic lib.
Below is my configuration parameters
sudo ./configure --prefix=/Users/tonyzou/Downloads/shadowsocks-libev-3.3.0/ --with-pcre=/usr/local/opt/pcre --disable-documentation --with-sodium=/usr/local/opt/libsodium --with-ev=/usr/local/opt/libev --with-cares=/usr/local/opt/c-ares --with-mbedtls=/usr/local/opt/mbedtls --enable-static --enable-shared
A binary for macOS without the need of dynamic libs
A binary for macOS with the need of dynamic libs
See above
You can build with cmake:
brew install cmake c-ares libev libsodium mbedtls pcre
cd shadowsocks-libev
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DWITH_DOC_HTML=OFF -DWITH_DOC_MAN=OFF -DWITH_STATIC=ON ..
make -j4
The executables are placed in build/bin/.
Note that it's hardly build a totally static linked binary on macOS, but after the above steps the binaries only links to /usr/lib/libSystem.B.dylib which is provided on all macOS.
Most helpful comment
You can build with cmake:
The executables are placed in
build/bin/.Note that it's hardly build a totally static linked binary on macOS, but after the above steps the binaries only links to
/usr/lib/libSystem.B.dylibwhich is provided on all macOS.