shadowsocks / shadowsocks-libev

Bug-fix-only libev port of shadowsocks. Future development moved to shadowsocks-rust
https://github.com/shadowsocks/shadowsocks-rust
GNU General Public License v3.0
15.79k stars 5.7k forks source link

configure: error: Cannot find pcre library. Configure --with-pcre=DIR #2663

Open rty813 opened 4 years ago

rty813 commented 4 years ago

What version of shadowsocks-libev are you using?

v3.3.4

What operating system are you using?

ubuntu16.04

What did you do?

cross compile shadowsocks-libev for arm-openwrt-linux

What did you see instead?

.....
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking checking for pcre includes in /home/orca/zjy/ss/compile/local... checking for pcre headers in /home/orca/zjy/ss/compile/local/include... ok
configure: adding /home/orca/zjy/ss/compile/local/lib to RPATH
checking for library containing pcre_exec... no
configure: error: Cannot find pcre library. Configure --with-pcre=DIR

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

$HOST is arm-openwrt-linux My command line is LIBS="-lpthread -lm" LDFLAGS="-Wl,-static -static -static-libgcc -L$PREFIX/lib" CFLAGS="-I$PREFIX/include -nostdlib" ./configure --host=$HOST --prefix=$PREFIX --disable-ssp --disable-documentation --with-mbedtls=$PREFIX --with-pcre=$PREFIX --with-sodium=$PREFIX

I have compiled pcre 8.44 with arm-openwrt-linux toolchain. My configure command line is ./configure --host=$HOST --prefix=$PREFIX --disable-shared --enable-utf8 --enable-unicode-properties

config.log are as follows: shadowsocks-libev.config.log pcre.config.log

ctpxyza commented 4 years ago

you may need to compile libpcre with cross-compile tools also.