Closed tanis2000 closed 5 years ago
I don't know that the SYSROOT variable is read by any part of the Rust native compilation tooling. I think you want to provide a --sysroot=/Users/tanis/android-ndk/platforms/android-24/arch-arm/
CFLAGS value instead.
@jdm that worked a charm. I added the sysroot to CFLAGS and it did the trick. In case anyone needs it, my current shell command is the following:
CC=/Users/tanis/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc CXX=/Users/tanis/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++ AR=/Users/tanis/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ar CFLAGS=--sysroot=/Users/tanis/android-ndk/platforms/android-24/arch-arm/ cargo build --no-default-features --target armv7-linux-androideabi --lib
When I compile a project that uses this crate I get an error while compiling the C source of this crate.
Here's the command I'm running, forcing the compiler to use as I'm trying to avoid having to build different Android toolchains based on the architecture:
The result is the following error: