cURL / Mailing Lists / curl-library / Single Mail

curl-library

Unable to build libcurl on mingw with curl-7.26.0

From: Doug <douglas.linder_at_gmail.com>
Date: Tue, 17 Jul 2012 23:09:22 +0800

In summary, trying to build libcurl from source using 7.26.0 and
having no luck at all.

Configure runs fine (or at least doesn't seem to die, although there
are errors in the config.log):

  curl version: 7.26.0
  Host setup: i686-pc-mingw32
  Install prefix: /usr/local
  Compiler: gcc
  SSL support: no (--with-{ssl,gnutls,nss,polarssl,cyassl,axtls} )
  SSH support: no (--with-libssh2)
  zlib support: no (--with-zlib)
  krb4 support: no (--with-krb4*)
  GSSAPI support: no (--with-gssapi)
  SPNEGO support: no (--with-spnego)
  TLS-SRP support: no (--enable-tls-srp)
  resolver: default (--enable-ares / --enable-threaded-resolver)
  ipv6 support: no (--enable-ipv6)
  IDN support: no (--with-libidn)
  Build libcurl: Shared=yes, Static=yes
  Built-in manual: no (--enable-manual)
  --libcurl option: enabled (--disable-libcurl-option)
  Verbose errors: enabled (--disable-verbose)
  SSPI support: no (--enable-sspi)
  ca cert bundle: no
  ca cert path: no
  LDAP support: enabled (winldap)
  LDAPS support: no (--enable-ldaps)
  RTSP support: enabled
  RTMP support: no (--with-librtmp)
  Protocols: DICT FILE FTP GOPHER HTTP IMAP LDAP POP3 RTSP SMTP
TELNET TFTP

and when I try to compile I get:

$ make
Making all in lib
make[1]: Entering directory `/d/projects/moai-dev/3rdparty/curl-7.26.0/lib'
make all-am
make[2]: Entering directory `/d/projects/moai-dev/3rdparty/curl-7.26.0/lib'
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H
-I../include/curl -I../include -I../include -I../lib -I../lib
-DBUILDING_LIBCURL -g0 -O2 -Wno-system-headers -MT
libcurl_la-file.lo -MD -MP -MF ".deps/libcurl_la-file.Tpo" -c -o
libcurl_la-file.lo `test -f 'file.c' || echo './'`file.c; \
        then mv -f ".deps/libcurl_la-file.Tpo"
".deps/libcurl_la-file.Plo"; else rm -f ".deps/libcurl_la-file.Tpo";
exit 1; fi
libtool: compile: gcc -DHAVE_CONFIG_H -I../include/curl -I../include
-I../include -I../lib -I../lib -DBUILDING_LIBCURL -g0 -O2
-Wno-system-headers -MT libcurl_la-file.lo -MD -MP -MF
.deps/libcurl_la-file.Tpo -c file.c -DDLL_EXPORT -DPIC -o
.libs/libcurl_la-file.o
In file included from setup.h:125:0,
                 from file.c:23:
../include/curl/curlbuild.h:165:1: error: unknown type name
'CURL_TYPEOF_CURL_SOCKLEN_T'
../include/curl/curlbuild.h:171:1: error: unknown type name
'CURL_TYPEOF_CURL_OFF_T'
In file included from setup.h:131:0,
                 from file.c:23:
../include/curl/curlrules.h:79:4: error: #error "CURL_SIZEOF_LONG
definition is missing!"
../include/curl/curlrules.h:80:4: error: unknown type name 'Error'
../include/curl/curlrules.h:84:4: error: #error
"CURL_TYPEOF_CURL_SOCKLEN_T definition is missing!"
../include/curl/curlrules.h:85:4: error: expected '=', ',', ';', 'asm'
or '__attribute__' before 'Error'
../include/curl/curlrules.h:85:4: error: unknown type name 'Error'
../include/curl/curlrules.h:89:4: error: #error
"CURL_SIZEOF_CURL_SOCKLEN_T definition is missing!"
../include/curl/curlrules.h:94:4: error: #error
"CURL_TYPEOF_CURL_OFF_T definition is missing!"
../include/curl/curlrules.h:99:4: error: #error
"CURL_FORMAT_CURL_OFF_T definition is missing!"
../include/curl/curlrules.h:104:4: error: #error
"CURL_FORMAT_CURL_OFF_TU definition is missing!"
../include/curl/curlrules.h:109:4: error: #error "CURL_FORMAT_OFF_T
definition is missing!"
../include/curl/curlrules.h:114:4: error: #error
"CURL_SIZEOF_CURL_OFF_T definition is missing!"
../include/curl/curlrules.h:119:4: error: #error
"CURL_SUFFIX_CURL_OFF_T definition is missing!"
../include/curl/curlrules.h:124:4: error: #error
"CURL_SUFFIX_CURL_OFF_TU definition is missing!"
../include/curl/curlrules.h:153:6: error: 'CURL_SIZEOF_CURL_OFF_T'
undeclared here (not in a function)
../include/curl/curlrules.h:173:6: error: 'CURL_SIZEOF_CURL_SOCKLEN_T'
undeclared here (not in a function)
In file included from setup.h:626:0,
                 from file.c:23:
setup_once.h:157:3: error: unknown type name 'Error'
setup_once.h:188:3: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'Error'
setup_once.h:188:3: error: unknown type name 'Error'
setup_once.h:290:5: warning: data definition has no type or storage
class [enabled by default]
In file included from ../include/curl/curl.h:62:0,
                 from cookie.h:26,
                 from urldata.h:69,
                 from file.c:58:
d:\mingw\bin\../lib/gcc/mingw32/4.6.2/../../../../include/winsock2.h:109:8:
error: redefinition of 'struct timeval'
setup_once.h:92:8: note: originally defined here
In file included from urldata.h:69:0,
                 from file.c:58:
cookie.h:36:3: error: expected specifier-qualifier-list before 'bool'
cookie.h:52:3: error: expected specifier-qualifier-list before 'bool'
cookie.h:79:53: error: expected declaration specifiers or '...' before 'bool'
cookie.h:83:50: error: expected declaration specifiers or '...' before 'bool'
cookie.h:84:51: error: expected declaration specifiers or '...' before 'bool'
cookie.h:98:72: error: expected declaration specifiers or '...' before 'bool'
In file included from urldata.h:70:0,
                 from file.c:58:
formdata.h:53:3: error: expected specifier-qualifier-list before 'bool'
In file included from urldata.h:151:0,
                 from file.c:58:
hostip.h:106:1: error: unknown type name 'bool'
hostip.h:150:30: error: expected declaration specifiers or '...' before 'bool'
In file included from imap.h:25:0,
                 from urldata.h:155,
                 from file.c:58:
pingpong.h:47:3: error: expected specifier-qualifier-list before 'bool'
In file included from urldata.h:155:0,
                 from file.c:58:
imap.h:52:3: error: expected specifier-qualifier-list before 'bool'
In file included from urldata.h:157:0,
                 from file.c:58:
smtp.h:67:3: error: expected specifier-qualifier-list before 'bool'
In file included from urldata.h:158:0,
                 from file.c:58:
ftp.h:132:3: error: expected specifier-qualifier-list before 'bool'
In file included from urldata.h:161:0,
                 from file.c:58:
http.h:33:1: error: unknown type name 'bool'
http.h:67:46: error: expected declaration specifiers or '...' before 'bool'
http.h:68:57: error: expected declaration specifiers or '...' before 'bool'
http.h:69:54: error: expected declaration specifiers or '...' before 'bool'
http.h:148:38: error: expected declaration specifiers or '...' before 'bool'
http.h:168:23: error: expected declaration specifiers or '...' before 'bool'
In file included from urldata.h:162:0,
                 from file.c:58:
rtsp.h:29:1: error: unknown type name 'bool'
In file included from file.c:58:0:
urldata.h:238:3: error: expected specifier-qualifier-list before 'bool'
urldata.h:304:3: error: expected specifier-qualifier-list before 'bool'
urldata.h:330:3: error: expected specifier-qualifier-list before 'bool'
urldata.h:401:3: error: expected specifier-qualifier-list before 'bool'
urldata.h:509:61: error: expected declaration specifiers or '...' before 'bool'
urldata.h:510:68: error: expected declaration specifiers or '...' before 'bool'
urldata.h:548:3: error: expected specifier-qualifier-list before 'bool'
urldata.h:637:43: error: expected declaration specifiers or '...' before 'bool'
urldata.h:638:3: error: expected ';' before 'Curl_done_func'
urldata.h:748:3: error: expected specifier-qualifier-list before 'bool'
urldata.h:985:3: error: expected specifier-qualifier-list before 'bool'
urldata.h:1025:3: error: expected specifier-qualifier-list before 'bool'
urldata.h:1097:3: error: expected specifier-qualifier-list before 'bool'
urldata.h:1139:3: error: expected specifier-qualifier-list before 'bool'
urldata.h:1272:3: error: expected specifier-qualifier-list before 'bool'
urldata.h:1372:3: error: expected specifier-qualifier-list before 'bool'
In file included from file.c:62:0:
escape.h:31:25: error: expected declaration specifiers or '...' before 'bool'
In file included from file.c:66:0:
transfer.h:43:51: error: expected declaration specifiers or '...' before 'bool'
transfer.h:51:1: error: unknown type name 'bool'
transfer.h:58:16: error: expected declaration specifiers or '...' before 'bool'
In file included from file.c:67:0:
url.h:38:23: error: expected declaration specifiers or '...' before 'bool'
url.h:38:36: error: expected declaration specifiers or '...' before 'bool'
url.h:39:41: error: expected declaration specifiers or '...' before 'bool'
url.h:40:45: error: expected declaration specifiers or '...' before 'bool'
url.h:41:53: error: expected declaration specifiers or '...' before 'bool'
url.h:42:48: error: expected declaration specifiers or '...' before 'bool'
url.h:43:58: error: expected declaration specifiers or '...' before 'bool'
url.h:44:61: error: expected declaration specifiers or '...' before 'bool'
url.h:45:56: error: expected declaration specifiers or '...' before 'bool'
url.h:47:26: error: expected declaration specifiers or '...' before 'bool'
url.h:65:1: error: unknown type name 'bool'
file.c:93:47: error: expected declaration specifiers or '...' before 'bool'
file.c:95:44: error: expected declaration specifiers or '...' before 'bool'
file.c:96:56: error: expected declaration specifiers or '...' before 'bool'
file.c:98:33: error: expected declaration specifiers or '...' before 'bool'
file.c:108:3: error: 'file_do' undeclared here (not in a function)
file.c:108:3: warning: excess elements in struct initializer [enabled
by default]
file.c:108:3: warning: (near initialization for 'Curl_handler_file')
[enabled by default]
file.c:109:3: error: 'file_done' undeclared here (not in a function)
file.c:109:3: warning: excess elements in struct initializer [enabled
by default]
file.c:109:3: warning: (near initialization for 'Curl_handler_file')
[enabled by default]
file.c:110:3: warning: excess elements in struct initializer [enabled
by default]
file.c:110:3: warning: (near initialization for 'Curl_handler_file')
[enabled by default]
file.c:111:3: error: 'file_connect' undeclared here (not in a function)
file.c:111:3: warning: excess elements in struct initializer [enabled
by default]
file.c:111:3: warning: (near initialization for 'Curl_handler_file')
[enabled by default]
file.c:112:3: warning: excess elements in struct initializer [enabled
by default]
file.c:112:3: warning: (near initialization for 'Curl_handler_file')
[enabled by default]
file.c:113:3: warning: excess elements in struct initializer [enabled
by default]
file.c:113:3: warning: (near initialization for 'Curl_handler_file')
[enabled by default]
file.c:114:3: warning: excess elements in struct initializer [enabled
by default]
file.c:114:3: warning: (near initialization for 'Curl_handler_file')
[enabled by default]
file.c:115:3: warning: excess elements in struct initializer [enabled
by default]
file.c:115:3: warning: (near initialization for 'Curl_handler_file')
[enabled by default]
file.c:116:3: warning: excess elements in struct initializer [enabled
by default]
file.c:116:3: warning: (near initialization for 'Curl_handler_file')
[enabled by default]
file.c:117:3: warning: excess elements in struct initializer [enabled
by default]
file.c:117:3: warning: (near initialization for 'Curl_handler_file')
[enabled by default]
file.c:118:3: error: 'file_disconnect' undeclared here (not in a function)
file.c:118:3: warning: excess elements in struct initializer [enabled
by default]
file.c:118:3: warning: (near initialization for 'Curl_handler_file')
[enabled by default]
file.c:119:3: warning: excess elements in struct initializer [enabled
by default]
file.c:119:3: warning: (near initialization for 'Curl_handler_file')
[enabled by default]
file.c:120:3: warning: excess elements in struct initializer [enabled
by default]
file.c:120:3: warning: (near initialization for 'Curl_handler_file')
[enabled by default]
file.c:121:3: warning: excess elements in struct initializer [enabled
by default]
file.c:121:3: warning: (near initialization for 'Curl_handler_file')
[enabled by default]
file.c:123:1: warning: excess elements in struct initializer [enabled
by default]
file.c:123:1: warning: (near initialization for 'Curl_handler_file')
[enabled by default]
file.c: In function 'file_range':
file.c:139:17: error: 'struct UrlState' has no member named 'use_range'
file.c:139:42: error: 'struct UrlState' has no member named 'range'
file.c:140:37: error: 'struct UrlState' has no member named 'range'
file.c:150:18: error: 'struct UrlState' has no member named 'resume_from'
file.c:157:18: error: 'struct UrlState' has no member named 'resume_from'
file.c:165:18: error: 'struct UrlState' has no member named 'resume_from'
file.c: At top level:
file.c:184:56: error: expected declaration specifiers or '...' before 'bool'
file.c:269:49: error: expected declaration specifiers or '...' before 'bool'
file.c:287:33: error: expected declaration specifiers or '...' before 'bool'
file.c: In function 'file_upload':
file.c:311:45: error: 'struct UrlState' has no member named 'proto'
file.c:321:15: error: storage size of 'file_stat' isn't known
file.c:328:7: error: 'struct connectdata' has no member named 'fread_func'
file.c:328:31: error: 'struct UserDefined' has no member named 'fread_func'
file.c:329:7: error: 'struct connectdata' has no member named 'fread_in'
file.c:330:18: error: 'struct SingleRequest' has no member named
'upload_fromhere'
file.c:338:17: error: 'struct UrlState' has no member named 'resume_from'
file.c:345:30: error: 'struct UserDefined' has no member named 'new_file_perms'
file.c:363:21: error: 'struct UserDefined' has no member named 'infilesize'
file.c:365:43: error: 'struct UserDefined' has no member named 'infilesize'
file.c:368:17: error: 'struct UrlState' has no member named 'resume_from'
file.c:375:18: error: 'struct UrlState' has no member named 'resume_from'
file.c:390:19: error: 'struct UrlState' has no member named 'resume_from'
file.c:391:42: error: 'struct UrlState' has no member named 'resume_from'
file.c:392:20: error: 'struct UrlState' has no member named 'resume_from'
file.c:397:33: error: 'struct UrlState' has no member named 'resume_from'
file.c:398:37: error: 'struct UrlState' has no member named 'resume_from'
file.c:399:20: error: 'struct UrlState' has no member named 'resume_from'
file.c: At top level:
file.c:437:51: error: expected declaration specifiers or '...' before 'bool'
file.c:573:1: error: invalid suffix "CURL_SUFFIX_CURL_OFF_T" on integer constant
file.c:573:1: error: invalid suffix "CURL_SUFFIX_CURL_OFF_T" on integer constant
make[2]: *** [libcurl_la-file.lo] Error 1
make[2]: Leaving directory `/d/projects/moai-dev/3rdparty/curl-7.26.0/lib'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/d/projects/moai-dev/3rdparty/curl-7.26.0/lib'
make: *** [all-recursive] Error 1

Anyone know how to get this working?

There seem to be lots of threads about autotools are under mingw and
various errors, but nothing specifically about this.

I'm not really familiar with autotools, but I see this:

doug_at_zed /d/projects/moai-dev/3rdparty/curl-7.26.0
$ grep failed config.log | wc
    784 3136 24304

with errors like:

configure:36862: result: no
configure:36871: checking deeper for getnameinfo
configure:36888: gcc -o conftest.exe -g0 -O2 -Wno-system-headers
conftest.c -lwldap32 -lws2_32 >&5
C:\DOCUME~1\doug.ZED\LOCALS~1\Temp\ccCcRPCd.o:conftest.c:(.text.startup+0xc):
undefined reference to `getnameinfo'
collect2: ld returned 1 exit status
configure:36888: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "curl"
| #define PACKAGE_TARNAME "curl"
| #define PACKAGE_VERSION "-"
| #define PACKAGE_STRING "curl -"
| #define PACKAGE_BUGREPORT "a suitable curl mailing list:
http://curl.haxx.se/mail/"

Is that normal?

-_- this is really vexing. I thought autotools was supposed to fix
these compatibility issues.

Anyhow, if anyone can give me some guidance on getting this working,
it'd be much appreciated.

(I'm reasonably sure like my build environment is sane; I can compile
expact, a-cres, zlib, etc. without a hitch...)

Cheers,
Doug.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-07-17