-
Notifications
You must be signed in to change notification settings - Fork 13k
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 1.80.0 fails to build for aarch64_be-unknown-netbsd #129819
Comments
I want to be helpful, but I'm not sure what a possible resolution of you filing this issue would even be. You are filing an issue about a Tier 3 target (thus we make no guarantees at all about it), on an already-released stable version. We will probably never cut a point release to fix a Tier 3 target. If you want this and other netbsd targets to build in stable releases, you should be testing that the beta versions build, or upstreaming CI for these targets to us, so that they can become Tier 2. In an ideal world, your users who are downloading your builds for these targets would pitch in so you don't have to do everything :) |
does it build on master now? |
You're of course correct in stating that this is a tier-3 target. In fact, I'm the one who does my best to keeping the various NetBSD targets building (and verifying that the result actually works), and this includes this particular target. The first question I asked was whether the other big-endian aarch64 target is known to build for 1.80.0. That's basically a "yes/no/don't know" question, and should not be difficult to answer. Secondly, my build setup is only able to handle "tarballs", i.e. official distributions. In fact, I am unsure where the "how to build" instructions are for building a "nightly" version of the rust compiler. Thirdly, this build failure occurs when cross-building, so should be reproducible "anywhere", and I have a vague suspicion that it affects that other big-endian aarch64 target as well. Please do note, I do all this on my own spare time, so I appreciate any helpful hints which might point me in the right direction. I've asked a bit around and while the neon extension in aarch64 is supposedly also available in big-endian mode, code using the neon SIMD extnsions all too often isn't carefully enough written to also actually work in big-endian mode. I guess what I'm asking is whether the rust compiler has been written with that sufficient careful attention, or whether it might be a more productive route to follow to abandon trying to use neon SIMD on big-endian aarch64. |
We provide source tarballs for every beta and nightly release too. For example https://static.rust-lang.org/dist/2024-08-25/rustc-nightly-src.tar.gz for nightly-2024-08-25 or https://static.rust-lang.org/dist/rustc-beta-src.tar.xz for the latest beta. For building manually see https://github.com/rust-lang/rust/blob/master/INSTALL.md As for how to fix this issue, you will need to change https://github.com/google/zerocopy/ Possibly by changing the |
Thanks for the hints! So far I've grown patches to |
So, there, I have a cross-built version for big-endian aarch64. I had to touch up the following files:
Well, the two arch-specific aarch64 files in memchr are possibly not required. We'll see. |
This is done by conditionalizing use of the neon SIMD extensions on the target being little-endian. Ref. rust-lang/rust#129819
As noted in rust-lang/stdarch#1484, the NEON intrinsics are broken on big-endian aarch64. This is part of fixing rust to build for & on big-endian aarch64, following up rust-lang/rust#129819.
OK, the various pointers given led me to a working rust 1.80.1 on aarch64eb on NetBSD. |
@he32 is there a reason to attempt to send patches to everyone instead of fixing the intrinsics in stdarch? Amanieu has laid out in the stdarch issue how that could be done, that seems like both less effort and making it easier and nicer for everyone |
You mean, above the fact that fixing the intrinsics in stdarch and probably also battling with LLVM would be waay above and beoynd both my abilities, my available time, my sense of responsibility, and my energy to push such a change through?
I guess I'll take a look at what that is about, and assess whether my gut reaction above is accurate or not. ... On reading through the stdarch issue, I see that my initial hunch is approximately accurate. It may not be a battle with LLVM, but I know too little |
I tried to cross-build rust 1.80.0 for the big-endian aarch64 NetBSD target.
I expected to see this happen: I expected (eh, "hoped") that this build would now succeed (1.79.0 didn't)
Instead, this happened: The build bombs out because some SIMD type is not available:
Meta
The build host has 1.80.0 installed, but is using 1.79.0 in the bootstrap process, but that's probably irrelevant here.
rustc --version --verbose
:The details of the failed build can be seen above.
I see one other big-endian aarch64 port, so I'm wondering if I'm alone in observing this issue for big-endian aarch64?
The text was updated successfully, but these errors were encountered: