cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Questions on building libcurl for Android

From: Ram <ram.nw1_at_gmail.com>
Date: Mon, 27 Aug 2012 17:33:18 -0700

On Mon, Aug 27, 2012 at 4:25 PM, Guenter <lists_at_gknw.net> wrote:

> Hi,
> Am 27.08.2012 11: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.

I verified "which arm-linux-androideabi-gcc" again (it showed the correct
path)
I also invoked arm-linux-androideabi-gcc directly from cygwin and got
*$ arm-linux-androideabi-gcc.exe -v
Using built-in specs.
Target: arm-linux-androideabi
Configured with:
/usr/local/google/home/andrewhsieh/ndk-andrewhsieh/src/build/../gcc/gcc-4.4.3/configure
--prefix=/tmp/ndk-andrewhsieh/build/toolchain/prefix
--target=arm-linux-androideabi --host=i586-pc-mingw32msvc
--build=i386-linux-gnu --with-gnu-as --with-gnu-ld --enable-languages=c,c++
--with-gmp=/tmp/ndk-andrewhsieh/build/toolchain/temp-install
--with-mpfr=/tmp/ndk-andrewhsieh/build/toolchain/temp-install --without-ppl
--without-cloog --disable-libssp --enable-threads --disable-nls
--disable-libmudflap --disable-libgomp --disable-libstdc__-v3
--disable-sjlj-exceptions --disable-shared --disable-tls --disable-libitm
--with-float=soft --with-fpu=vfp --with-arch=armv5te
--enable-target-optspace --enable-initfini-array --disable-nls
--prefix=/tmp/ndk-andrewhsieh/build/toolchain/prefix
--with-sysroot=/tmp/ndk-andrewhsieh/build/toolchain/prefix/sysroot
--with-binutils-version=2.19 --with-mpfr-version=2.4.1
--with-mpc-version=0.8.1 --with-gmp-version=5.0.5 --with-gcc-version=4.4.3
--with-gdb-version=7.3.x --disable-bootstrap --disable-libquadmath
--disable-plugin --with-arch=armv5te
--program-transform-name='s&^&arm-linux-androideabi-&'
Thread model: posix
gcc version 4.4.3 (GCC)
*

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

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.
OTH the libcurl configure script isn't supported on regular Windows.
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)

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)

Thanks Ram

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-08-28