cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Curl and android

From: Jean-Bernard Collet <collet.jb_at_gmail.com>
Date: Wed, 23 Jun 2010 19:57:03 +0200

Hi,

Thank you for your help ;)

I've tryed this command without success, based on several research on the
web and the instructions provided by the Android.mk file :

[code]
jb_at_ubuntu:~/sdk/android/mydroid/external/curl$
A="/home/jb/sdk/android/mydroid" && \
> PATH="$A/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin:$PATH" \
> ./configure \
> --host=arm-linux \
> CC=arm-eabi-gcc \
> CPPFLAGS="-I $A/system/core/include \
> -I $A/hardware/libhardware/include \
> -I $A/hardware/libhardware_legacy/include \
> -I $A/hardware/ril/include \
> -I $A/dalvik/libnativehelper/include \
> -I $A/frameworks/base/include \
> -I $A/frameworks/base/opengl/include \
> -I $A/external/skia/include \
> -I $A/out/target/product/generic/obj/include \
> -I $A/bionic/libc/arch-arm/include \
> -I $A/bionic/libc/include \
> -I $A/bionic/libstdc++/include \
> -I $A/bionic/libc/kernel/common \
> -I $A/bionic/libc/kernel/arch-arm \
> -I $A/bionic/libm/include \
> -I $A/bionic/libm/include/arch/arm \
> -I $A/bionic/libthread_db/include \
> -I $A/external/curl/include \
> -I $A/external/curl/lib \
> -I $A/external/curl \
> -I $A/out/target/product/generic/obj/EXECUTABLES/curl_intermediates \
> -D__ARM_ARCH_5__ \
> -D__ARM_ARCH_5T__ \
> -D__ARM_ARCH_5TE__ \
> -DANDROID \
> -DSK_RELEASE \
> -DNDEBUG \
> -DHAVE_CONFIG_H \
> -Wpointer-arith \
> -Wwrite-strings \
> -Wunused \
> -Winline \
> -Wnested-externs \
> -Wmissing-declarations \
> -Wmissing-prototypes \
> -Wno-long-long \
> -Wfloat-equal \
> -Wno-multichar \
> -Wsign-compare \
> -Wno-format-nonliteral \
> -Wendif-labels \
> -Wstrict-prototypes \
> -Wdeclaration-after-statement \
> -W \
> -Wall \
> -Wno-unused \
> -Werror=return-type \
> -Wno-multichar \
> -Wstrict-aliasing=2 \
> -Wno-system-headers" \
> CFLAGS="-fno-exceptions \
> -msoft-float \
> -fpic \
> -ffunction-sections \
> -funwind-tables \
> -fstack-protector \
> -fno-short-enums \
> -march=armv5te \
> -mtune=xscale \
> -mthumb-interwork \
> -fmessage-length=0 \
> -g \
> -finline-functions \
> -fno-inline-functions-called-once \
> -fgcse-after-reload \
> -frerun-cse-after-loop \
> -frename-registers \
> -UDEBUG \
> -mthumb \
> -Os \
> -fomit-frame-pointer \
> -fno-strict-aliasing \
> -finline-limit=64 \
> -MD \
> -nostdlib" \
>
LIBS="$A/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/lib/gcc/arm-eabi/4.2.1/libgcc.a
\
> $A/ndk/build/platforms/android-4/arch-arm/usr/lib/crtbegin_dynamic.0 \
> $A/ndk/build/platforms/android-4/arch-arm/usr/lib/crtend_android.o -lc"
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether to enable debug build options... no
checking whether to enable compiler optimizer... (assumed) yes
checking whether to enable strict compiler warnings... no
checking whether to enable curl debug memory tracking... no
checking whether to enable c-ares for DNS lookups... no
checking for sed... /bin/sed
checking for grep... /bin/grep
checking for egrep... /bin/grep -E
checking for arm-linux-ar... no
checking for ar... /usr/bin/ar
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for arm-linux-strip... no
checking for strip... strip
checking curl version... 7.21.0
checking build system type... i686-pc-linux-gnu
checking host system type... arm-unknown-linux-gnu
checking for style of include used by make... GNU
checking for arm-linux-gcc... arm-eabi-gcc
*checking whether the C compiler works... no
configure: error: in `/home/jb/sdk/android/mydroid/external/curl':
configure: error: C compiler cannot create executables*
See `config.log' for more details.

[/code]

Thanks for your help.

On Wed, Jun 23, 2010 at 7:46 PM, Dan Fandrich <dan_at_coneharvesters.com>wrote:

> On Wed, Jun 23, 2010 at 02:39:40PM +0200, Jean-Bernard Collet wrote:
> > I'm trying to compile Curl to use it an Android.
> >
> > I've downloaded the last version and I've the last version of Android NDK
> (r4).
> >
> > First, I've simply tryed to copy the archive's content into a repertory
> and
> > launch the "ndk-build" command. It resulted in this :
>
> Did you look at the Android.mk file? There are instructions in there on how
> to get it working. As you surmised, you have to run configure first, and
> that's not easy. But the instructions should be enough to get you going.
>
> >>> Dan
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>

-- 
Jb Collet
-----------------------------------------------------------
Student - Master 2
University of Namur
phone: +32 499 35 43 37
email:  collet.jb_at_gmail.com
-----------------------------------------------------------

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-06-23