THIS MESSAGE IS ALSO POSTED ON StackOverflow 
<https://stackoverflow.com/questions/47508243/curl-build-doesnt-recognize-zlib-and-openssl-when-specifying-install-directorie>

I'm trying to build Curl with support for: OpenSSL, ZLIB and NGHTTP2. Note that 
I'm building from Ubuntu to Windows (32-bit) host: i686-w64-mingw32.

The structure I have is the following: /opt/mingw64/Win32 which includes the 
following subdirectories:

 <https://i.stack.imgur.com/sKwlA.png>
When I try to build curl using the following commands:

wget https://curl.haxx.se/download/curl-7.56.1.tar.gz
tar xf curl-7.56.1.tar.gz
cd curl-7.56.1/
CPPFLAGS="-I/opt/mingw64/Win32/openssl/include 
-I/opt/mingw64/Win32/zlib/include -I/opt/mingw64/Win32/nghttp2/include"
LDFLAGS="-L/opt/mingw64/Win32/openssl/lib -L/opt/mingw64/Win32/zlib/lib 
-L/opt/mingw64/Win32/nghttp2/lib"
LIBS="-lssl -lcrypto -lz -nghttp2"
./configure --host=i686-w64-mingw32 --prefix=/opt/mingw64/Win32/curl --with-ssl 
--with-zlib=/opt/mingw64/Win32/zlib/include 
--with-nghttp2=/opt/mingw64/Win32/zlib --disable-ldap --disable-ldaps
it comes back with the configuration menu which shows me that ZLIB and nghttp2 
are not enabled. Besides that I also doubt wether curl is linked to the right 
openssl library that I specified in the /opt/mingw64/Win32/openssl directory.

The overview:

curl version:     7.56.1
  Host setup:       i686-w64-mingw32
  Install prefix:   /opt/mingw64/Win32/curl
  Compiler:         i686-w64-mingw32-gcc
  SSL support:      enabled (OpenSSL)
  SSH support:      no      (--with-libssh2)
  zlib support:     no      (--with-zlib)
  GSS-API support:  no      (--with-gssapi)
  TLS-SRP support:  enabled
  resolver:         POSIX threaded
  IPv6 support:     enabled
  Unix sockets support: no      (--enable-unix-sockets)
  IDN support:      no      (--with-{libidn2,winidn})
  Build libcurl:    Shared=yes, Static=yes
  Built-in manual:  enabled
  --libcurl option: enabled (--disable-libcurl-option)
  Verbose errors:   enabled (--disable-verbose)
  SSPI support:     no      (--enable-sspi)
  ca cert bundle:   no
  ca cert path:     no
  ca fallback:      no
  LDAP support:     enabled (winldap)
  LDAPS support:    enabled
  RTSP support:     enabled
  RTMP support:     no      (--with-librtmp)
  metalink support: no      (--with-libmetalink)
  PSL support:      no      (libpsl not found)
  HTTP2 support:    disabled (--with-nghttp2)
  Protocols:        DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS LDAP LDAPS 
POP3 POP3S RTSP SMB SMBS SMTP SMTPS TELNET TFTP
Why can't it find the nghttp2 and zlib library while I specify with the install 
directories (I think it takes the default library for my Ubuntu environment)?

Following are build commands in order to validate if required:

I have built ZLIB with the following code:

wget https://zlib.net/zlib-1.2.11.tar.xz
tar xf zlib-1.2.11.tar.xz
cd zlib-1.2.11
./configure --prefix=/opt/mingw64/Win32/zlib
make
make install
The command to build OpenSSL:

wget https://www.openssl.org/source/openssl-1.1.0g.tar.gz
tar -xvzf openssl-1.1.0g.tar.gz
cd openssl-1.1.0g/
./Configure mingw shared --cross-compile-prefix=i686-w64-mingw32- 
--prefix=/opt/mingw64/Win32/openssl
make
make install
The command to build nghttp2:

wget 
https://github.com/nghttp2/nghttp2/releases/download/v1.28.0/nghttp2-1.28.0.tar.gz
tar xf nghttp2-1.28.0.tar.gz
cd nghttp2-1.28.0/
./configure --host=i686-w64-mingw32 --prefix=/opt/mingw64/Win32/nghttp2 
OPENSSL_CFLAGS="/I/opt/mingw64/Win32/openssl/include" 
OPENSSL_LIBS="-L/opt/mingw64/Win32/openssl/lib -lssl -lcrypto"
make
make install



Kind regards,


Thomas
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Reply via email to