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
rust: cross build broken on armv*hf-musl #3605
Comments
Well, the easiest way to find out is removing the supposedly wrong branch, I guess :D Currently building with this - not that I actually want to use it, but it'd be good to know if it's actually caused by this. |
wouldn't that break the stage1 compiler? |
Oh, oops, yes. Currently testing some other stuff, let's see... |
Hm, I've reversed the logic of that function and it still returns the same error, I start doubting that the error actually comes from that... |
I looked into it again but couldn't find a better explanation. I don't have a machine to do test builds, so what I found was by looking at the sources. |
Comparing the libstd-xxx.so files on glibc and musl shows that in both cases the correct branch is taken in |
The difference is the the default include path order is different in musl and glibc. They both provide the same api/prototypes, except that There are a few possible solutions I can think of:
|
libunwind wasn't used before rust-1.28. Re-adding some old patches should make it work without again. Waiting for the build to complete ... |
Nice I got the same feedback from musls freenode channel and a patch smaeul/rust@e3b9058 |
fixes: void-linux#3605 [ci skip]
we're currently building rust without |
fixes: void-linux#3605 [ci skip]
In the last few days we made huge steps forward to get a cross (and native non-x86) environment for rust.
@Cogitri, @jnbr, and I fixed all glibc platforms and aarch64 for both musl and glibc. The only platforms that remained broken are armv6hf-musl and armv7hf-musl.
The error occurs during cross building while linking rustc. It seems that libunwind is built with a wrong configuration. As noted in https://github.com/rust-lang/rust/blob/1.29.1/src/libunwind/libunwind.rs#L178, _Unwind_GetIP is implemented as a macro which is handled below the comment. As you can see in the buildlog, the linker complains about the missing function which indicates, that at https://github.com/rust-lang/rust/blob/1.29.1/src/libunwind/libunwind.rs#L96 the wrong branch is taken.
https://gist.github.com/Gottox/ebb16c18150b5d6daec7c67daaacd4b4
The text was updated successfully, but these errors were encountered: