Open he32 opened 1 month ago
Can you add a big endian test target to CI?
Can you add a big endian test target to CI?
Sorry, I have no idea how I do that. I do have a local qemu-run big-endian NetBSD/aarch64 10.0 installation running. However, it appears that for this to work, it depends on which version of qemu is used -- I'm currently using qemu 8.1.3, and there it works, but it does not look like qemu 8.0.2 works. I do not think I've done testing for qemu 9.0.1. Then there's the issue of how to match this up with CI, which I've never done before.
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 .github
. You should see cross being used.
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.
For what it's worth, I present to you the build result of your crate with my fixes applied, run on a big-endian aarch64 host, ref. the attachment. typescript.txt
for the CI, the setup from https://github.com/google/zerocopy/pull/1786 might help? and the issue from the rust compiler: https://github.com/rust-lang/stdarch/issues/1484 not sure if any of this can help.
Please fix this by fixing the intrinsics upstream. Fixing this in every single crate is not less effort than fixing it in stdarch: https://github.com/rust-lang/stdarch/issues/1484#issuecomment-1942934003
As noted in https://github.com/rust-lang/stdarch/issues/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 https://github.com/rust-lang/rust/issues/129819.