Skip to content
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.54 fails to build on s390x with llvm 11 #87807

Closed
Firstyear opened this issue Aug 6, 2021 · 2 comments
Closed

rust 1.54 fails to build on s390x with llvm 11 #87807

Firstyear opened this issue Aug 6, 2021 · 2 comments
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-bug Category: This is a bug. O-SystemZ Target: SystemZ processors (s390x) regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Firstyear
Copy link
Contributor

Hi there,

I'm the maintainer of rust for opensuse. I have been working to include rust1.54 recently but I have noticed that with distro llvm11 on s390x that rust fails to build. Rust1.54 works correctly on s390x with distro llvm12 or with the bundled llvm that rust provides.

The build error is (a longer extract is below) - I'm quite confident that the error is not in the "either" crate, but this is a codegen issue with llvm. Since i have access to an s390x machine and a reproduction environment, I am happy to help with bisecting this with some guidance (especially to find what changes between llvm11 -> 12 that resolves this).

Thanks for your advice and help!

[ 3727s] error[E0220]: associated type `Item` not found for `L`
[ 3727s]    --> /home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/vendor/either-1.6.0/src/lib.rs:394:35
[ 3727s]     |
[ 3727s] 394 |         R: IntoIterator<Item = L::Item>,
[ 3727s]     |                                   ^^^^ associated type `Item` not found
[ 3727s]
[ 3727s] error[E0220]: associated type `IntoIter` not found for `L`
[ 3727s]    --> /home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/vendor/either-1.6.0/src/lib.rs:391:41
[ 3727s]     |
[ 3727s] 391 |     pub fn into_iter(self) -> Either<L::IntoIter, R::IntoIter>
[ 3727s]     |                                         ^^^^^^^^ associated type `IntoIter` not found
[ 3727s]
[ 3727s] error[E0220]: associated type `IntoIter` not found for `R`
[ 3727s]    --> /home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/vendor/either-1.6.0/src/lib.rs:391:54
[ 3727s]     |
[ 3727s] 391 |     pub fn into_iter(self) -> Either<L::IntoIter, R::IntoIter>
[ 3727s]     |                                                      ^^^^^^^^ associated type `IntoIter` not found
[ 3727s]
[ 3727s] error: aborting due to 3 previous errors
[ 3727s]
[ 3727s] For more information about this error, try `rustc --explain E0220`.
[ 3727s] error: could not compile `either`
[ 3727s]
[ 3727s] To learn more, run the command again with --verbose.
[ 3727s] warning: build failed, waiting for other jobs to finish...
[ 3727s]
[ 3727s] Did not run successfully: exit status: 1
[ 3727s] "/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/build/s390x-unknown-linux-gnu/stage2/bin/rustc" "--crate-name" "either" "/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/vendor/either-1.6.0/src/lib.rs" "--error-format=json" "--json=diagnostic-rendered-ansi,artifacts" "--crate-type" "lib" "--emit=dep-info,metadata,link" "-C" "opt-level=3" "-C" "embed-bitcode=no" "-C" "debuginfo=1" "-C" "debug-assertions=on" "-C" "overflow-checks=off" "-C" "metadata=6b8b34c95aa2e190" "-C" "extra-filename=-6b8b34c95aa2e190" "--out-dir" "/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/build/s390x-unknown-linux-gnu/stage2-tools/s390x-unknown-linux-gnu/release/deps" "--target" "s390x-unknown-linux-gnu" "-L" "dependency=/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/build/s390x-unknown-linux-gnu/stage2-tools/s390x-unknown-linux-gnu/release/deps" "-L" "dependency=/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/build/s390x-unknown-linux-gnu/stage2-tools/release/deps" "--cap-lints" "allow" "-Clink-arg=-Wl,-z,relro,-z,now" "-Zmacro-backtrace" "-Ztls-model=initial-exec" "-Z" "binary-dep-depinfo" "--sysroot" "/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/build/s390x-unknown-linux-gnu/stage2"

Meta

bootstrap compiler - rust 1.54.0 and 1.53.0 from https://static.rust-lang.org/dist
building compiler - 1.54.0 (git tag 1.54.0) 

working:

  • x86_64 with llvm11
  • x86_64 with llvm12
  • x86_64 with bundled llvm
  • s390x with llvm12
  • s390x with bundled llvm

not working

  • s390x with llvm11

llvm11 source: https://build.opensuse.org/package/show/devel:tools:compiler/llvm11
llvm12 source: https://build.opensuse.org/package/show/devel:tools:compiler/llvm12

Backtrace

[ 3717s] < Std { compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }, target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }
[ 3717s] c Assemble { target_compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } } }
[ 3717s] > Cargo { compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }, target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }
[ 3717s]   > Cargo { compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }, target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }
[ 3717s]     > Cargo { compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }, target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }
[ 3717s]       > ToolBuild { compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }, target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None }, tool: "cargo", path: "src/tools/cargo", mode: ToolRustc, is_optional_tool: false, source_type: Submodule, extra_features: [] }
[ 3717s]         c Std { target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None }, compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } } }
[ 3717s]         > Rustc { target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None }, compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } } }
[ 3717s]           c Std { target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None }, compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } } }
[ 3717s]           c Assemble { target_compiler: Compiler { stage: 1, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } } }
[ 3717s]           c Rustc { target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None }, compiler: Compiler { stage: 1, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } } }
[ 3717s] Uplifting stage1 rustc (s390x-unknown-linux-gnu -> s390x-unknown-linux-gnu)
[ 3717s]           > RustcLink { compiler: Compiler { stage: 1, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }, target_compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }, target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }
[ 3717s] Copying stage2 rustc from stage1 (s390x-unknown-linux-gnu -> s390x-unknown-linux-gnu / s390x-unknown-linux-gnu)
[ 3717s]             c Libdir { compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }, target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }
[ 3717s]             c Libdir { compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }, target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }
[ 3717s]           < RustcLink { compiler: Compiler { stage: 1, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }, target_compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }, target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }
[ 3717s]         < Rustc { target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None }, compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } } }
[ 3717s]         c Libdir { compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }, target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }
[ 3717s]         c Sysroot { compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } } }
[ 3717s]         c Sysroot { compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } } }
[ 3717s]         c Sysroot { compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } } }
[ 3717s]         c Sysroot { compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } } }
[ 3717s]         c Sysroot { compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } } }
[ 3717s]         c Llvm { target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }
[ 3717s] Building stage2 tool cargo (s390x-unknown-linux-gnu)
[ 3717s] running: "/home/abuild/rpmbuild/BUILD/rust-1.54.0-s390x-unknown-linux-gnu/usr/bin/cargo" "build" "--target" "s390x-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "4" "--release" "--frozen" "--manifest-path" "/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/src/tools/cargo/Cargo.toml" "--message-format" "json-render-diagnostics"
[ 3719s]    Compiling libc v0.2.93
[ 3719s]    Compiling pkg-config v0.3.18
[ 3719s]    Compiling autocfg v1.0.0
[ 3719s]    Compiling proc-macro2 v1.0.24
[ 3721s]    Compiling syn v1.0.65
[ 3721s]    Compiling unicode-xid v0.2.1
[ 3721s]    Compiling cfg-if v1.0.0
[ 3721s]    Compiling serde_derive v1.0.125
[ 3721s]    Compiling cfg-if v0.1.10
[ 3721s]    Compiling serde v1.0.125
[ 3721s]    Compiling log v0.4.14
[ 3721s]    Compiling crc32fast v1.2.0
[ 3722s]    Compiling matches v0.1.8
[ 3722s]    Compiling bitflags v1.2.1
[ 3722s]    Compiling memchr v2.4.0
[ 3722s]    Compiling getrandom v0.2.0
[ 3722s]    Compiling tinyvec v0.3.4
[ 3722s]    Compiling lazy_static v1.4.0
[ 3722s]    Compiling ryu v1.0.5
[ 3722s]    Compiling percent-encoding v2.1.0
[ 3722s]    Compiling getrandom v0.1.14
[ 3722s]    Compiling serde_json v1.0.59
[ 3723s]    Compiling anyhow v1.0.34
[ 3723s]    Compiling typenum v1.12.0
[ 3723s]    Compiling openssl v0.10.33
[ 3723s]    Compiling ppv-lite86 v0.2.8
[ 3723s]    Compiling itoa v0.4.6
[ 3723s]    Compiling openssl-probe v0.1.2
[ 3723s]    Compiling regex-syntax v0.6.22
[ 3724s]    Compiling curl v0.4.36
[ 3724s]    Compiling foreign-types-shared v0.1.1
[ 3724s]    Compiling byteorder v1.3.4
[ 3724s]    Compiling version_check v0.9.3
[ 3724s]    Compiling once_cell v1.7.2
[ 3725s]    Compiling same-file v1.0.6
[ 3725s]    Compiling remove_dir_all v0.5.3
[ 3725s]    Compiling semver v1.0.3
[ 3725s]    Compiling hex v0.3.2
[ 3725s]    Compiling unicode-width v0.1.8
[ 3725s]    Compiling utf8parse v0.1.1
[ 3725s]    Compiling fnv v1.0.7
[ 3725s]    Compiling ansi_term v0.11.0
[ 3726s]    Compiling termcolor v1.1.0
[ 3726s]    Compiling humantime v2.0.1
[ 3726s]    Compiling vec_map v0.8.2
[ 3726s]    Compiling smallvec v1.6.1
[ 3727s]    Compiling shell-escape v0.1.5
[ 3727s]    Compiling either v1.6.0
[ 3727s] error[E0220]: associated type `Item` not found for `L`
[ 3727s]    --> /home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/vendor/either-1.6.0/src/lib.rs:394:35
[ 3727s]     |
[ 3727s] 394 |         R: IntoIterator<Item = L::Item>,
[ 3727s]     |                                   ^^^^ associated type `Item` not found
[ 3727s]
[ 3727s] error[E0220]: associated type `IntoIter` not found for `L`
[ 3727s]    --> /home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/vendor/either-1.6.0/src/lib.rs:391:41
[ 3727s]     |
[ 3727s] 391 |     pub fn into_iter(self) -> Either<L::IntoIter, R::IntoIter>
[ 3727s]     |                                         ^^^^^^^^ associated type `IntoIter` not found
[ 3727s]
[ 3727s] error[E0220]: associated type `IntoIter` not found for `R`
[ 3727s]    --> /home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/vendor/either-1.6.0/src/lib.rs:391:54
[ 3727s]     |
[ 3727s] 391 |     pub fn into_iter(self) -> Either<L::IntoIter, R::IntoIter>
[ 3727s]     |                                                      ^^^^^^^^ associated type `IntoIter` not found
[ 3727s]
[ 3727s] error: aborting due to 3 previous errors
[ 3727s]
[ 3727s] For more information about this error, try `rustc --explain E0220`.
[ 3727s] error: could not compile `either`
[ 3727s]
[ 3727s] To learn more, run the command again with --verbose.
[ 3727s] warning: build failed, waiting for other jobs to finish...
[ 3727s]
[ 3727s] Did not run successfully: exit status: 1
[ 3727s] "/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/build/s390x-unknown-linux-gnu/stage2/bin/rustc" "--crate-name" "either" "/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/vendor/either-1.6.0/src/lib.rs" "--error-format=json" "--json=diagnostic-rendered-ansi,artifacts" "--crate-type" "lib" "--emit=dep-info,metadata,link" "-C" "opt-level=3" "-C" "embed-bitcode=no" "-C" "debuginfo=1" "-C" "debug-assertions=on" "-C" "overflow-checks=off" "-C" "metadata=6b8b34c95aa2e190" "-C" "extra-filename=-6b8b34c95aa2e190" "--out-dir" "/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/build/s390x-unknown-linux-gnu/stage2-tools/s390x-unknown-linux-gnu/release/deps" "--target" "s390x-unknown-linux-gnu" "-L" "dependency=/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/build/s390x-unknown-linux-gnu/stage2-tools/s390x-unknown-linux-gnu/release/deps" "-L" "dependency=/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/build/s390x-unknown-linux-gnu/stage2-tools/release/deps" "--cap-lints" "allow" "-Clink-arg=-Wl,-z,relro,-z,now" "-Zmacro-backtrace" "-Ztls-model=initial-exec" "-Z" "binary-dep-depinfo" "--sysroot" "/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/build/s390x-unknown-linux-gnu/stage2"
[ 3727s] -------------
[ 3740s] error: build failed
[ 3740s] command did not execute successfully: "/home/abuild/rpmbuild/BUILD/rust-1.54.0-s390x-unknown-linux-gnu/usr/bin/cargo" "build" "--target" "s390x-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "4" "--release" "--frozen" "--manifest-path" "/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/src/tools/cargo/Cargo.toml" "--message-format" "json-render-diagnostics"
[ 3740s] expected success, got: exit status: 101
[ 3740s] Traceback (most recent call last):
[ 3740s]   File "./x.py", line 27, in <module>
[ 3740s]     bootstrap.main()
[ 3740s]   File "/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/src/bootstrap/bootstrap.py", line 1195, in main
[ 3740s]     bootstrap(help_triggered)
[ 3740s]   File "/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/src/bootstrap/bootstrap.py", line 1181, in bootstrap
[ 3740s]     run(args, env=env, verbose=build.verbose)
[ 3740s]   File "/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/src/bootstrap/bootstrap.py", line 153, in run
[ 3740s]     raise RuntimeError(err)
[ 3740s] RuntimeError: failed to run: /home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/build/bootstrap/debug/bootstrap install
[ 3740s] error: Bad exit status from /var/tmp/rpm-tmp.1EnWWR (%install)
[ 3740s]
[ 3740s]
[ 3740s] RPM build errors:
[ 3740s]     Bad exit status from /var/tmp/rpm-tmp.1EnWWR (%install)
[ 3741s]
[ 3741s] susetest failed "build rust1.54.spec" at Wed Aug  4 09:31:49 UTC 2021.
[ 3741s]

I began to attempt to bisect this, and the following error was emitted, but I'm not 100% confident is valid/the same.

[ 5555s]    Compiling textwrap v0.11.0
[ 5555s]    Compiling miniz_oxide v0.4.0
[ 5556s]    Compiling lzma-sys v0.1.16
[ 5557s]    Compiling walkdir v2.3.1
[ 5562s]    Compiling num_cpus v1.13.0
[ 5564s]    Compiling xattr v0.2.2
[ 5566s]    Compiling filetime v0.2.12
[ 5567s]    Compiling atty v0.2.14
[ 5567s]    Compiling flate2 v1.0.16
[ 5568s]    Compiling tar v0.4.29
[ 5570s]    Compiling clap v2.33.3
[ 5575s]    Compiling crossbeam-queue v0.2.3
[ 5575s]    Compiling crossbeam-deque v0.7.3
[ 5586s]    Compiling xz2 v0.1.6
[ 5588s]    Compiling installer v0.0.0 (/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/src/tools/rust-installer)
[ 5624s]     Finished release [optimized + debuginfo] target(s) in 1m 15s
[ 5624s]       < ToolBuild { compiler: Compiler { stage: 0, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }, target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None }, tool: "fabricate", path: "
src/tools/rust-installer", mode: ToolBootstrap, is_optional_tool: false, source_type: Submodule, extra_features: [] }
[ 5624s]     < RustInstaller { compiler: Compiler { stage: 0, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }, target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }
[ 5624s]     c Assemble { target_compiler: Compiler { stage: 0, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } } }
[ 5624s] Dist rust-std-1.53.0-s390x-unknown-linux-gnu
[ 5624s] running: "/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/build/s390x-unknown-linux-gnu/stage0-tools-bin/fabricate" "generate" "--image-dir" "/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/build/tmp/tarball/rust-std/s390x-unknown-li
nux-gnu/image" "--component-name=rust-std-s390x-unknown-linux-gnu" "--rel-manifest-dir=rustlib" "--legacy-manifest-dirs=rustlib,cargo" "--product-name=Rust" "--success-message=rust-std installed." "--package-name=rust-std-1.53.0-s390x-u
nknown-linux-gnu" "--non-installed-overlay" "/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/build/tmp/tarball/rust-std/s390x-unknown-linux-gnu/overlay" "--output-dir" "/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/build/dist" "--work-dir"
"/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/build/tmp/tarball/rust-std/s390x-unknown-linux-gnu"
[ 5669s]        finished in 45.266 seconds
[ 5669s]   < Std { compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }, target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }
[ 5669s] Install std stage2 (Some(TargetSelection { triple: "s390x-unknown-linux-gnu", file: None }))
[ 5669s] running: "sh" "/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/build/tmp/tarball/rust-std/s390x-unknown-linux-gnu/rust-std-1.53.0-s390x-unknown-linux-gnu/install.sh" "--prefix=/home/abuild/rpmbuild/BUILDROOT/rust1.54-1.54.0-0.s390
x/usr" "--sysconfdir=/home/abuild/rpmbuild/BUILDROOT/rust1.54-1.54.0-0.s390x/etc" "--datadir=/home/abuild/rpmbuild/BUILDROOT/rust1.54-1.54.0-0.s390x/usr/share" "--docdir=/home/abuild/rpmbuild/BUILDROOT/rust1.54-1.54.0-0.s390x/usr/share/
doc/packages/rust" "--bindir=/home/abuild/rpmbuild/BUILDROOT/rust1.54-1.54.0-0.s390x/usr/bin" "--libdir=/home/abuild/rpmbuild/BUILDROOT/rust1.54-1.54.0-0.s390x/usr/lib" "--mandir=/home/abuild/rpmbuild/BUILDROOT/rust1.54-1.54.0-0.s390x/u
sr/share/man" "--disable-ldconfig"
[ 5669s] install: creating uninstall script at /home/abuild/rpmbuild/BUILDROOT/rust1.54-1.54.0-0.s390x/usr/lib/rustlib/uninstall.sh
[ 5669s] install: installing component 'rust-std-s390x-unknown-linux-gnu'
[ 5670s]
[ 5670s]     rust std installed.
[ 5670s]
[ 5670s] < Std { compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }, target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }
[ 5670s] c Assemble { target_compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } } }
[ 5670s] > Cargo { compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }, target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }
[ 5670s]   > Cargo { compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }, target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }
[ 5670s]     > Cargo { compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }, target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }
[ 5670s]       > ToolBuild { compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }, target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None }, tool: "cargo", path: "src/
tools/cargo", mode: ToolRustc, is_optional_tool: false, source_type: Submodule, extra_features: [] }
[ 5670s]         > Rustc { target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None }, compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } } }
[ 5670s]           c Std { target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None }, compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } } }
[ 5670s]           c Assemble { target_compiler: Compiler { stage: 1, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } } }
[ 5670s]           c Rustc { target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None }, compiler: Compiler { stage: 1, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } } }
[ 5670s] Uplifting stage1 rustc (s390x-unknown-linux-gnu -> s390x-unknown-linux-gnu)
[ 5670s]           > RustcLink { compiler: Compiler { stage: 1, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }, target_compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu",
file: None } }, target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }
[ 5670s] Copying stage2 rustc from stage1 (s390x-unknown-linux-gnu -> s390x-unknown-linux-gnu / s390x-unknown-linux-gnu)
[ 5670s]             c Libdir { compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }, target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }
[ 5670s]             c Libdir { compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }, target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }
[ 5670s]           < RustcLink { compiler: Compiler { stage: 1, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }, target_compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-li[287/1984]
file: None } }, target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }
[ 5670s]         < Rustc { target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None }, compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } } }
[ 5670s]         c Libdir { compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }, target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }
[ 5670s]         c Sysroot { compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } } }
[ 5670s]         c Sysroot { compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } } }
[ 5670s]         c Sysroot { compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } } }
[ 5670s]         c Sysroot { compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } } }
[ 5670s]         c Sysroot { compiler: Compiler { stage: 2, host: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } } }
[ 5670s]         c Llvm { target: TargetSelection { triple: "s390x-unknown-linux-gnu", file: None } }
[ 5670s] Building stage2 tool cargo (s390x-unknown-linux-gnu)
[ 5670s] running: "/home/abuild/rpmbuild/BUILD/rust-1.53.0-s390x-unknown-linux-gnu/usr/bin/cargo" "build" "--target" "s390x-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "4" "--release" "--frozen" "--manifest-path" "/home/abuild/rpmbui
ld/BUILD/rustc-1.54.0-src/src/tools/cargo/Cargo.toml" "--message-format" "json-render-diagnostics"
[ 5674s]    Compiling libc v0.2.93
[ 5674s]    Compiling pkg-config v0.3.18
[ 5674s]    Compiling cfg-if v0.1.10
[ 5674s]    Compiling autocfg v1.0.0
[ 5674s]    Compiling proc-macro2 v1.0.24
[ 5674s] Block containing LandingPadInst must be jumped to only by the unwind edge of an invoke.
[ 5674s]   %49 = landingpad { i8*, i32 }
[ 5674s]           cleanup
[ 5674s] Block containing LandingPadInst must be jumped to only by the unwind edge of an invoke.
[ 5674s]   %55 = landingpad { i8*, i32 }
[ 5674s]           cleanup
[ 5674s] in function _ZN4core6option15Option$LT$T$GT$16unwrap_unchecked17hcc8de8b985fdc671E
[ 5674s] LLVM ERROR: Broken function found, compilation aborted!
[ 5674s] error: could not compile `libc`
[ 5674s]
[ 5674s] To learn more, run the command again with --verbose.
[ 5674s] warning: build failed, waiting for other jobs to finish...
[ 5674s]
[ 5674s] Did not run successfully: exit status: 101
[ 5674s] "/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/build/s390x-unknown-linux-gnu/stage2/bin/rustc" "--crate-name" "build_script_build" "/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/vendor/libc/build.rs" "--error-format=json" "--json
=diagnostic-rendered-ansi" "--crate-type" "bin" "--emit=dep-info,link" "-C" "embed-bitcode=no" "-C" "debuginfo=1" "-C" "overflow-checks=off" "--cfg" "feature=\"align\"" "--cfg" "feature=\"default\"" "--cfg" "feature=\"std\"" "-C" "metad
ata=f5c33c3521b57984" "-C" "extra-filename=-f5c33c3521b57984" "--out-dir" "/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/build/s390x-unknown-linux-gnu/stage2-tools/release/build/libc-f5c33c3521b57984" "-L" "dependency=/home/abuild/rpmbui
ld/BUILD/rustc-1.54.0-src/build/s390x-unknown-linux-gnu/stage2-tools/release/deps" "--cap-lints" "allow" "-Z" "binary-dep-depinfo"
[ 5674s] -------------
[ 5674s] thread 'rustc' panicked at 'index out of bounds: the len is 4 but the index is 4', /home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/compiler/rustc_codegen_ssa/src/mir/block.rs:912:26
[ 5674s] note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[ 5674s]
[ 5674s] note: the compiler unexpectedly panicked. this is a bug.
[ 5674s]
[ 5674s] note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
[ 5674s]
[ 5674s] note: rustc 1.53.0 running on s390x-unknown-linux-gnu
[ 5674s]
[ 5674s] note: compiler flags: -Z binary-dep-depinfo -C embed-bitcode=no -C debuginfo=1 -C overflow-checks=off --crate-type lib
[ 5674s]
[ 5674s] note: some of the compiler flags provided by cargo are hidden
[ 5674s]
[ 5674s] query stack during panic:
[ 5674s] end of query stack
[ 5674s]
[ 5674s] Did not run successfully: exit status: 101
[ 5674s] "/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/build/s390x-unknown-linux-gnu/stage2/bin/rustc" "--crate-name" "autocfg" "/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/vendor/autocfg/src/lib.rs" "--error-format=json" "--json=diagn
ostic-rendered-ansi" "--crate-type" "lib" "--emit=dep-info,metadata,link" "-C" "embed-bitcode=no" "-C" "debuginfo=1" "-C" "overflow-checks=off" "-C" "metadata=1936551a06e81baf" "-C" "extra-filename=-1936551a06e81baf" "--out-dir" "/home/
abuild/rpmbuild/BUILD/rustc-1.54.0-src/build/s390x-unknown-linux-gnu/stage2-tools/release/deps" "-L" "dependency=/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/build/s390x-unknown-linux-gnu/stage2-tools/release/deps" "--cap-lints" "allow"
 "-Z" "binary-dep-depinfo"
[ 5674s] -------------
[ 5675s] Block containing LandingPadInst must be jumped to only by the unwind edge of an invoke.
[ 5675s]   %53 = landingpad { i8*, i32 }
[ 5675s]           cleanup
[ 5675s] Block containing LandingPadInst must be jumped to only by the unwind edge of an invoke.
[ 5675s]   %59 = landingpad { i8*, i32 }
[ 5675s]           cleanup
[ 5675s] Block containing LandingPadInst must be jumped to only by the unwind edge of an invoke.
[ 5675s]   %65 = landingpad { i8*, i32 }
[ 5675s]           cleanup
[ 5675s] Block containing LandingPadInst must be jumped to only by the unwind edge of an invoke.
[ 5675s]   %71 = landingpad { i8*, i32 }
[ 5675s]           cleanup
[ 5675s] Block containing LandingPadInst must be jumped to only by the unwind edge of an invoke.
[ 5675s]   %77 = landingpad { i8*, i32 }
[ 5675s]           cleanup
[ 5675s] in function _ZN4core3ptr238drop_in_place$LT$$u5b$alloc..boxed..Box$LT$dyn$u20$core..ops..function..FnMut$LT$$LP$$RP$$GT$$u2b$Output$u20$$u3d$$u20$core..result..Result$LT$$LP$$RP$$C$std..io..error..Error$GT$$u2b$core..marker..Se
nd$u2b$core..marker..Sync$GT$$u5d$$GT$17hf9402d0b68f9f76dE
[ 5675s] LLVM ERROR: Broken function found, compilation aborted!
[ 5675s]
[ 5675s] Did not run successfully: exit status: 101
[ 5675s] "/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/build/s390x-unknown-linux-gnu/stage2/bin/rustc" "--crate-name" "build_script_build" "--edition=2018" "/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/vendor/proc-macro2/build.rs" "--er
ror-format=json" "--json=diagnostic-rendered-ansi" "--crate-type" "bin" "--emit=dep-info,link" "-C" "embed-bitcode=no" "-C" "debuginfo=1" "-C" "overflow-checks=off" "--cfg" "feature=\"default\"" "--cfg" "feature=\"proc-macro\"" "-C" "me
tadata=eaae3be58961c787" "-C" "extra-filename=-eaae3be58961c787" "--out-dir" "/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/build/s390x-unknown-linux-gnu/stage2-tools/release/build/proc-macro2-eaae3be58961c787" "-L" "dependency=/home/abu
ild/rpmbuild/BUILD/rustc-1.54.0-src/build/s390x-unknown-linux-gnu/stage2-tools/release/deps" "--cap-lints" "allow" "-Z" "binary-dep-depinfo"
[ 5675s] -------------
[ 5675s] thread 'rustc' panicked at 'index out of bounds: the len is 3 but the index is 4', /home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/compiler/rustc_codegen_ssa/src/mir/block.rs:912:26
[ 5675s] note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[ 5675s]
[ 5675s] error: internal compiler error: unexpected panic
[ 5675s]
[ 5675s] note: the compiler unexpectedly panicked. this is a bug.
[ 5675s]
[ 5675s] note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
[ 5675s]
[ 5675s] note: rustc 1.53.0 running on s390x-unknown-linux-gnu
[ 5675s]
[ 5675s] note: compiler flags: -Z binary-dep-depinfo -C embed-bitcode=no -C debuginfo=1 -C overflow-checks=off --crate-type lib
[ 5675s]
[ 5675s] note: some of the compiler flags provided by cargo are hidden
[ 5675s]
[ 5675s] query stack during panic:
[ 5675s] end of query stack
[ 5675s]
[ 5675s] Did not run successfully: exit status: 101
[ 5675s] "/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/build/s390x-unknown-linux-gnu/stage2/bin/rustc" "--crate-name" "pkg_config" "/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/vendor/pkg-config/src/lib.rs" "--error-format=json" "--json
=diagnostic-rendered-ansi" "--crate-type" "lib" "--emit=dep-info,metadata,link" "-C" "embed-bitcode=no" "-C" "debuginfo=1" "-C" "overflow-checks=off" "-C" "metadata=e7ae293438cab965" "-C" "extra-filename=-e7ae293438cab965" "--out-dir" "
/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/build/s390x-unknown-linux-gnu/stage2-tools/release/deps" "-L" "dependency=/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/build/s390x-unknown-linux-gnu/stage2-tools/release/deps" "--cap-lints" "
allow" "-Z" "binary-dep-depinfo"
[ 5675s] -------------
[ 5675s] error: build failed
[ 5675s] command did not execute successfully: "/home/abuild/rpmbuild/BUILD/rust-1.53.0-s390x-unknown-linux-gnu/usr/bin/cargo" "build" "--target" "s390x-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "4" "--release" "--frozen" "--manife
st-path" "/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/src/tools/cargo/Cargo.toml" "--message-format" "json-render-diagnostics"
[ 5675s] expected success, got: exit status: 101
[ 5675s] Traceback (most recent call last):
[ 5675s]   File "./x.py", line 27, in <module>
[ 5675s]     bootstrap.main()
[ 5675s]   File "/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/src/bootstrap/bootstrap.py", line 1191, in main
[ 5675s]     bootstrap(help_triggered)
[ 5675s]   File "/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/src/bootstrap/bootstrap.py", line 1177, in bootstrap
[ 5675s]     run(args, env=env, verbose=build.verbose)
[ 5675s]   File "/home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/src/bootstrap/bootstrap.py", line 153, in run
[ 5675s]     raise RuntimeError(err)
[ 5675s] RuntimeError: failed to run: /home/abuild/rpmbuild/BUILD/rustc-1.54.0-src/build/bootstrap/debug/bootstrap install
[ 5675s] error: Bad exit status from /var/tmp/rpm-tmp.SlPqo2 (%install)
[ 5675s]
[ 5675s]
[ 5675s] RPM build errors:
[ 5675s]     Bad exit status from /var/tmp/rpm-tmp.SlPqo2 (%install)
[ 5695s]
[ 5695s] susetest failed "build rust1.54.spec" at Thu Aug  5 02:25:34 UTC 2021.
[ 5695s]

The buildroot was: /var/tmp/build-root/SLE-15-SP4_GA-s390x

@Firstyear Firstyear added the C-bug Category: This is a bug. label Aug 6, 2021
@inquisitivecrystal inquisitivecrystal added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. O-SystemZ Target: SystemZ processors (s390x) regression-from-stable-to-stable Performance or correctness regression from one stable version to another. labels Aug 6, 2021
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Aug 6, 2021
@inquisitivecrystal inquisitivecrystal added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Aug 6, 2021
@nikic
Copy link
Contributor

nikic commented Aug 7, 2021

@Firstyear
Copy link
Contributor Author

Indeed, I believe this is a duplicate of that issue. I will talk to the llvm people at suse about backporting those fixes to llvm 11. Thanks!

@JohnTitor JohnTitor removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-bug Category: This is a bug. O-SystemZ Target: SystemZ processors (s390x) regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants