-
Notifications
You must be signed in to change notification settings - Fork 463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't compile for android #427
Comments
Thanks for the report! I think this is largely a duplicate of #82 since this crate doesn't read Cargo's configuration and otherwise there's not auto-detection to find the compiler and you'll need to specify it either via an env var or by augmenting PATH |
Thanks for your work and help. Could you kindly give me your setup there? I tried various settings for ENV var and PATH for my android toolchain and I'm always getting the same or similar errors. |
Ya, the environment variables seem to be ignored, even if the build.rs says not to. I personally fixed the cc-rs to use the toolchains I want, and use [patch] to override everyone to use that instead of the crates.io one. It works on Linux and wsl2, but can't get it working on windows due to linker errors. This also allows me to use ndk 20, though, instead of being forced on 16 and below. |
The environment variables for selecting compilers and passing flags is documented here |
I saw this issue: #308 but I don't think another issue was ever created. I have tried going back to android-ndk-r16b where the
arm-linux-androideabi-clang
is installed, and have the .cargo/config pointing to it correctly, but I still get that it's missing.I also tried on NDK 20 to specify the linker I wanted it to use, and it still wants the
arm-linux-androideabi-clang
even if that's not what I told it to use as the last user on that thread posted.I'm trying to compile https://github.com/Dispersia/bounce using cargo-apk, if you want to reproduce it. I have OpenSSL set to the correct prebuilt android binaries.
Is there any way to get this to build?
EDIT: I symlinked those files to the base NDK folder and just reference it there and it seems to be working under ndk 16b... Should it not use the cargo config full path to reference the executable? Is this a problem with cargo-apk then? I'm not sure which part of the build is calling this.
Thanks!
The text was updated successfully, but these errors were encountered: