-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
Make this crate build on big-endian aarch64. #162
base: master
Are you sure you want to change the base?
Conversation
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.
Can you add a big endian test target to CI? |
Sorry, I have no idea how I do that. |
Have you looked into using cross? CI is already using cross for many targets (which uses qemu under the hood). Ideally you would find a big endian target and just add it to CI. |
Have you looked into using cross? CI is already using cross for
many targets (which uses qemu under the hood). Ideally you
would find a big endian target and just add it to CI.
"cross", what is that?
If you want to put a label on me, you can call me a pre-cloud
programmer, sysadmin and network administrator, so please have
some patience and provide explicit references.
|
I don't have a ton of time for mentoring, but if you're looking to fix big endian targets, then we should add testing for those targets to CI. Otherwise there is nothing ensuring that your fixes are correct or that the problems stay fixed. Please look at the existing CI configuration in |
See also https://github.com/cross-rs/cross Cross has nothing to do with "the cloud." |
Hmm... This crate is vendored into the rust compiler. WIthout these fixes, there will not be a big-endian aarch64 rust compiler without having to manually apply patches, and without the rust compiler, I predict there will be problems setting up the CI. So how do we break this logjam? |
What have you tried? What happened? Did you investigate cross? |
What have you tried? What happened? Did you investigate cross?
What brought me here was the appearance of a need to patch your
crate which is vendored into the rust 1.80.1 compiler tarball
source distribution, and my desire to make this build both for
and on NetBSD/aarch64eb. I find it unlikely that the rust 1.80.1
compiler will build for any other big-endian aarch64 targets
without a similar patch.
The goal of my submitting this pull request is that the fix from
the pull request will eventually make it into the vendored crate
in the rust compiler, so that a future version will build for
big-endian aarch64 without having to apply and maintain these
fixes as patches.
I have therefore not yet studied enabling an aarch64eb CI target.
I highly suspects it's a "chicken and egg" situation.
E.g. there is no big-endian aarch64 target listed in
https://forge.rust-lang.org/infra/other-installation-methods.html
The point of this whole excercise is to get out of that
situation.
|
Fair enough. This means I'm going to need to investigate myself and I don't know when I'm going to have time to do that. |
This is done by avoiding attempts at using neon / SIMD in big-endian mode by patching some of the vendored crates. Neon / SIMD is known to be problematical in rust, ref. rust-lang/stdarch#1484, even though the CPU itself supports it. I've also tried reporting the memchr fixes upstream, ref. BurntSushi/memchr#162 So far not yet adopted. Zerocopy has also received a pull request: google/zerocopy#1795
For what it's worth, I present to you the build result of your crate with my fixes applied, |
for the CI, the setup from google/zerocopy#1786 might help? and the issue from the rust compiler: rust-lang/stdarch#1484 |
Please fix this by fixing the intrinsics upstream. Fixing this in every single crate is not less effort than fixing it in stdarch: rust-lang/stdarch#1484 (comment) |
rust-lang/rust#132714 bumped memchr without considering aarch64_be is not supported in memchr: BurntSushi/memchr#162
rust-lang/rust#132714 bumped memchr without considering aarch64_be is not supported in memchr: BurntSushi/memchr#162
rust-lang/rust#132714 bumped memchr without considering aarch64_be is not supported in memchr: BurntSushi/memchr#162
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.