Android guide should be more explicit on why feature=static is required, and what it solves
First add the subcrates of arti you want to use to the [dependencies] section. You'll have to add features=["static"] to crates that support this feature (at the moment tor-rtcompat, tor-dirmgr and arti-client): otherwise they will fail either to compile or to run.
People are having issues compiling openssl. Following the above statement is enough to fix the issue, but people pointed to the guide just search for "openssl" and find nothing, so they assume there is no answer there when there actually is.
The error they get instead is quiet cryptic:
error: failed to run custom build command for `openssl-sys v0.9.76`
Caused by:
process didn't exit successfully: `/project-name/target/debug/build/openssl-sys-1f2017401b9375aa/build-script-main` (exit status: 101)
--- stdout
cargo:rustc-cfg=const_fn
cargo:rustc-cfg=openssl
cargo:rerun-if-env-changed=ARMV7_LINUX_ANDROIDEABI_OPENSSL_LIB_DIR
ARMV7_LINUX_ANDROIDEABI_OPENSSL_LIB_DIR unset
cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
OPENSSL_LIB_DIR unset
cargo:rerun-if-env-changed=ARMV7_LINUX_ANDROIDEABI_OPENSSL_INCLUDE_DIR
ARMV7_LINUX_ANDROIDEABI_OPENSSL_INCLUDE_DIR unset
cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
OPENSSL_INCLUDE_DIR unset
cargo:rerun-if-env-changed=ARMV7_LINUX_ANDROIDEABI_OPENSSL_DIR
ARMV7_LINUX_ANDROIDEABI_OPENSSL_DIR unset
cargo:rerun-if-env-changed=OPENSSL_DIR
OPENSSL_DIR unset
cargo:rerun-if-env-changed=OPENSSL_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_armv7-linux-androideabi
cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_armv7_linux_androideabi
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_ALLOW_CROSS
cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS
cargo:rerun-if-env-changed=PKG_CONFIG_armv7-linux-androideabi
cargo:rerun-if-env-changed=PKG_CONFIG_armv7_linux_androideabi
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_armv7-linux-androideabi
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_armv7_linux_androideabi
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
run pkg_config fail: "pkg-config has not been configured to support cross-compilation.\n\nInstall a sysroot for the target platform and configure it via\nPKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_PATH, or install a\ncross-compiling wrapper for pkg-config and set it via\nPKG_CONFIG environment variable."
--- stderr
thread 'main' panicked at '
Could not find directory of OpenSSL installation, and this `-sys` crate cannot
proceed without this knowledge. If OpenSSL is installed and this crate had
trouble finding it, you can set the `OPENSSL_DIR` environment variable for the
compilation process.
Make sure you also have the development packages of openssl installed.
For example, `libssl-dev` on Ubuntu or `openssl-devel` on Fedora.
If you're in a situation where you think the directory *should* be found
automatically, please open a bug at https://github.com/sfackler/rust-openssl
and include information about your system as well as this message.
$HOST = x86_64-unknown-linux-gnu
$TARGET = armv7-linux-androideabi
openssl-sys = 0.9.76
', /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.9.76/build/find_normal.rs:191:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace