Re: Porting curl to android
Date: Fri, 4 Jul 2014 07:28:49 +0200
On Thu, Jul 03, 2014 at 02:45:04PM +0000, Rick Breen wrote:
> First, thank you (all) for your work and effort in supplying the world with very functional open source code.
> This is probably a newb question, but I'm in the thick of porting code and bringing-up an Android-based Freescale iMX6 arm processor and we needed a bunch of libs including libcurl, but I am having trouble finding the correct ./configure options to create the headers and such, so that I can build libcurl on Android (from Ubuntu 12.04 64b).
> I've been googling and grepping and trying all the ./configure options that seem to make sense and that have worked on this platform before, but, even though the configure script builds everything fine, later when I do the android make
There are two different ways to compile for Android documented in docs/INSTALL.
> make libcurl, I get:
> external/curl/include/curl/curlrules.h:142:3: error: size of array '__curl_rule_01__' is negative
> external/curl/include/curl/curlrules.h:152:3: error: size of array '__curl_rule_02__' is negative
> make: *** [out/target/product/evk_6sl/obj/STATIC_LIBRARIES/libcurl_intermediates/lib/file.o] Error 1
> This must be because the ./configure options I've been using are wrong for cross-compiling from Ubuntu64 to Android ARM? I have been using many variations of this command:
It could also be an issue that has been fixed in the nearly 4 years since this
version was released.
> I can't be the only person trying to build libcurl on Android. Can anyone tell me what I'm doing wrong, or what the correct incantation is to ./configure to build from Ubuntu 64b for ARMv7 Freescale iMX6? (I don't think the details of the iMX6 are important, but I include that here anyway).
> Huge thanks for any help,
> ./configure --host=arm-linux CROSS_COMPILE=~/aosp/myandroid/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin/arm-eabi-
> ./configure --host=arm-linux --enable-cross-compile -disable-tftp --disable-sspi --disable-ipv6 --disable-ldaps --disable-ldap --disable-telnet --disable-pop3 --disable-ftp --without-ssl --disable-imap --disable-smtp --disable-pop3 --disable-rtsp --disable-ares --without-ca-bundle --disable-warnings --disable-manual --without-nss --enable-shared --without-zlib --without-random --without-libidn
There are some things missing (or not shown) in this command that are listed in
> curl version: 7.21.2
List admin: http://cool.haxx.se/list/listinfo/curl-library
Received on 2014-07-04