Aguevara
Aguevara

Reputation: 91

CC libcurl for ARMv7

I am attempting to cross compile libcurl for ARMv7(Android) and I cannot seem to get it to compile.

I have the SDK and NDK with a standalone tool chain and CC already set up. Though while CC is set it breaks the compiler.

For example, I have my toolchain set in my bashrc like so:

export NDK=/home/anthony/android-ndk-r9b
export SYSROOT=$NDK/platforms/android-16/arch-arm
export CC="$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc-4.8 --sysroot=$SYSROOT"

If i leave CC uncommented, I recieve an error while trying to CC libcurl:

curl-7.46.0 $ ./configure$ prefix=/home/anthony/Documents/Ruby/androidSMS/Curl/curl-7.46.0/lib/curl 
--build=i686-pc-linux-gnu --host=arm-linux-gnueabi 
--target=arm-linux 
CC=/home/anthony/android-ndk-r9b/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc-4.8


checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports nested variables... yes
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 compiler warnings as errors... no
checking whether to enable curl debug memory tracking... no
checking whether to enable hiding of library internal symbols... yes
checking whether to enable c-ares for DNS lookups... no
checking whether to disable dependency on -lrt... (assumed no)
checking for path separator... :
checking for sed... /bin/sed
checking for grep... /bin/grep
checking for egrep... /bin/grep -E
checking for arm-linux-gnueabi-ar... /usr/bin/arm-linux-gnueabi-ar
checking for a BSD-compatible install... /usr/bin/install -c
checking for arm-linux-gnueabi-gcc... /home/anthony/android-ndk-r9b/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc-4.8
checking whether the C compiler works... no
configure: error: in `/home/anthony/Documents/Ruby/androidSMS/Curl/curl-7.46.0':
configure: error: C compiler cannot create executables
See `config.log' for more details

I have to open a new terminal after commenting CC out. unsetting CC will not work. Thats besides the point. Can someone please tell me what I'm doing wrong.

Upvotes: 1

Views: 846

Answers (1)

Aguevara
Aguevara

Reputation: 91

I wrote an ftp class instead of cross compiling libcurl for ARMv7. Closing this out.

Upvotes: 1

Related Questions