27

I am trying to compile a library using android-ndk-r5 standalone toolchain and autotools. When doing a ./configure, it fails with:

$ ./configure --host=arm-linux-androideabi
...snip...
checking host system type... Invalid configuration `arm-linux-androideabi': system `androideabi' not recognized
configure: error: /bin/sh ./config.sub arm-linux-androideabi failed

Explicitly setting CC and CXX does not work either (configure says to use --host).

The NDK docs and various materials online seems to indicate that using the standalone toolchain in this manner should be possible. What is wrong here? and how can I resolve it? (besides simply ditching autoconf and going back to Android.mk)

RzR
  • 3,068
  • 29
  • 26
larvyde
  • 811
  • 1
  • 6
  • 19

3 Answers3

35

You might need a newer config.sub and config.guess, 2010-05-20 or later.

Peter Eisentraut
  • 35,221
  • 12
  • 85
  • 90
  • Yes, apparently my config.sub was 2009-11-20. Replacing with a newer one works. Thanks. – larvyde Jan 05 '11 at 01:17
  • Could someone elaborate on this? Do I need to replace those files in the directory of the library I compile? Or a systemwide change? Where do I get these files? – Peterdk Dec 22 '11 at 12:16
  • 2
    i do the same thing,but nothing change.Any idea? – kaiwii ho Apr 11 '12 at 03:38
  • kaiwii@ubuntu:~/test/fuse-2.8.1/fuse-2.8.1$ ./configure CC= arm-linux-androideabi-gcc -host= arm-linux-androideabi –enable-static_link configure: WARNING: you should use --build, --host, --target configure: WARNING: you should use --build, --host, --target configure: WARNING: you should use --build, --host, --target configure: WARNING: invalid host type: –enable-static_link checking build system type... Invalid configuration `arm-linux-androideabi-gcc': machine `arm-linux-androideabi' not recognized configure: error: /bin/bash ./config.sub arm-linux-androideabi-gcc failed – kaiwii ho Apr 11 '12 at 03:39
15

You can get the newer config.sub and config.guess from here

I took the newest from both, but that lead to errors, so I took the mentioned ones of Peter Eisentraut's date.

Peterdk
  • 15,625
  • 20
  • 101
  • 140
11

You can also grab config.sub and config.guess from the Ubuntu autotools-dev package:

sudo apt-get install autotools-dev
cp /usr/share/misc/config.{sub,guess} .
Ben Challenor
  • 3,365
  • 1
  • 35
  • 35