cURL / Mailing Lists / curl-library / Single Mail

curl-library

[Cross-compiling] "#error "CURL_SIZEOF_LONG definition is missing!""

From: Gilles <gilles.ganault_at_free.fr>
Date: Sat, 11 Jun 2011 00:37:11 +0200

Hello,

        I'm trying to cross-compile an application for uClinux that relies
on Libcurl, but it fails compiling.

First, I add the right toolchain in the PATH, and ran the following:
================
./configure --disable-gpg ac_cv_func_malloc_0_nonnull=yes
--build=i686-pc-linux --host=bfin-linux-uclibc
target=bfin-linux-uclibc CC=bfin-linux-uclibc-gcc
AR=bfin-linux-uclibc-ar RANLIB=bfin-linux-uclibc-ranlib CFLAGS="-O2
-Wall -I/usr/src/uClinux-dist-2010R1-RC5/linux-2.6.x/include
-I/usr/src/uClinux-dist-2010R1-RC5/lib/libcurl/curl-7.19.6/include"
LDFLAGS="-static
-L/usr/src/uClinux-dist-2010R1-RC5/lib/libcurl/build-curl-7.19.6/lib/.libs"
================

Next, I ran "make", which fails thusly:
================
  CC opkg_download.o
In file included from
/usr/src/uClinux-dist-2010R1-RC5/lib/libcurl/curl-7.19.6/include/curl/curl.h:36,
                 from opkg_download.c:36:
/usr/src/uClinux-dist-2010R1-RC5/lib/libcurl/curl-7.19.6/include/curl/curlrules.h:80:4:
error: #error "CURL_SIZEOF_LONG definition is missing!"
In file included from
/usr/src/uClinux-dist-2010R1-RC5/lib/libcurl/curl-7.19.6/include/curl/curl.h:36,
                 from opkg_download.c:36:
/usr/src/uClinux-dist-2010R1-RC5/lib/libcurl/curl-7.19.6/include/curl/curlrules.h:81:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘Compilation_aborted_CURL_SIZEOF_LONG_is_missing’
/usr/src/uClinux-dist-2010R1-RC5/lib/libcurl/curl-7.19.6/include/curl/curlrules.h:95:4:
error: #error "CURL_TYPEOF_CURL_OFF_T definition is missing!"
/usr/src/uClinux-dist-2010R1-RC5/lib/libcurl/curl-7.19.6/include/curl/curlrules.h:100:4:
error: #error "CURL_FORMAT_CURL_OFF_T definition is missing!"
/usr/src/uClinux-dist-2010R1-RC5/lib/libcurl/curl-7.19.6/include/curl/curlrules.h:105:4:
error: #error "CURL_FORMAT_CURL_OFF_TU definition is missing!"
/usr/src/uClinux-dist-2010R1-RC5/lib/libcurl/curl-7.19.6/include/curl/curlrules.h:110:4:
error: #error "CURL_FORMAT_OFF_T definition is missing!"
/usr/src/uClinux-dist-2010R1-RC5/lib/libcurl/curl-7.19.6/include/curl/curlrules.h:115:4:
error: #error "CURL_SIZEOF_CURL_OFF_T definition is missing!"
/usr/src/uClinux-dist-2010R1-RC5/lib/libcurl/curl-7.19.6/include/curl/curlrules.h:120:4:
error: #error "CURL_SUFFIX_CURL_OFF_T definition is missing!"
/usr/src/uClinux-dist-2010R1-RC5/lib/libcurl/curl-7.19.6/include/curl/curlrules.h:125:4:
error: #error "CURL_SUFFIX_CURL_OFF_TU definition is missing!"
/usr/src/uClinux-dist-2010R1-RC5/lib/libcurl/curl-7.19.6/include/curl/curlrules.h:154:
error: ‘curl_off_t’ undeclared here (not in a function)
/usr/src/uClinux-dist-2010R1-RC5/lib/libcurl/curl-7.19.6/include/curl/curlrules.h:154:
error: ‘CURL_SIZEOF_CURL_OFF_T’ undeclared here (not in a function)
In file included from opkg_download.c:36:
/usr/src/uClinux-dist-2010R1-RC5/lib/libcurl/curl-7.19.6/include/curl/curl.h:191:
error: expected declaration specifiers or ‘...’ before ‘curl_off_t’
In file included from
/usr/src/uClinux-dist-2010R1-RC5/lib/libcurl/curl-7.19.6/include/curl/curl.h:1906,
                 from opkg_download.c:36:
/usr/src/uClinux-dist-2010R1-RC5/lib/libcurl/curl-7.19.6/include/curl/typecheck-gcc.h:547:
error: expected declaration specifiers or ‘...’ before ‘curl_off_t’
/usr/src/uClinux-dist-2010R1-RC5/lib/libcurl/curl-7.19.6/include/curl/typecheck-gcc.h:548:
error: expected declaration specifiers or ‘...’ before ‘curl_off_t’
opkg_download.c:40:26: error: openssl/conf.h: No such file or
directory
opkg_download.c:41:25: error: openssl/evp.h: No such file or directory
opkg_download.c:42:25: error: openssl/err.h: No such file or directory
opkg_download.c:43:25: error: openssl/ssl.h: No such file or directory
opkg_download.c: In function ‘opkg_download’:
opkg_download.c:136: error: expected specifier-qualifier-list before
‘curl_off_t’
opkg_download.c:136: error: expected statement before ‘)’ token
opkg_download.c:137: error: expected specifier-qualifier-list before
‘curl_off_t’
opkg_download.c:137: error: expected statement before ‘)’ token
opkg_download.c: In function ‘openssl_init’:
opkg_download.c:491: warning: implicit declaration of function
‘OPENSSL_config’
opkg_download.c:492: warning: implicit declaration of function
‘OpenSSL_add_all_algorithms’
opkg_download.c:493: warning: implicit declaration of function
‘ERR_load_crypto_strings’
opkg_download.c: In function ‘opkg_curl_init’:
opkg_download.c:579: error: expected specifier-qualifier-list before
‘curl_off_t’
opkg_download.c:579: error: expected statement before ‘)’ token
opkg_download.c:587: error: expected specifier-qualifier-list before
‘curl_off_t’
opkg_download.c:587: error: expected statement before ‘)’ token
opkg_download.c:598: error: expected specifier-qualifier-list before
‘curl_off_t’
opkg_download.c:598: error: expected statement before ‘)’ token
opkg_download.c:606: error: expected specifier-qualifier-list before
‘curl_off_t’
opkg_download.c:606: error: expected statement before ‘)’ token
opkg_download.c:613: error: expected specifier-qualifier-list before
‘curl_off_t’
opkg_download.c:613: error: expected statement before ‘)’ token
opkg_download.c:618: error: expected specifier-qualifier-list before
‘curl_off_t’
opkg_download.c:618: error: expected statement before ‘)’ token
opkg_download.c:624: error: expected specifier-qualifier-list before
‘curl_off_t’
opkg_download.c:624: error: expected statement before ‘)’ token
opkg_download.c:635: error: expected specifier-qualifier-list before
‘curl_off_t’
opkg_download.c:635: error: expected statement before ‘)’ token
opkg_download.c:650: error: expected specifier-qualifier-list before
‘curl_off_t’
opkg_download.c:650: error: expected statement before ‘)’ token
opkg_download.c:653: error: expected specifier-qualifier-list before
‘curl_off_t’
opkg_download.c:653: error: expected statement before ‘)’ token
opkg_download.c:657: error: expected specifier-qualifier-list before
‘curl_off_t’
opkg_download.c:657: error: expected statement before ‘)’ token
opkg_download.c:658: error: expected specifier-qualifier-list before
‘curl_off_t’
opkg_download.c:658: error: expected statement before ‘)’ token
opkg_download.c:664: error: expected specifier-qualifier-list before
‘curl_off_t’
opkg_download.c:664: error: expected statement before ‘)’ token
opkg_download.c:669: error: expected specifier-qualifier-list before
‘curl_off_t’
opkg_download.c:669: error: expected statement before ‘)’ token
opkg_download.c:672: error: expected specifier-qualifier-list before
‘curl_off_t’
opkg_download.c:672: error: expected statement before ‘)’ token
opkg_download.c:673: error: expected specifier-qualifier-list before
‘curl_off_t’
opkg_download.c:673: error: expected statement before ‘)’ token
make[2]: *** [opkg_download.lo] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1
================

Does someone know what to do?

Thank you.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-06-11