Closed cyboy22 closed 2 months ago
You are trying to build cargo-ndk for Android, not the example.
Apologies for my misunderstanding. Basically I have a ".rs" library and want to build a ".so" file for a API level x and a Android instruction set of y. Would you be able to tell me what my "Cargo.toml" file should look like and the appropriate "cargo ndk" command line (as I still remain unsure)?
I tried to build the example and got the following...
cyril@cyril-linux1:~/Downloads/cargo-ndk-main/example$ ls
Cargo.lock Cargo.toml example.svg src target
cyril@cyril-linux1:~/Downloads/cargo-ndk-main/example$ cargo ndk -o jniLibs build
Building armeabi-v7a (armv7-linux-androideabi)
Compiling example v0.1.0 (/home/cyril/Downloads/cargo-ndk-main/example)
error[E0463]: can't find crate for std
|
= note: the armv7-linux-androideabi
target may not be installed
= help: consider downloading the target with rustup target add armv7-linux-androideabi
error: cannot find macro println
in this scope
--> src/lib.rs:3:5
|
3 | println!("Hello Android!");
| ^^^^^^^
error: requires sized
lang_item
For more information about this error, try rustc --explain E0463
.
error: could not compile example
(lib) due to 3 previous errors
note: If the build failed due to a missing target, you can run this command:
note:
note: rustup target install armv7-linux-androideabi
cyril@cyril-linux1:~/Downloads/cargo-ndk-main/example$
Please feel free to close this case as I think this has something to do with specifying the right libraries and paths in the Cargo.toml.
when I execute the following command:
cargo ndk -t armeabi-v7a -t arm64-v8a -o ./jniLibs build --release -vv
I get a stream of errors that begin with:
Exporting CARGO_NDK_CMAKE_TOOLCHAIN_PATH="/home/cyril/Downloads/ndk/build/cmake/android.toolchain.cmake" Exporting CARGO_NDK_OUTPUT_PATH="./jniLibs" Setting Android SDK platform level to 21 Building targets (armeabi-v7a, arm64-v8a) Building armeabi-v7a (armv7-linux-androideabi) Exporting CARGO_NDK_ANDROID_TARGET="armeabi-v7a" Exporting AR_armv7-linux-androideabi="/home/cyril/Downloads/ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar" Exporting CARGO_NDK_SYSROOT_LIBS_PATH="/home/cyril/Downloads/ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/arm-linux-androideabi" Exporting CARGO_NDK_SYSROOT_PATH="/home/cyril/Downloads/ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot" Exporting CARGO_NDK_SYSROOT_TARGET="arm-linux-androideabi" Exporting CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_AR="/home/cyril/Downloads/ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar" Exporting CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER="/home/cyril/.cargo/bin/cargo-ndk" Exporting CC_armv7-linux-androideabi="/home/cyril/Downloads/ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang" Exporting CFLAGS_armv7-linux-androideabi="--target=armv7a-linux-androideabi21" Exporting CXXFLAGS_armv7-linux-androideabi="--target=armv7a-linux-androideabi21" Exporting CXX_armv7-linux-androideabi="/home/cyril/Downloads/ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++" Exporting RANLIB_armv7-linux-androideabi="/home/cyril/Downloads/ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib" Exporting _CARGO_NDK_LINK_CLANG="/home/cyril/Downloads/ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang" Exporting _CARGO_NDK_LINK_TARGET="--target=armv7a-linux-androideabi21" Invoking cargo (/home/cyril/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo) with args: ["build", "--release", "-vv"] Fresh unicode-ident v1.0.12 Fresh proc-macro2 v1.0.79 Fresh quote v1.0.36 Fresh syn v2.0.58 Fresh serde_derive v1.0.197 Compiling serde v1.0.197 Fresh thiserror-impl v1.0.50 Compiling utf8-decode v1.0.1 Compiling equivalent v1.0.1 Running
CARGO=/home/cyril/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo CARGO_CRATE_NAME=serde CARGO_MANIFEST_DIR=/home/cyril/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-1.0.197 CARGO_PKG_AU THORS='Erick Tryzelaar <erick.tryzelaar@gmail.com>:David Tolnay <dtolnay@gmail.com>' CARGO_PKG_DESCRIPTION='A generic serialization/deserialization framework' CARGO_PKG_HOMEPAGE='https://serde.rs' CARGO_PKG_LICENSE='MIT OR Apa che-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=serde CARGO_PKG_README=crates-io.md CARGO_PKG_REPOSITORY='https://github.com/serde-rs/serde' CARGO_PKG_RUST_VERSION=1.31 CARGO_PKG_VERSION=1.0.197 CARGO_PKG_VERSION_MAJOR=1 CAR GO_PKG_VERSION_MINOR=0 CARGO_PKG_VERSION_PATCH=197 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/home/cyril/Downloads/cargo-ndk-main/target/release/deps:/home/cyril/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib' OUT_DIR= /home/cyril/Downloads/cargo-ndk-main/target/armv7-linux-androideabi/release/build/serde-9b031b13f954de50/out rustc --crate-name serde --edition=2018 /home/cyril/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-1.0.19 7/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="default"' --cfg 'feature="derive"' -- cfg 'feature="serde_derive"' --cfg 'feature="std"' -C metadata=2e40eafb185b7a58 -C extra-filename=-2e40eafb185b7a58 --out-dir /home/cyril/Downloads/cargo-ndk-main/target/armv7-linux-androideabi/release/deps --target armv7-linu x-androideabi -C linker=/home/cyril/.cargo/bin/cargo-ndk -C strip=debuginfo -L dependency=/home/cyril/Downloads/cargo-ndk-main/target/armv7-linux-androideabi/release/deps -L dependency=/home/cyril/Downloads/cargo-ndk-main/targ et/release/deps --extern serde_derive=/home/cyril/Downloads/cargo-ndk-main/target/release/deps/libserde_derive-0c9dcb1a94c4ab9a.so --cap-lints warn
Compiling hashbrown v0.14.3 Compiling itoa v1.0.9 Compiling bitflags v2.4.1 Compiling winnow v0.5.26 Compiling smallvec v1.11.2 RunningCARGO=/home/cyril/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo CARGO_CRATE_NAME=utf8_decode CARGO_MANIFEST_DIR=/home/cyril/.cargo/registry/src/index.crates.io-6f17d22bba15001f/utf8-decode-1.0.1 CA RGO_PKG_AUTHORS='Timothée Haudebourg <author@haudebourg.net>' CARGO_PKG_DESCRIPTION='UTF-8 incremental decoding iterators.' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE=MIT/Apache-2.0 CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=utf8-d ecode CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='https://github.com/timothee-haudebourg/utf8-decode' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=1.0.1 CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=0 CARGO_PKG_VERSION _PATCH=1 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/home/cyril/Downloads/cargo-ndk-main/target/release/deps:/home/cyril/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib' rustc --crate-name utf8_decode --edition=2018 /hom e/cyril/.cargo/registry/src/index.crates.io-6f17d22bba15001f/utf8-decode-1.0.1/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-leve l=3 -C embed-bitcode=no -C metadata=fd6ce4a6224fec01 -C extra-filename=-fd6ce4a6224fec01 --out-dir /home/cyril/Downloads/cargo-ndk-main/target/armv7-linux-androideabi/release/deps --target armv7-linux-androideabi -C linker=/ho me/cyril/.cargo/bin/cargo-ndk -C strip=debuginfo -L dependency=/home/cyril/Downloads/cargo-ndk-main/target/armv7-linux-androideabi/release/deps -L dependency=/home/cyril/Downloads/cargo-ndk-main/target/release/deps --cap-lints warn
RunningCARGO=/home/cyril/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo CARGO_CRATE_NAME=equivalent CARGO_MANIFEST_DIR=/home/cyril/.cargo/registry/src/index.crates.io-6f17d22bba15001f/equivalent-1.0.1 CARG O_PKG_AUTHORS='' CARGO_PKG_DESCRIPTION='Traits for key comparison in maps.' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='Apache-2.0 OR MIT' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=equivalent CARGO_PKG_README=README.md CARGO_PKG_R EPOSITORY='https://github.com/cuviper/equivalent' CARGO_PKG_RUST_VERSION=1.6 CARGO_PKG_VERSION=1.0.1 CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=0 CARGO_PKG_VERSION_PATCH=1 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/home /cyril/Downloads/cargo-ndk-main/target/release/deps:/home/cyril/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib' rustc --crate-name equivalent --edition=2015 /home/cyril/.cargo/registry/src/index.crates.io-6f17d22bba150 01f/equivalent-1.0.1/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C metadata=b81e524bc2119be0 -C ex tra-filename=-b81e524bc2119be0 --out-dir /home/cyril/Downloads/cargo-ndk-main/target/armv7-linux-androideabi/release/deps --target armv7-linux-androideabi -C linker=/home/cyril/.cargo/bin/cargo-ndk -C strip=debuginfo -L depend ency=/home/cyril/Downloads/cargo-ndk-main/target/armv7-linux-androideabi/release/deps -L dependency=/home/cyril/Downloads/cargo-ndk-main/target/release/deps --cap-lints warn
RunningCARGO=/home/cyril/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo CARGO_CRATE_NAME=itoa CARGO_MANIFEST_DIR=/home/cyril/.cargo/registry/src/index.crates.io-6f17d22bba15001f/itoa-1.0.9 CARGO_PKG_AUTHOR S='David Tolnay <dtolnay@gmail.com>' CARGO_PKG_DESCRIPTION='Fast integer primitive to string conversion' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=itoa CARGO_PKG_READM E=README.md CARGO_PKG_REPOSITORY='https://github.com/dtolnay/itoa' CARGO_PKG_RUST_VERSION=1.36 CARGO_PKG_VERSION=1.0.9 CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=0 CARGO_PKG_VERSION_PATCH=9 CARGO_PKG_VERSION_PRE='' LD_L IBRARY_PATH='/home/cyril/Downloads/cargo-ndk-main/target/release/deps:/home/cyril/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib' rustc --crate-name itoa --edition=2018 /home/cyril/.cargo/registry/src/index.crates.io-6 f17d22bba15001f/itoa-1.0.9/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C metadata=d9b4ac680c923fcd -C extra-filename=-d9b4ac680c923fcd --out-dir /home/cyril/Downloads/cargo-ndk-main/target/armv7-linux-androideabi/release/deps --target armv7-linux-androideabi -C linker=/home/cyril/.cargo/bin/cargo-ndk -C strip=debuginfo -L dependency=/home/cyril/Downloads/cargo-ndk-main/target/armv7-linux-androideabi/release/deps -L dependency=/home/cyril/Downloads/cargo-ndk-main/target/release/deps --cap-lints warn
RunningCARGO=/home/cyril/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo CARGO_CRATE_NAME=hashbrown CARGO_MANIFEST_DIR=/home/cyril/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hashbrown-0.14.3 CARGO _PKG_AUTHORS='Amanieu d'\''Antras <amanieu@gmail.com>' CARGO_PKG_DESCRIPTION='A Rust port of Google'\''s SwissTable hash map' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME =hashbrown CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='https://github.com/rust-lang/hashbrown' CARGO_PKG_RUST_VERSION=1.63.0 CARGO_PKG_VERSION=0.14.3 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=14 CARGO_PKG_VERSION_ PATCH=3 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/home/cyril/Downloads/cargo-ndk-main/target/release/deps:/home/cyril/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib' rustc --crate-name hashbrown --edition=2021 /home/c yril/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hashbrown-0.14.3/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="raw"' -C metadata=99e96fc2371ef412 -C extra-filename=-99e96fc2371ef412 --out-dir /home/cyril/Downloads/cargo-ndk-main/target/armv7-linux-androideabi/release/deps --target armv7-linux-android eabi -C linker=/home/cyril/.cargo/bin/cargo-ndk -C strip=debuginfo -L dependency=/home/cyril/Downloads/cargo-ndk-main/target/armv7-linux-androideabi/release/deps -L dependency=/home/cyril/Downloads/cargo-ndk-main/target/releas e/deps --cap-lints warn
Compiling libc v0.2.150 Fresh syn v1.0.109 Compiling thiserror v1.0.50 Compiling ryu v1.0.15 Compiling linux-raw-sys v0.4.12 RunningCARGO=/home/cyril/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo CARGO_CRATE_NAME=bitflags CARGO_MANIFEST_DIR=/home/cyril/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1 CARGO_PK G_AUTHORS='The Rust Project Developers' CARGO_PKG_DESCRIPTION='A macro to generate structures which behave like bitflags. ' CARGO_PKG_HOMEPAGE='https://github.com/bitflags/bitflags' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=bitflags CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='https://github.com/bitflags/b itflags' CARGO_PKG_RUST_VERSION=1.56.0 CARGO_PKG_VERSION=2.4.1 CARGO_PKG_VERSION_MAJOR=2 CARGO_PKG_VERSION_MINOR=4 CARGO_PKG_VERSION_PATCH=1 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/home/cyril/Downloads/cargo-ndk-main/target /release/deps:/home/cyril/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib' rustc --crate-name bitflags --edition=2021 /home/cyril/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/lib.rs --error-fo rmat=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="std"' -C metadata=e3e58d24dd99728b -C extra-filename=-e3e58d 24dd99728b --out-dir /home/cyril/Downloads/cargo-ndk-main/target/armv7-linux-androideabi/release/deps --target armv7-linux-androideabi -C linker=/home/cyril/.cargo/bin/cargo-ndk -C strip=debuginfo -L dependency=/home/cyril/Dow nloads/cargo-ndk-main/target/armv7-linux-androideabi/release/deps -L dependency=/home/cyril/Downloads/cargo-ndk-main/target/release/deps --cap-lints warn
RunningCARGO=/home/cyril/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo CARGO_CRATE_NAME=winnow CARGO_MANIFEST_DIR=/home/cyril/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winnow-0.5.26 CARGO_PKG_A UTHORS='' CARGO_PKG_DESCRIPTION='A byte-oriented, zero-copy, parser combinators library' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE=MIT CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=winnow CARGO_PKG_README=README.md CARGO_PKG_REPOSITO RY='https://github.com/winnow-rs/winnow' CARGO_PKG_RUST_VERSION=1.64.0 CARGO_PKG_VERSION=0.5.26 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=5 CARGO_PKG_VERSION_PATCH=26 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/home/cyr il/Downloads/cargo-ndk-main/target/release/deps:/home/cyril/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib' rustc --crate-name winnow --edition=2021 /home/cyril/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winn ow-0.5.26/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="alloc"' --cfg 'feature="defau lt"' --cfg 'feature="std"' -C metadata=6f1bf1adbba4dc6a -C extra-filename=-6f1bf1adbba4dc6a --out-dir /home/cyril/Downloads/cargo-ndk-main/target/armv7-linux-androideabi/release/deps --target armv7-linux-androideabi -C linker= /home/cyril/.cargo/bin/cargo-ndk -C strip=debuginfo -L dependency=/home/cyril/Downloads/cargo-ndk-main/target/armv7-linux-androideabi/release/deps -L dependency=/home/cyril/Downloads/cargo-ndk-main/target/release/deps --cap-li nts warn
RunningCARGO=/home/cyril/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo CARGO_CRATE_NAME=smallvec CARGO_MANIFEST_DIR=/home/cyril/.cargo/registry/src/index.crates.io-6f17d22bba15001f/smallvec-1.11.2 CARGO_P KG_AUTHORS='The Servo Project Developers' CARGO_PKG_DESCRIPTION=''\''Small vector'\'' optimization: store up to a small number of items on the stack' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENS E_FILE='' CARGO_PKG_NAME=smallvec CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='https://github.com/servo/rust-smallvec' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=1.11.2 CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=11 CARGO_PKG_VERSION_PATCH=2 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/home/cyril/Downloads/cargo-ndk-main/target/release/deps:/home/cyril/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib' rustc --crate-name smallvec --ed ition=2018 /home/cyril/.cargo/registry/src/index.crates.io-6f17d22bba15001f/smallvec-1.11.2/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,lin k -C opt-level=3 -C embed-bitcode=no -C metadata=1edcb18dd59ed163 -C extra-filename=-1edcb18dd59ed163 --out-dir /home/cyril/Downloads/cargo-ndk-main/target/armv7-linux-androideabi/release/deps --target armv7-linux-androideabi -C linker=/home/cyril/.cargo/bin/cargo-ndk -C strip=debuginfo -L dependency=/home/cyril/Downloads/cargo-ndk-main/target/armv7-linux-androideabi/release/deps -L dependency=/home/cyril/Downloads/cargo-ndk-main/target/release/dep s --cap-lints warn
RunningCARGO=/home/cyril/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo CARGO_CRATE_NAME=libc CARGO_MANIFEST_DIR=/home/cyril/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.150 CARGO_PKG_AUTH ORS='The Rust Project Developers' CARGO_PKG_DESCRIPTION='Raw FFI bindings to platform libraries like libc. ' CARGO_PKG_HOMEPAGE='https://github.com/rust-lang/libc' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=libc CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='https://github.com/rust-lang/libc' C ARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.2.150 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=2 CARGO_PKG_VERSION_PATCH=150 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/home/cyril/Downloads/cargo-ndk-main/target/release/d eps:/home/cyril/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib' OUT_DIR=/home/cyril/Downloads/cargo-ndk-main/target/armv7-linux-androideabi/release/build/libc-a4f6e6165f9d3915/out rustc --crate-name libc --edition=2015 /home/cyril/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.150/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-leve l=3 -C embed-bitcode=no --cfg 'feature="default"' --cfg 'feature="extra_traits"' --cfg 'feature="std"' -C metadata=d36f0515235c9231 -C extra-filename=-d36f0515235c9231 --out-dir /home/cyril/Downloads/cargo-ndk-main/target/armv 7-linux-androideabi/release/deps --target armv7-linux-androideabi -C linker=/home/cyril/.cargo/bin/cargo-ndk -C strip=debuginfo -L dependency=/home/cyril/Downloads/cargo-ndk-main/target/armv7-linux-androideabi/release/deps -L dependency=/home/cyril/Downloads/cargo-ndk-main/target/release/deps --cap-lints warn --cfg freebsd11 --cfg libc_priv_mod_use --cfg libc_union --cfg libc_const_size_of --cfg libc_align --cfg libc_int128 --cfg libc_core_cvoid -- cfg libc_packedN --cfg libc_cfg_target_vendor --cfg libc_non_exhaustive --cfg libc_long_array --cfg libc_ptr_addr_of --cfg libc_underscore_const_names --cfg libc_const_extern_fn
RunningCARGO=/home/cyril/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo CARGO_CRATE_NAME=thiserror CARGO_MANIFEST_DIR=/home/cyril/.cargo/registry/src/index.crates.io-6f17d22bba15001f/thiserror-1.0.50 CARGO _PKG_AUTHORS='David Tolnay <dtolnay@gmail.com>' CARGO_PKG_DESCRIPTION='derive(Error)' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=thiserror CARGO_PKG_README=README.md CA RGO_PKG_REPOSITORY='https://github.com/dtolnay/thiserror' CARGO_PKG_RUST_VERSION=1.56 CARGO_PKG_VERSION=1.0.50 CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=0 CARGO_PKG_VERSION_PATCH=50 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_ PATH='/home/cyril/Downloads/cargo-ndk-main/target/release/deps:/home/cyril/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib' OUT_DIR=/home/cyril/Downloads/cargo-ndk-main/target/armv7-linux-androideabi/release/build/thise rror-86e093bee0b59e97/out rustc --crate-name thiserror --edition=2021 /home/cyril/.cargo/registry/src/index.crates.io-6f17d22bba15001f/thiserror-1.0.50/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,f uture-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C metadata=7dfec7cd0f75f127 -C extra-filename=-7dfec7cd0f75f127 --out-dir /home/cyril/Downloads/cargo-ndk-main/target/armv7-linu x-androideabi/release/deps --target armv7-linux-androideabi -C linker=/home/cyril/.cargo/bin/cargo-ndk -C strip=debuginfo -L dependency=/home/cyril/Downloads/cargo-ndk-main/target/armv7-linux-androideabi/release/deps -L depend ency=/home/cyril/Downloads/cargo-ndk-main/target/release/deps --extern thiserror_impl=/home/cyril/Downloads/cargo-ndk-main/target/release/deps/libthiserror_impl-73007b36e3faa64e.so --cap-lints warn
Fresh gumdrop_derive v0.8.1 Compiling os_str_bytes v2.4.0 Compiling eieio v1.0.0 Compiling once_cell v1.19.0 RunningCARGO=/home/cyril/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo CARGO_CRATE_NAME=ryu CARGO_MANIFEST_DIR=/home/cyril/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.15 CARGO_PKG_AUTHORS ='David Tolnay <dtolnay@gmail.com>' CARGO_PKG_DESCRIPTION='Fast floating point to string conversion' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='Apache-2.0 OR BSL-1.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=ryu CARGO_PKG_README =README.md CARGO_PKG_REPOSITORY='https://github.com/dtolnay/ryu' CARGO_PKG_RUST_VERSION=1.36 CARGO_PKG_VERSION=1.0.15 CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=0 CARGO_PKG_VERSION_PATCH=15 CARGO_PKG_VERSION_PRE='' LD_L IBRARY_PATH='/home/cyril/Downloads/cargo-ndk-main/target/release/deps:/home/cyril/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib' rustc --crate-name ryu --edition=2018 /home/cyril/.cargo/registry/src/index.crates.io-6f 17d22bba15001f/ryu-1.0.15/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C metadata=6e81494efcfa505e -C extra-filename=-6e81494efcfa505e --out-dir /home/cyril/Downloads/cargo-ndk-main/target/armv7-linux-androideabi/release/deps --target armv7-linux-androideabi -C linker=/home/cyril/.cargo/bin/cargo-ndk -C strip=debuginfo -L d ependency=/home/cyril/Downloads/cargo-ndk-main/target/armv7-linux-androideabi/release/deps -L dependency=/home/cyril/Downloads/cargo-ndk-main/target/release/deps --cap-lints warn
RunningCARGO=/home/cyril/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo CARGO_CRATE_NAME=linux_raw_sys CARGO_MANIFEST_DIR=/home/cyril/.cargo/registry/src/index.crates.io-6f17d22bba15001f/linux-raw-sys-0.4. 12 CARGO_PKG_AUTHORS='Dan Gohman <dev@sunfishcode.online>' CARGO_PKG_DESCRIPTION='Generated bindings for Linux'\''s userspace API' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT' C ARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=linux-raw-sys CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='https://github.com/sunfishcode/linux-raw-sys' CARGO_PKG_RUST_VERSION=1.63 CARGO_PKG_VERSION=0.4.12 CARGO_PKG_VERSION_MAJOR= 0 CARGO_PKG_VERSION_MINOR=4 CARGO_PKG_VERSION_PATCH=12 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/home/cyril/Downloads/cargo-ndk-main/target/release/deps:/home/cyril/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib' rust c --crate-name linux_raw_sys --edition=2021 /home/cyril/.cargo/registry/src/index.crates.io-6f17d22bba15001f/linux-raw-sys-0.4.12/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate -type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="general"' --cfg 'feature="ioctl"' --cfg 'feature="no_std"' -C metadata=e4fa14ab48281cd5 -C extra-filename=-e4fa14ab48281cd5 --out-dir / home/cyril/Downloads/cargo-ndk-main/target/armv7-linux-androideabi/release/deps --target armv7-linux-androideabi -C linker=/home/cyril/.cargo/bin/cargo-ndk -C strip=debuginfo -L dependency=/home/cyril/Downloads/cargo-ndk-main/ target/armv7-linux-androideabi/release/deps -L dependency=/home/cyril/Downloads/cargo-ndk-main/target/release/deps --cap-lints warn
RunningCARGO=/home/cyril/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo CARGO_CRATE_NAME=os_str_bytes CARGO_MANIFEST_DIR=/home/cyril/.cargo/registry/src/index.crates.io-6f17d22bba15001f/os_str_bytes-2.4.0 CARGO_PKG_AUTHORS=dylni CARGO_PKG_DESCRIPTION='Traits for converting between byte sequences and platform-native strings ' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=os_str_bytes CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='https://github.com/dylni/os_str_bytes' CARGO_PKG_RUST_VERSION ='' CARGO_PKG_VERSION=2.4.0 CARGO_PKG_VERSION_MAJOR=2 CARGO_PKG_VERSION_MINOR=4 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/home/cyril/Downloads/cargo-ndk-main/target/release/deps:/home/cyril/.rustup/t oolchains/stable-x86_64-unknown-linux-gnu/lib' rustc --crate-name os_str_bytes --edition=2018 /home/cyril/.cargo/registry/src/index.crates.io-6f17d22bba15001f/os_str_bytes-2.4.0/src/lib.rs --error-format=json --json=diagnostic -rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C metadata=16533d316c890bff -C extra-filename=-16533d316c890bff --out-dir /home/cyril/Downloads/cargo- ndk-main/target/armv7-linux-androideabi/release/deps --target armv7-linux-androideabi -C linker=/home/cyril/.cargo/bin/cargo-ndk -C strip=debuginfo -L dependency=/home/cyril/Downloads/cargo-ndk-main/target/armv7-linux-androide abi/release/deps -L dependency=/home/cyril/Downloads/cargo-ndk-main/target/release/deps --cap-lints warn
Compiling log v0.4.20 RunningCARGO=/home/cyril/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo CARGO_CRATE_NAME=eieio CARGO_MANIFEST_DIR=/home/cyril/.cargo/registry/src/index.crates.io-6f17d22bba15001f/eieio-1.0.0 CARGO_PKG_AUTH ORS='kennytm <kennytm@gmail.com>' CARGO_PKG_DESCRIPTION='Error Implementing
Eq + Clonereplacing
std::io::Error' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE=MIT CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=eieio CARGO_PKG_README=R EADME.md CARGO_PKG_REPOSITORY='https://github.com/kennytm/eieio' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=1.0.0 CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=0 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' LD_LIBRA RY_PATH='/home/cyril/Downloads/cargo-ndk-main/target/release/deps:/home/cyril/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib' rustc --crate-name eieio --edition=2018 /home/cyril/.cargo/registry/src/index.crates.io-6f17 d22bba15001f/eieio-1.0.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C metadata=5f280f5a0fe3378d - C extra-filename=-5f280f5a0fe3378d --out-dir /home/cyril/Downloads/cargo-ndk-main/target/armv7-linux-androideabi/release/deps --target armv7-linux-androideabi -C linker=/home/cyril/.cargo/bin/cargo-ndk -C strip=debuginfo -L de pendency=/home/cyril/Downloads/cargo-ndk-main/target/armv7-linux-androideabi/release/deps -L dependency=/home/cyril/Downloads/cargo-ndk-main/target/release/deps --cap-lints warn
RunningCARGO=/home/cyril/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo CARGO_CRATE_NAME=once_cell CARGO_MANIFEST_DIR=/home/cyril/.cargo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.19.0 CARGO _PKG_AUTHORS='Aleksey Kladov <aleksey.kladov@gmail.com>' CARGO_PKG_DESCRIPTION='Single assignment cells and lazy values.' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=onc e_cell CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='https://github.com/matklad/once_cell' CARGO_PKG_RUST_VERSION=1.60 CARGO_PKG_VERSION=1.19.0 CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=19 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/home/cyril/Downloads/cargo-ndk-main/target/release/deps:/home/cyril/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib' rustc --crate-name once_cell --edition=2021 /home/cyril/.ca rgo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.19.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed -bitcode=no --cfg 'feature="alloc"' --cfg 'feature="default"' --cfg 'feature="race"' --cfg 'feature="std"' -C metadata=9a999aeec7313236 -C extra-filename=-9a999aeec7313236 --out-dir /home/cyril/Downloads/cargo-ndk-main/target/ armv7-linux-androideabi/release/deps --target armv7-linux-androideabi -C linker=/home/cyril/.cargo/bin/cargo-ndk -C strip=debuginfo -L dependency=/home/cyril/Downloads/cargo-ndk-main/target/armv7-linux-androideabi/release/deps -L dependency=/home/cyril/Downloads/cargo-ndk-main/target/release/deps --cap-lints warn
RunningCARGO=/home/cyril/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo CARGO_CRATE_NAME=log CARGO_MANIFEST_DIR=/home/cyril/.cargo/registry/src/index.crates.io-6f17d22bba15001f/log-0.4.20 CARGO_PKG_AUTHORS ='The Rust Project Developers' CARGO_PKG_DESCRIPTION='A lightweight logging facade for Rust ' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=log CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='https://github.com/rust-lang/log' CARGO_PKG_RUST_VERSION=1.60.0 CARGO_ PKG_VERSION=0.4.20 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=4 CARGO_PKG_VERSION_PATCH=20 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/home/cyril/Downloads/cargo-ndk-main/target/release/deps:/home/cyril/.rustup/toolchain s/stable-x86_64-unknown-linux-gnu/lib' rustc --crate-name log --edition=2015 /home/cyril/.cargo/registry/src/index.crates.io-6f17d22bba15001f/log-0.4.20/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts, future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C metadata=5439a76acde62944 -C extra-filename=-5439a76acde62944 --out-dir /home/cyril/Downloads/cargo-ndk-main/target/armv7-lin ux-androideabi/release/deps --target armv7-linux-androideabi -C linker=/home/cyril/.cargo/bin/cargo-ndk -C strip=debuginfo -L dependency=/home/cyril/Downloads/cargo-ndk-main/target/armv7-linux-androideabi/release/deps -L depen dency=/home/cyril/Downloads/cargo-ndk-main/target/release/deps --cap-lints warn
error[E0463]: can't find crate forcore
| = note: thearmv7-linux-androideabi
target may not be installed = help: consider downloading the target withrustup target add armv7-linux-androideabi
error[E0463]: can't find crate for
compiler_builtins
error[E0463]: can't find crate for
std
| = note: thearmv7-linux-androideabi
target may not be installed = help: consider downloading the target withrustup target add armv7-linux-androideabi
error[E0405]: cannot find trait
Sized
in this scope --> /home/cyril/.cargo/registry/src/index.crates.io-6f17d22bba15001f/equivalent-1.0.1/src/lib.rs:77:26 | 77 | pub trait Equivalent<K: ?Sized> { | ^^^^^ not found in this scopeerror[E0405]: cannot find trait for Q
| ^^^^^ not found in this scope
Sized
in this scope --> /home/cyril/.cargo/registry/src/index.crates.io-6f17d22bba15001f/equivalent-1.0.1/src/lib.rs:82:10 | 82 | impl<Q: ?Sized, K: ?Sized> Equivalenterror[E0405]: cannot find trait for Q
| ^^^^^ not found in this scope
Sized
in this scope --> /home/cyril/.cargo/registry/src/index.crates.io-6f17d22bba15001f/equivalent-1.0.1/src/lib.rs:82:21 | 82 | impl<Q: ?Sized, K: ?Sized> EquivalentI executed "rustup target add armv7-linux-androideabi" and got:
info: component 'rust-std' for target 'armv7-linux-androideabi' is up to date
I have tried a number of other routes complete the cross compilation but seem to encounter the same issue with all of them. I am not sure why it is not picking up "std" as I am able to use constituent functions outside of cross-compilation (Vec, Option,...) without any problems in my IDE (RustRover) and when compiling from the command line. Would you be able to suggest where the problem might be?