Open pkubaj opened 11 months ago
WG-prioritization assigning priority (Zulip discussion).
@rustbot label -I-prioritize +P-medium
I see a similar problem on NetBSD/macppc 10.0_BETA (32-bit powerpc) when rust
is built with the embedded LLVM. In my case, the errors emitted are:
Compiling cc v1.0.79
Running `/usr/pkgsrc/wip/rust/work/rustc-1.73.0-src/build/bootstrap/debug/rustc --crate-name cc --edition=2018 /usr/pkgsrc/wip/rust/work/rustc-1.73.0-src/vendor/cc/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="jobserver"' --cfg 'feature="parallel"' -Zunstable-options --check-cfg 'values(feature, "jobserver", "parallel")' --check-cfg 'names()' --check-cfg 'values()' -C metadata=91e1216a03968704 -C extra-filename=-91e1216a03968704 --out-dir /usr/pkgsrc/wip/rust/work/rustc-1.73.0-src/build/powerpc-unknown-netbsd/stage2-tools/release/deps -L dependency=/usr/pkgsrc/wip/rust/work/rustc-1.73.0-src/build/powerpc-unknown-netbsd/stage2-tools/release/deps --extern jobserver=/usr/pkgsrc/wip/rust/work/rustc-1.73.0-src/build/powerpc-unknown-netbsd/stage2-tools/release/deps/libjobserver-fb2cbaa448fd5a50.rmeta --cap-lints allow -Z binary-dep-depinfo`
error[E0004]: non-exhaustive patterns: `Some(_)` not covered
--> /usr/pkgsrc/wip/rust/work/rustc-1.73.0-src/vendor/cc/src/lib.rs:1585:38
|
1585 | let crt_flag = match self.static_crt {
| ^^^^^^^^^^^^^^^ pattern `Some(_)` not covered
|
note: `Option<bool>` defined here
--> /usr/pkgsrc/wip/rust/work/rustc-1.73.0-src/library/core/src/option.rs:571:5
|
563 | pub enum Option<T> {
| ------------------
...
571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
| ^^^^ not covered
= note: the matched value is of type `Option<bool>`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
1597 ~ },
1598 + Some(_) => todo!()
|
For more information about this error, try `rustc --explain E0004`.
Did not run successfully: exit status: 1
However, if, instead, rust
is built with an external LLVM, version 15.0.7, the build succeeds(!)
The LLVM embedded in rust
version 1.73.0 appears to be version 17.0.2.
Can you please try beta (or alternatively LLVM 17.0.3)? It contains a miscompilation fix for PowerPC targets that may be relevant.
Hmm, I've not done that before. Is there a tar-ball available of beta which includes all the vendored sources (something which my current build setup relies on)? Or... It may be easier to extract the diff between llvm 17.0.2 and 17.0.3 and apply that, as a test.
I backported the one-line change from https://github.com/llvm/llvm-project/commit/491a91e8eea27fab4d8123cbfbb01bf1cf251b9c#diff-909a72141a3ecd6bfde54a6344f80d2a194c3eb79622c5845f6c7c119145af6f and it fixes Rust's build. Since it looks like there are more platforms experiencing this issue (not just FreeBSD and the LLVM bug mentions also 64-bit POWER, even though Rust builds fine for me on 64-bits), would it be possible to release 1.73.1 with this patch (or LLVM 17.0.3)?
I wedged in the 17.0.3 changes, and with that my build of 1.73.0 succeeds on NetBSD/macppc 10.0_BETA.
This is FreeBSD 14.0-RC1 on powerpc (powerpc64 and powerpc64le build and work fine). 1.72.0 builds fine, but 1.73.0: