-
Notifications
You must be signed in to change notification settings - Fork 375
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
aarch64-linux-android target fails if using rust nightly #1128
Comments
I believe this is likely fixed by migrating to a higher SDK level, and a recent nightly started using more recent API flags, and would likely be fixed by migrating the default to say, Android 10 or 11. This is addressed by #1023, but we'd have to change the default build version since we currently default to Android 9 which is quite old. |
the nightly change is rust-lang/rust#103673 |
@Nohac this can be fixed in your project by configuring cross to build std. In
Unfortunately, this errors on stable, so you need some way to do this only on nightly. Here's how we did that: https://github.com/strawlab/iana-time-zone/pull/87/files |
I updated my local ndk to r25b (25.1.8937393) as @Alexhuszagh mentioned, and that solved the linker error! On change I noticed updating to the new ndk, is that they got rid of a binary called |
@Nohac That's odd, I thought we solved that actually. Rust also looks for these tools internally, so I believe this should be required. Let me check if our symlink script is failing, although it shouldn't... cross/docker/android-symlink.sh Lines 34 to 47 in a0721d8
|
@Nohac Can you provide the exact configuration you used? Here's a sample build of mine using a newer NDK which has: $ file $(which llvm-ar)
/android-ndk/bin/llvm-ar: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, stripped
$ file $(which aarch64-linux-android-ar)
/android-ndk/bin/aarch64-linux-android-ar: symbolic link to /android-ndk/bin/llvm-ar This is using NDK version |
To clarify, I only did this locally, I wasn't aware that you already deal with this in cross, which is nice to see. |
the env vars are for when building the image with |
There's also a section on the wiki for building images with other Android versions. |
@Alexhuszagh sorry for the late reply. Following the wiki and choosing a new ndk version seems to have solved the problem, no symlinking necessary, thanks! I'm not sure if you want to close this issue now, or wait until it's solved in the default docker image? |
I believe this was fixed by default in #1023 so it should work for the latest main images. See the lines in the diff: We've changed it to use This wasn't before you made the comment, and then I changed the PR to increment the Android NDK versions for this exact purpose. |
Failing due to not locating libunwind This is related to: cross-rs/cross#1128 There are workarounds here: rust-lang/rust#85806 (comment) Someone might want to try implement it later For now I'm pulling the android compiles
* v0.5.0 Update: changelog Update: wasm binary and files Bump: deps Add: release on version tag github action Add: release checklist * Remove: Android CI target Failing due to not finding libunwind This is related to: cross-rs/cross#1128 There is a workaround: rust-lang/rust#85806 (comment) Someone might want to try implement it later For now I'm pulling out the android compiles from CI
Checklist
Describe your issue
I'm not sure if this belongs here, since the same thing happens if I try compiling without
cross
, but I figured I'd start here and work my way down.If I try to build any rust project using the latest rust nightly, I'm getting the following linking error:
This works using rust stable, and it used to work with nightly, maybe one or two month ago.
I've been stuck on this for a while now, so any help would be greatly appreciated.
What target(s) are you cross-compiling for?
aarch64-linux-android
Which operating system is the host (e.g computer cross is on) running?
What architecture is the host?
What container engine is cross using?
cross version
cross 0.2.4
Example
The text was updated successfully, but these errors were encountered: