cURL / Mailing Lists / curl-library / Single Mail


Re: prebuilt libcurl static library for android NDK

From: Alex Powell <>
Date: Mon, 4 Mar 2013 11:46:23 +0000

Dear Guenter,

Thanks for getting back to me. Definitely the version that I get out
from the script seems to work. I believed I was using the standalone
toolchain, but I was unsure about various paths so I hardcoded them in
the script - one of the big issues I tend to face is I have multiple
tool chains for various platforms, and ensuring you're using the right
tool all the time was worrying me. The CFLAGS were extracted from
various people's experiences around the net. I actually get a binary
out without them, but not sure if its right on all platforms
everywhere. The LDFlags were there because once again there are
various places the libraries can be found. Some people recommended
copying SSL libraries into the NDK, but I decided that looked dubious
- and also did not show its workings! It also works when pointed at
the libcrypto and libssl you provided to a previous emailer.

However when all is said and done I will be using your official
libcurl.a build when it becomes available - you guys know a lot more
about this than I do!

Best regards,


On 4 March 2013 02:51, Guenter <> wrote:
> Hi Alex,
> Am 27.02.2013 15:33, schrieb Alex Powell:
>> Dear Guenter,
>> Having just been through the process of building for Android I can
>> happily say the Install.html document was of little useful value
>> without much hunting around the internet, downloading all of android,
>> mucking about with various things and eventually writing a 20 line
>> shell script to set all the various aspects of the system up (this was
>> for an SSL build). Most of this blame lies at the door of Android's
>> SDK (that has a habit of changing between releases - now on 4.6 or 4.7
>> tools), though actually once it was clear what all the bits were for
>> it started to go faster. Currently the help is vague, and you must
>> *really* understand the gubbins of the NDK to have a fighting chance.
> I dont think so. Also I dont see that you followed any of the suggestions
> from INSTALL like creating the standalone toolchain and using a clean
> cross-compile; instead you use paths into the original NDK, muck up with a
> bunch of CFLAGS and LDFLAGS, etc.
> I dont think this is the recommend way to build a C library for Android.
> Look, I started same and had link-time issues as well as run-time ones, I
> then googled and found that these probs are very common, and a whole lot of
> others faced same or similar issues; then I came over a hint on
> Stackoverflow from someone sugegsting to create the standalone toolchain,
> and after I did this magically everything went smooth; I could cross-compile
> OpenSSL, libssh2, libmetalink and finally libcurl just fine without any
> issues ...
> so I dont think its worth to add such a script and start to confuse more
> developers with this; maybe that you really need such in your special case,
> but I currently dont believe its right to recommend such;
> the binaries you find on the curl website were tested by me on Android 2.3,
> 3.2, and 4.0.x, and run on all platforms fine; maybe I add soon also a
> devel-package which holds at least static libcurl and its static dependency
> libs (dynamic linkage is another story since you cant always install to same
> location on all devices; f.e. if you have R/O system partitions; thus making
> it hard to provide the correct *.la files).
> GŁn.
> -------------------------------------------------------------------
> List admin:
> Etiquette:

Alex Powell
See Kitchenmaster - available now in the Appstore!
Exscien Training -
Zeta Controls
5-6 Cappis House (First Floor)
Telford Road
OX26 4LB
Tel: +44 (0) 1869 322533
Mob: +44 (0) 759 5048178
skype: alexp700
List admin:
Received on 2013-03-04