-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Building 1.74.0 natively on NetBSD/powerpc results in "pattern Some(_)
not covered" error message
#118099
Comments
For context, the relevant snippet where we seem to have an exhaustiveness check bug: pub fn supports_feature(feature: &str) -> Option<bool> {
match is_feature_flaggable() {
Some(true) => { /* continue */ }
Some(false) => return Some(false),
None => return None,
} |
that is not very good, it seems very bad even. I think your compiler has been miscompiled and is buggy now. |
That's ... not good. Is there something I could do to try to narrow this down, perhaps using the 1.73.0 compiler?
There are a few adjustments done for powerpc to reduce the size of the bits produced:
Other than that, I managed to pick up #116845 and a fix for that issue is also included in the 1.73.0 bits. Other than that it's configured similarly to all the other NetBSD targets, and I have rust 1.74.0 for amd64 successfully building firefox, and the result runs (for the limited testing I've been able to do). It also seems that both the armv7, aarch64 and riscv64 native builds have passed this particular point in their respective builds. So this points the suspicion in the direction of this being something powerpc-specific. One thing worth mentioning is that the bootstrap kit for 1.73.0 for powerpc is cross-built (on NetBSD/amd64), and as such, is built using the embedded LLVM in the rust compiler distribution. I will take a stab at natively building a test bootstrap kit for 1.73.0 using an older external LLVM, to see if that makes any difference. It'll take a while... |
WG-prioritization assigning priority (Zulip discussion). @rustbot label -I-prioritize +P-high |
OK, I have "liftoff" for a build of 1.74.0, using a 1.73.0 built against an external LLVM 15.0.7, and |
FYI: that build of 1.74.0 has now completed successfully. |
Actually, the issue may have started with the LLVM inside 1.73.0 -- the original issue was flagged so early in the build that it's the bootstrap compiler which flagged the error. |
I'm going to re-test to build 1.74.0 with the internal LLVM using the 1.73.0 bootstrap built with an external 15.0.7 LLVM, and since rust builds itself several times, we'll see if that flags the error. |
I can now report that that build of 1.74.0 actually succeeded. That is, 1.74.0 built with the rust-supplied LLVM. |
Does this mean this issue can be closed? |
Well, it's a clear indication that all is not well with the LLVM integrated in 1.73.0 when it comes to powerpc code generation. For now I have worked around the issue by building the 1.73.0 bootstrap using an external (older) LLVM. That doesn't mean that there isn't a problem, though... But it doesn't look like 1.74.0 has this particular problem. |
The LLVM in 1.73 does indeed have a known issue, see #116845. If I understand correctly, this issue is a duplicate of that one, just now encountered when using it as a bootstrap compiler? |
Well, the change from that issue was already found and installed, but it appears that there is yet another problem with the 1.73.0 compiler despite that fix being applied. |
Ah I see, thanks for the clarification. |
…werpc. I admit that I cannot fully explain how the NetBSD/aarch64 checksum managed to mismatch, but at least the bits on ftp.netbsd.org and cdn.netbsd.org agree, also with the local build results I had for the cross-compiled bits. Deal with NetBSD/powerpc: 1.74.0 revealed that the bootstrap kit from rust 1.73.0 (also used here) mis-compiles, ref. rust-lang/rust#118099 The new powerpc bootstrap kit is therefore natively compiled, with an external LLVM (therefore has an exteranl dependency on LLVM) instead of the rust-supplied internal one / cross-compiled. Also, remove vestiges of hints of being able to use this package on NetBSD/powerpc 8.x, ref. note to tech-pkg of November 28; newer rust's embedded LLVM uses newer C++ features than what netbsd-8 supports "out of the box". Bump PKGREVISION, even though this only fixes buildability for NetBSD/aarch64 and changes contents for NetBSD/powerpc.
While trying to build 1.74.0 natively on NetBSD/powerpc 10.0_BETA, I appear to be unable to cross this problem by myself. It doesn't look like the
armv7
oraarch64
NetBSD targets are similarly affected, so this is probably more a powerpc issue than a NetBSD issue.Once again I solicit assistance about how to cross this hurdle.
And ... why does this happen just for this target?
At least this hurdle appears to be consistent / reproducible...
The text was updated successfully, but these errors were encountered: