cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: BUG - Build fails at gethostbyname() check

From: Yang Tse <yangsita_at_gmail.com>
Date: Fri, 6 Jun 2008 12:48:22 +0200

2008/6/6, Michael James wrote:

> My configuration is probably atypical:
>
> Using the Cygwin environment with the MSVC compiler.

I would also add, at least, the "contortioned" adjective to it. This
might even work but certainly some special things will be required to
properly drive the auto* stuff inside the configure script.

> It is obvious
> that the configure script was not set up for this as it passes $CC a
> lot of gcc style compiler options to MS's cl.exe. Fortunately cl is
> polite enough to print a diagnostic that it doesn't recognize the
> option and proceed anyway.

Since the configure script is using gcc's options instead of MS's
ones, you are reporting here that that your build environment is not
properly set up to use MS's toolchain.

Could you show us the values of _all_ environment variables that are
active in the cygwin shell before you invoke the configure script ?

This will help me to reproduce what you seem to be suffering.

> # This has worked for me in the past
> $ ./configure --prefix=/develop/contrib/curl-7.18.0 --enable-static
> --disable-shared --disable-ftp --disable-file --disable-ldap
> --disable-ldaps --disable-dict --disable-telnet --disable-tftp
> --disable-manual --disable-ipv6 --disable-verbose --disable-ares
> --disable-sspi --disable-crypto-auth --disable-cookies --without-ssl
> --without-zlib --without-libssh2 --without-ca-bundle -without-ca-path
> --without-libidn CC='cl -nologo -DCURL_STATICLIB' LDFLAGS=ws2_32.lib
>
> # This is what I have had to use as of 7.18.2
> $ ./configure --prefix=/develop/contrib/curl-7.18.2 --enable-static
> --disable-shared --disable-ftp --disable-file --disable-ldap
> --disable-ldaps --disable-dict --disable-telnet --disable-tftp
> --disable-manual --disable-ipv6 --disable-verbose --disable-ares
> --disable-sspi --disable-crypto-auth --disable-cookies --without-ssl
> --without-zlib --without-libssh2 --without-ca-bundle -without-ca-path
> --without-libidn CC='cl -nologo -DCURL_STATICLIB' LDFLAGS='ws2_32.lib
> winmm.lib' winsock_LIB=ws2_32.lib

This way of using LDFLAGS would not be the standard way of specifying
additional link libraries. But given the fact that your setup isn't
very common I'll refrain myself and wait for your environment
variables settings before making any further statement regarding this.

> I guess this problem boils down to the configure script setting values
> based on assumption instead of actual tests. I thought the entire
> point of these scripts is to run the test and not rely on host
> identifier tags, etc.

Well... The configure script assumes that if you don't tell it that
you are cross-compiling you are not doing so, and as such uses the
host's tools and properties which in your case are the cygwin ones.

-- 
-=[Yang]=-
Received on 2008-06-06