cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Building libcurl for android - proposed documentation change

From: William Grim <grimwm_at_gmail.com>
Date: Fri, 10 Oct 2014 22:42:11 -0700

Sure. In fact, I'll do a little bit more and post the raw form of how I do
a configure and build for android. I cannot actually post the Python
script I built to build and package libcurl for different platforms,
because I did not ask permission from my work.

Anyway, here are the commands my script eventually executes to build
libcurl (static build with SSL and http support) for Android. Please note
that the path of where you store your ndk toolchain may differ, and your
arguments to make-standalone-toolchain.sh may differ. Of course, your
options to libcurl's configure will likely differ. However, it gives you a
straightforward idea on how to build for android. PLEASE NOTE: the
argument to --with-ssl must point to a version of openssl that is already
built, with both the "include" and "lib" directories present and properly
populated.

   1. sh
   /usr/local/android/android-ndk-r9c/build/tools/make-standalone-toolchain.sh
   --platform=android-15 --arch=arm --toolchain=arm-linux-androideabi-4.8
   --install-dir=/tmp/android-15
   2. ./configure --enable-threaded-resolver
   --with-ssl=/mnt/dev/Contrib2/android/arm/openssl/openssl-1.0.1h
   --disable-shared --disable-ftp --disable-file --disable-ldap
   --disable-ldaps --disable-rtsp --disable-dict --disable-telnet
   --disable-tftp --disable-pop3 --disable-imap --disable-smtp
   --disable-gopher --disable-manual --enable-proxy --enable-ipv6
   --enable-cookies --enable-symbol-hiding --disable-versioned-symbols
   --disable-soname-bump --disable-sspi --disable-ntlm-wb
   --host=arm-linux-androideabi
   --prefix=/home/wgrim/dev/Contrib2/android/arm/curl/curl-7.37.0
   3. make -j4
   4. make install

Now, as far as what I might say, to keep it concise, I think it'd go
something like this:

      - prepare the toolchain of the Android NDK for standalone use; this
can
        be done by invoking a script:
        /path/to/android-ndk/build/tools/make-standalone-toolchain.sh

I hope this provides some clarity on several fronts. Let me know if you
want anything else.

-Will

On Fri, Oct 10, 2014 at 2:54 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Sat, 4 Oct 2014, William Grim wrote:
>
> Ah, I probably misunderstood. The wording still seems a little odd to me,
>> but that message intention would be alright, I think.
>>
>
> So, given that the original text seems to cause confusion or not tell the
> whole story, and the suggested update apparently also isn't crystal clear,
> can you think of a way to express it better?
>
> Personally I've never built curl for Android so I don't have a lot to
> offer for the text.
>
> --
>
> / daniel.haxx.se
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html

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