2017-01-22 10 views
2

Windows用のLinux(Debian Jessie)からクロスコンパイルしようとしています。私はzlibOpenSSLをコンパイルしました。そして、cURLの設定スクリプトはライブラリを見つけましたが、それでもSSLサポートがオフになっていると言いました。Windows用OpenSSLサポートでcURLをクロスコンパイルできません

これは私が使用ビルドスクリプトである:それは成功したライブラリを見つけ

# ZLIB 
cd /builds 
curl -O -J http://www.zlib.net/zlib-1.2.11.tar.gz 
tar xf zlib-1.2.11.tar.gz 
cd /builds/zlib-1.2.11 
CC=x86_64-w64-mingw32-gcc ./configure --prefix=/usr/x86_64-w64-mingw32 --static 
make && make install 

# OPENSSL 
cd /builds 
curl -O -J https://www.openssl.org/source/openssl-1.1.0c.tar.gz 
tar xf openssl-1.1.0c.tar.gz 
cd /builds/openssl-1.1.0c 
CROSS_COMPILE="x86_64-w64-mingw32-" ./Configure -DHAVE_STRUCT_TIMESPEC -lz -lws2_32 zlib mingw64 no-shared --prefix=/usr/x86_64-w64-mingw32 
make depend 
make && make install 

# CURL 
cd /builds 
curl -O -J https://curl.haxx.se/download/curl-7.52.1.tar.gz 
cd /builds/curl-7.52.1 
./configure --prefix=/usr/x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --enable-optimize --with-ssl=/usr/x86_64-w64-mingw32 

が、その後SSLが理由だけで--with-ssl

checking whether to enable Windows native SSL/TLS (Windows native builds only)... no 
checking whether to enable Apple OS native SSL/TLS... no 
checking for gdi32... yes 
configure: PKG_CONFIG_LIBDIR will be set to "/usr/x86_64-w64-mingw32/lib/pkgconfig" 
checking for x86_64-w64-mingw32-pkg-config... /usr/bin/pkg-config 
checking for openssl options with pkg-config... found 
configure: pkg-config: SSL_LIBS: "-lssl -lcrypto " 
configure: pkg-config: SSL_LDFLAGS: "-L/usr/x86_64-w64-mingw32/lib " 
configure: pkg-config: SSL_CPPFLAGS: "-I/usr/x86_64-w64-mingw32/include " 
checking for HMAC_Update in -lcrypto... no 
checking for HMAC_Init_ex in -lcrypto... no 
checking for ssl_version in -laxtls... no 
configure: WARNING: SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more. 
configure: WARNING: Use --with-ssl, --with-gnutls, --with-polarssl, --with-cyassl, --with-nss, --with-axtls, --with-winssl, or --with-darwinssl to address this. 
checking default CA cert bundle/path... configure: WARNING: skipped the ca-cert path detection when cross-compiling 
no 
checking whether to use builtin CA store of SSL library... no 

を逃す全ログの無効だ:https://paste.kde.org/pwzewydif

答えて

1

へsslサポートでクロスコンパイルカール、私はCPP_FLAGSLD_FLAGSではなく、プロに直接場所を提供--with-sslでパスをviding:

export DESTDIR="$CURL_INSTALL_DIR" 
export CPPFLAGS="-I${OPENSSL_INSTALL_DIR}/include -I${ZLIB_INSTALL_DIR}/include" 
export LDFLAGS="-L${OPENSSL_INSTALL_DIR}/lib -L${ZLIB_INSTALL_DIR}/lib" 
export LIBS="-lssl -lcrypto" 

CURL_ARGS="--with-ssl --with-zlib --disable-ftp --disable-gopher 
    --disable-file --disable-imap --disable-ldap --disable-ldaps 
    --disable-pop3 --disable-proxy --disable-rtsp --disable-smtp 
    --disable-telnet --disable-tftp --without-gnutls --without-libidn 
    --without-librtmp --disable-dict" 

chmod 777 buildconf 
./buildconf 
./configure --host="${CROSS_COMPILE}" $CURL_ARGS 

make -j16 
make install 

チェックこのcurl cross compilation script

+0

それはしかし、動作しませんでした私は、cURLの7.49を構築することがわかっ*ではなく> = 7.50 *。。。これは設定スクリプトのバグかもしれません。作者に報告したいと思います。とにかく助けてくれてありがとう。 –

+0

喜んでそれは7.49であなたのために働くが、私は7.50を構築するために何の問題もありません。*(私は7.50.0をテストしました)おそらく問題は別の場所です –

+0

7.52.1はどうですか?そして、あなたはどのプラットフォームを構築していますか? (btw、残念ながらビルド中にcURL自体に未定義の参照がありました...私はドッカーのイメージを再構築して別のものを試してみました...) –

関連する問題