[Pkg-rust-maintainers] Bug#851150: src:rustc: FTBFS on s390x due to Illegal instruction

Ximin Luo infinity0 at debian.org
Thu Jan 12 13:09:23 UTC 2017


Package: src:rustc
Version: 1.14.0+dfsg1-3
Severity: important

Dear Maintainer,

The s390x build FTBFS due to Illegal instruction:

https://buildd.debian.org/status/fetch.php?pkg=rustc&arch=s390x&ver=1.14.0%2Bdfsg1-3&stamp=1484054421
https://buildd.debian.org/status/fetch.php?pkg=rustc&arch=s390x&ver=1.14.0%2Bdfsg1-3&stamp=1484054421&raw=1

[..]
CFG_LLVM_LINKAGE_FILE=/«BUILDDIR»/rustc-1.14.0+dfsg1/s390x-unknown-linux-gnu/rt/llvmdeps.rs LD_LIBRARY_PATH=/«BUILDDIR»/rustc-1.14.0+dfsg1/s390x-unknown-linux-gnu/stage0/lib:/usr/lib/llvm-3.9/lib:$LD_LIBRARY_PATH   s390x-unknown-linux-gnu/stage0/bin/rustc --cfg stage0 -C link-args=-Wl,-z,relro -O --cfg rtopt -Cdebuginfo=1 -C rpath -C prefer-dynamic -C no-stack-check --target=s390x-unknown-linux-gnu   -L "s390x-unknown-linux-gnu/rt" -L native="/usr/lib/llvm-3.9/lib"     --out-dir s390x-unknown-linux-gnu/stage0/lib/rustlib/s390x-unknown-linux-gnu/lib -C extra-filename=-f5a209a9 -C metadata=f5a209a9 src/libcore/lib.rs
Illegal instruction
/«BUILDDIR»/rustc-1.14.0+dfsg1/mk/target.mk:191: recipe for target 's390x-unknown-linux-gnu/stage0/lib/rustlib/s390x-unknown-linux-gnu/lib/stamp.core' failed
[..]

It was done by https://db.debian.org/machines.cgi?host=zemlinsky which is a z10 machine. This is claimed to be supported by rustc:

https://anonscm.debian.org/cgit/pkg-rust/rust.git/tree/src/librustc_back/target/s390x_unknown_linux_gnu.rs
https://github.com/rust-lang/rust/commits/1.14.0/src/librustc_back/target/s390x_unknown_linux_gnu.rs
https://github.com/rust-lang/rust/commits/master/src/librustc_back/target/s390x_unknown_linux_gnu.rs

There is a comment "// z10 is the oldest CPU supported by LLVM"

>From oldest to newest, the models go [z10, z196, zEC12, z13], e.g. see https://en.wikipedia.org/wiki/IBM_z196

<xnox> apoikos, ubuntu is z13.
<xnox> infinity0, i believe debian is z196 baseline (or maybe even lower)

It succeeded on ubuntu: https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/ppa/+build/11822485

(They are also ignoring test results, which we're not doing - but that is separate from this issue, which occurs before we run any tests.)

Since rustc (via llvm) does support z10 which is the Debian s390x baseline, this issue is slightly puzzling. One theory is:

<xnox> infinity0, whilst crc32 stuff may be implemented, it might not be enabled for the lpar|z/VM in question in cpu features and hence may not work.
<xnox> e.g. it could be our s390x instance config option too =/
<xnox> infinity0, can the asm crc32 optimisations be disabled for s390x in that third-party code?
<infinity0> not sure. *if* it is possible, it would be an llvm target config option

X

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (300, 'unstable'), (200, 'experimental'), (1, 'experimental-debug')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.8.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)



More information about the Pkg-rust-maintainers mailing list