Build fails with "Is `armv7a-linux-androideabi18-clang` installed?"

I have this issue: https://github.com/deltachat/deltachat-core-rust/issues/1100

After I ran rustup update the build fails:

$ ./ndk-make.sh
starting time: So 22. Dez 20:15:34 CET 2019
-- cross compiling to armv7-linux-androideabi (arm) --
   Compiling backtrace-sys v0.1.32
   Compiling libsqlite3-sys v0.16.0
   Compiling email v0.0.21 (https://github.com/deltachat/rust-email#38b325ea)
error: failed to run custom build command for `backtrace-sys v0.1.32`

Caused by:
  process didn't exit successfully: `/home/dev/deltachat-android/jni/deltachat-core-rust/target/release/build/backtrace-sys-aa84707144b604de/build-script-build` (exit code: 1)
--- stdout
OPT_LEVEL = Some("3")
TARGET = Some("armv7-linux-androideabi")
HOST = Some("x86_64-unknown-linux-gnu")
CC_armv7-linux-androideabi = None
CC_armv7_linux_androideabi = None
TARGET_CC = Some("armv7a-linux-androideabi18-clang")
CFLAGS_armv7-linux-androideabi = None
CFLAGS_armv7_linux_androideabi = None
TARGET_CFLAGS = None
CFLAGS = Some("-D__ANDROID_API__=18")
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
running: "armv7a-linux-androideabi18-clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=armv7-linux-androideabi" "-D__ANDROID_API__=18" "-E" "src/android-api.c"

--- stderr


error occurred: Failed to find tool. Is `armv7a-linux-androideabi18-clang` installed?



warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for `libsqlite3-sys v0.16.0`

Caused by:
  process didn't exit successfully: `/home/dev/deltachat-android/jni/deltachat-core-rust/target/release/build/libsqlite3-sys-d25d300c04437826/build-script-build` (exit code: 1)
--- stdout
cargo:rerun-if-env-changed=SQLITE_MAX_VARIABLE_NUMBER
cargo:rerun-if-env-changed=SQLITE_MAX_EXPR_DEPTH
TARGET = Some("armv7-linux-androideabi")
OPT_LEVEL = Some("3")
HOST = Some("x86_64-unknown-linux-gnu")
CC_armv7-linux-androideabi = None
CC_armv7_linux_androideabi = None
TARGET_CC = Some("armv7a-linux-androideabi18-clang")
CFLAGS_armv7-linux-androideabi = None
CFLAGS_armv7_linux_androideabi = None
TARGET_CFLAGS = None
CFLAGS = Some("-D__ANDROID_API__=18")
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
running: "armv7a-linux-androideabi18-clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=armv7-linux-androideabi" "-D__ANDROID_API__=18" "-DSQLITE_CORE" "-DSQLITE_DEFAULT_FOREIGN_KEYS=1" "-DSQLITE_ENABLE_API_ARMOR" "-DSQLITE_ENABLE_COLUMN_METADATA" "-DSQLITE_ENABLE_DBSTAT_VTAB" "-DSQLITE_ENABLE_FTS3" "-DSQLITE_ENABLE_FTS3_PARENTHESIS" "-DSQLITE_ENABLE_FTS5" "-DSQLITE_ENABLE_JSON1" "-DSQLITE_ENABLE_LOAD_EXTENSION=1" "-DSQLITE_ENABLE_MEMORY_MANAGEMENT" "-DSQLITE_ENABLE_RTREE" "-DSQLITE_ENABLE_STAT2" "-DSQLITE_ENABLE_STAT4" "-DSQLITE_HAVE_ISNAN" "-DSQLITE_SOUNDEX" "-DSQLITE_THREADSAFE=1" "-DSQLITE_USE_URI" "-DHAVE_USLEEP=1" "-o" "/home/dev/deltachat-android/jni/deltachat-core-rust/target/armv7-linux-androideabi/release/build/libsqlite3-sys-c979809b1127a44b/out/sqlite3/sqlite3.o" "-c" "sqlite3/sqlite3.c"

--- stderr


error occurred: Failed to find tool. Is `armv7a-linux-androideabi18-clang` installed?



warning: build failed, waiting for other jobs to finish...
error: build failed

What I also tried:

$ rustup target add armv7a-linux-androideabi18-clang   
error: toolchain 'stable-x86_64-unknown-linux-gnu' does not contain component 'rust-std' for target 'armv7a-linux-androideabi18-clang'

Any ideas?

backtrace-sys requires a C compiler. For Android, this compiler is somewhere in your Android NDK installation directory. The ndk-make.sh script has instructions for which folder to add to your $PATH:

1 Like

Thanks a lot, it worked!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.