cURL / Mailing Lists / curl-library / Single Mail


Re: Questions on building libcurl for Android

From: Guenter <>
Date: Tue, 28 Aug 2012 20:06:13 +0200

Hi Ram,
Am 28.08.2012 02:33, schrieb Ram:
> On Mon, Aug 27, 2012 at 4:25 PM, Guenter <
> <>> wrote:
> Hi,
> Am 27.08.2012 11 <tel:27.08.2012%2011>:35, schrieb Ram:
> Thanks Guenter, this was helpful and I created a cross-compile
> Android
> NDK toolchain for standalone use (on my Windows 7 machine).
> I also defined variables like $ export
> CC=/cygdrive/c/TestDir/__android-ndk-r8b/toolchains/__standalone-arm-4.4.3/bin/arm-__linux-androideabi-gcc.exe
> and similarly for AR, LD, AS, NM, RANLIB.
> no, IMO this is the wrong way, ans most likely the cause why you get
> the errors later ...
> you should try this:
> - setup a path to the cross-compiler's bin folder so that you can
> execute f.e. 'arm-linux-androideabi-gcc -v' from shell.
> - call configure with:
> ./configure --host=arm-linux-androideabi --with-zlib --enable-ipv6
> [more options if needed, f.e. --disable-shared]
> Thanks again, Guenter. Unfortunately, this didn't have any effect on the
> errors.
> The cross-compiler's bin folder was already in the path, but today I
> removed environment variables like CC, AR etc. and created a new cygwin
> window to take another shot at the build.

> Unfortunately, when running "/./configure --host=arm-linux-androideabi
> --with-zlib --enable-ipv6/" I got exactly the same error I described in
> yesterday's email.
hmm ...

> My guess was that the "/arm-linux-androideabi-gcc.exe: no input files/"
> message and "/arm-linux-androideabi-gcc.exe: CreateProcess: No such file
> or directory/" message were caused by the fact that Google doesn't
> support cygwin for the standalone compiler.
then probably it might be worth to try if MSYS can do better ...
another way could be to remove the crosscompiler's bin folder again from
the path and then create wrapper scripts for all toolchain binaries in
the bin or usr/bon folder, f.e. something like:
# do here some path coverting with cygwin's cygpath tool for the args
for a in ${*}; do
   newargs_array[]=$(cygpath ...)
${PREFIX}/arm-linux-androideabi-gcc.exe ${*}

the above is *not* correct, and you need to check what cygwin's bash
understands, and also how bash handles arrays (sorry, I dotn have it in
mind, and would need to read docu too), f.e.:

> OTH the libcurl configure script isn't supported on regular Windows.
it is; it runs fine with MSYS for creating native Windows builds; also
configure is crosscompiler-aware; see my autobuilds here:

> It seems like no one has attempted to create a Windows (batch file)
> version of configure and it is unclear (to me) whether that would be a
> good approach (just like it is unclear whether it makes any sense on
> figuring out a way to make all cygwin paths understandable to the
> standalone compiler)
if you want to go this route and create some static makefiles then a
good template could be Makefile.m32 in ./lib and ./src folders; just try
a build with:
make CROSSPREFIX=arm-linux-androideabi- -C lib -f Makefile.m32
the linking of the DLL will of course fail, but at this point you should
already have a libcurl.a ...

> Btw I think I understand the flexibility of using the configure script
> to create a customized version of config-android.h.
> However, to create a ".a" library file (ARM binary), is it possible to
> use a previously hard-coded version of config-android.h and use it as
> part of a conventional ndkbuild process (without using the configure
> script etc)
you can try to pick up a curl-config.h from my Android autobuilds:


List admin:
Received on 2012-08-28