-
Notifications
You must be signed in to change notification settings - Fork 112
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
Android NDK r23 beta 3 and up do not include libgcc
anymore
#149
Comments
It looks like this has been fixed with rust-lang/rust#85806 🥳 Unfortunately it has not reached nightly yet, will close this when it is confirmed fixed. |
The ndk version over r23 could not work. see: * [android-ndk-rs#149](rust-mobile/ndk#149) * [rust#85806](rust-lang/rust#85806)
This comment has been minimized.
This comment has been minimized.
Please don't download or use undocumented rar files from random people on the internet. Aforementioned Rust PR unfortunately doesn't fix it as the older NDK installed on the CI seems to add We can do this by either:
We'd only want to do this if the NDK is >= r23 as to not break r22. The first option won't remove the linker script from the path again which likely has adverse effects. |
@MarijnS95 what? i'm just offering the temporary solution, there's no stupid scams or viruses inside that .rar file. |
"Switch to cargo rustc and pass -- -L/the/path to a custom location where we write libgcc.a" exactly, that's. just take "libgcc.a" for every arch, anyway mine's taken from NDK-r21d, working fine so far. |
We'll write |
@MarijnS95 just take them yourself from the earlier NDK (r21d), if you don't have any, download from official google repo and if there's not available, just extract from .rar file above. i swear there's no virus at all. |
It looks like this was fixed in rust-lang/rust@965997b and so using a Rust nightly more recent than ~Jun 2021 should work. |
@jfgoog please see rust-lang/rust#85806 (comment) and other replies below. Supposedly Rust's std/toolchain is built with an older NDK that includes a linker statement for libgcc regardless of that patch. Feel free to try it out for yourself on a recent Rust release or nightly, too. |
Cool! Glad to see progress on this, and sorry for the drive-by comment. |
@jfgoog no worries, I thought I had mentioned that that Rust patch unfortunately hasn't fixed it, hence the need for a workaround. Now that that's in I'll make a new release today or tomorrow, stay tuned! |
@ar37-rs that's exactly what someone who is sending a virus would say (i'm just kidding, thanks man 😂 ) |
A heads-up to anyone upgrading beyond NDK r23 beta 2:
r23 beta 2 is still working fine as per #137.
GCC Is being completely removed from the NDK, but unfortunately something deep down in Rust depends on
gcc
. This also happens on a project without dependencies built withcargo b --target aarch64-linux-android
.The possible cause for these is:
https://github.com/rust-lang/rust/blob/9a3214e9be41a5d50ae6ba9bb8422dcc2cb10473/library/std/src/sys/unix/mod.rs#L210-L214
I'll see whether Rust really needs to link against
libgcc
and if that can otherwise be replaced withlibclang_rt.builtins
as per https://github.com/android/ndk/wiki/Changelog-r23#changes / android/ndk#1231, without breaking existing builds.The text was updated successfully, but these errors were encountered: