3

I need to port the ZThread lib to android development environment.

I followed this: http://blog.jimjh.com/compiling-open-source-libraries-with-android-ndk-part-2.html

when i set --host=arm-eabi , the configure file checking for arm-eabi-g++ arm-eabi-c++...,but my my cross-compile toolchain is named arm-linux-androideabi-*;well ,when i change to --host=arm-linux-androideabi,it says system "androideabi" not recognized,i think it is not in config.sub file.

the key is how does configure file find the correct cross-compile tools?

error message is : checking build system type... Invalid configuration arm-linux-androideabi': systemandroideabi' not recognized

EDIT: you can try to write Android.mk file for your 3rd lib, android NDK will cross compile the lib for you using the Android.mk file(work just like the makefile). There is a ZThread's Android.mk example, given by my comment

Maadiah
  • 431
  • 6
  • 20
  • i meet the same problem with u.And after updating the config.guess and config.sub,it still prompt the same mistake yet.Have u fix the problem? – kaiwii ho Apr 11 '12 at 04:14
  • if you need cross compile 3rd part lib for android,I suggest u use Android.mk. here is an example [link](http://www.cnblogs.com/maadiah/archive/2012/04/06/2434591.html) – Maadiah Apr 19 '12 at 03:47

2 Answers2

4

you need to update config.*

http://ftp.us.debian.org/debian/pool/main/a/autotools-dev/autotools-dev_20110511.1_all.deb

cp -av /usr/share/misc/config.guess ./
cp -av /usr/share/misc/config.sub  ./

check :

configure does not recognize androideabi

Community
  • 1
  • 1
RzR
  • 3,068
  • 29
  • 26
0

have you exported the PATH where your cross-compile tools are located?

e.g. in linux you have to add the following line in .bashrc file:

export PATH=${PATH}:/home/username/path-to-android-ndk/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin

in windows you have to add this path to environment variables. Particularly to the the variable named as PATH.

Thanasis Petsas
  • 4,378
  • 5
  • 31
  • 57