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.83k stars 5.69k forks source link

failed to find "pcre-exec" after `make install` pcre while cross-compiling windows version #865

Closed ghost closed 8 years ago

ghost commented 8 years ago

Please answer these questions before submitting your issue. Thanks!

What version of shadowsocks-libev are you using?

the repos'

What operating system are you using?

debian 8

What did you do?

cross-compile ss-libev for win through mingw-w64 4.0.6-1

What did you expect to see?

please..

What did you see instead?

a lot of errors (I've overcomed those in openssl and zlib)

> tree ../pcre
../pcre
├── bin
│   ├── libpcre2-8-0.dll
│   ├── libpcre2-posix-0.dll
│   ├── pcre2-config
│   ├── pcre2grep.exe
│   └── pcre2test.exe
├── include
│   ├── pcre2.h
│   └── pcre2posix.h
├── lib
│   ├── libpcre2-8.a
│   ├── libpcre2-8.dll.a
│   ├── libpcre2-8.la
│   ├── libpcre2-posix.a
│   ├── libpcre2-posix.dll.a
│   ├── libpcre2-posix.la
│   └── pkgconfig
│       ├── libpcre2-8.pc
│       └── libpcre2-posix.pc
├── lib
│   ├──...
└── share
    ├── doc
    │   └──...
    ├── man
    │   └──...

11 directories, 182 files
> ./configure --host=x86_64-w64-mingw32 --prefix=$HOME/win/ss --with-openssl=$HOME/win/prebuilt --with-zlib=$HOME/win/zlib --with-pcre=$HOME/win/pcre
checking for x86_64-w64-mingw32-gcc... x86_64-w64-mingw32-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether x86_64-w64-mingw32-gcc accepts -g... yes
checking for x86_64-w64-mingw32-gcc option to accept ISO C89... none needed
checking whether x86_64-w64-mingw32-gcc understands -c and -o together... yes
checking how to run the C preprocessor... x86_64-w64-mingw32-gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /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 x86_64-w64-mingw32-strip... x86_64-w64-mingw32-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
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 x86_64-w64-mingw32-gcc... gcc3
checking for x86_64-w64-mingw32-ar... x86_64-w64-mingw32-ar
checking the archiver (x86_64-w64-mingw32-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-w64-mingw32
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by x86_64-w64-mingw32-gcc... /usr/bin/x86_64-w64-mingw32-ld
checking if the linker (/usr/bin/x86_64-w64-mingw32-ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/x86_64-w64-mingw32-nm -B
checking the name lister (/usr/bin/x86_64-w64-mingw32-nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-w64-mingw32 format... func_convert_file_nix_to_w32
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/x86_64-w64-mingw32-ld option to reload object files... -r
checking for x86_64-w64-mingw32-objdump... x86_64-w64-mingw32-objdump
checking how to recognize dependent libraries... file_magic ^x86 archive import|^x86 DLL
checking for x86_64-w64-mingw32-dlltool... x86_64-w64-mingw32-dlltool
checking how to associate runtime and link libraries... func_cygming_dll_for_implib
checking for x86_64-w64-mingw32-ar... (cached) x86_64-w64-mingw32-ar
checking for archiver @FILE support... @
checking for x86_64-w64-mingw32-strip... (cached) x86_64-w64-mingw32-strip
checking for x86_64-w64-mingw32-ranlib... x86_64-w64-mingw32-ranlib
checking command to parse /usr/bin/x86_64-w64-mingw32-nm -B output from x86_64-w64-mingw32-gcc object... ok
checking for sysroot... no
checking for x86_64-w64-mingw32-mt... no
checking for mt... mt
configure: WARNING: using cross tools not prefixed with host triplet
checking if mt is a manifest tool... no
checking for dlfcn.h... no
checking for objdir... .libs
checking if x86_64-w64-mingw32-gcc supports -fno-rtti -fno-exceptions... no
checking for x86_64-w64-mingw32-gcc option to produce PIC... -DDLL_EXPORT -DPIC
checking if x86_64-w64-mingw32-gcc PIC flag -DDLL_EXPORT -DPIC works... yes
checking if x86_64-w64-mingw32-gcc static flag -static works... yes
checking if x86_64-w64-mingw32-gcc supports -c -o file.o... yes
checking if x86_64-w64-mingw32-gcc supports -c -o file.o... (cached) yes
checking whether the x86_64-w64-mingw32-gcc linker (/usr/bin/x86_64-w64-mingw32-ld) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
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 checking for pcre includes in /home/win/pcre... checking for pcre headers in /home/win/pcre/include... not found
configure: adding /home/win/pcre/lib to RPATH
checking for library containing pcre_exec... no
configure: error: Cannot find pcre library. Configure --with-pcre=DIR
simonsmh commented 8 years ago

apt install libpcre3-dev

ghost commented 8 years ago

@simonsmh

I knew, and I did, but not working. I think it may involve cross-compiling.

Also I've checked the precedent https://github.com/shadowsocks/shadowsocks-libev/issues/813#issuecomment-246076060 Archlinux users are lucky that they have a prepared toolchain, but debian/ubuntu does not. So I did it manually

> ./configure --host=x86_64-w64-mingw32 --prefix=$HOME/win/pcre
> make && make install
ghost commented 8 years ago

OK. solved by https://github.com/shadowsocks/shadowsocks-libev/issues/857#issuecomment-250642557

hdid commented 8 years ago

I have the same problem. The OS is debian and i get same error. How did you resolve that?

hdid commented 8 years ago

Any help? @haodong