Bug 1701339
Summary: | rust-tokei: FTBFS in Fedora rawhide i686 (undefined reference) | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Josh Stone <jistone> |
Component: | rust | Assignee: | Josh Stone <jistone> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | high | Docs Contact: | |
Priority: | urgent | ||
Version: | rawhide | CC: | igor.raits, jistone, rust-sig, TicoTimo |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i686 | ||
OS: | Unspecified | ||
URL: | http://apps.fedoraproject.org/koschei/package/rust-tokei | ||
Whiteboard: | |||
Fixed In Version: | rust-1.34.1-2.fc31 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-04-29 16:06:28 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Josh Stone
2019-04-18 17:06:18 UTC
That last successful build used rust-1.33.0-2.fc31.i686 with llvm7.0-libs-7.0.1-4.fc31.i686. The failed build used rust-1.34.0-1.fc31.i686 with llvm-libs-8.0.0-5.fc31.i686. I can reproduce this locally with unpatched tokei sources, letting cargo download all dependencies, so that rules out a problem with our crate packaging. I successfully built it in F29 using rust-1.34.0-1.fc29.i686 and llvm-libs-7.0.1-4.fc29.i686. I also successfully built it with upstream rust-1.34.0, which has bundled LLVM 8. That was based on a release candidate of 8.0, but the current rust beta and nightly are based on LLVM 8.0.0 final, and they're also fine. Nothing in rust's LLVM patches look applicable to this, but there are a few places in rustc that change behavior when the bundled rustc is used. This one looks suspicious, and might need to be version-based instead: https://github.com/rust-lang/rust/blob/1.34.0/src/librustc_codegen_llvm/llvm_util.rs#L64-L73 > This one looks suspicious, and might need to be version-based instead: > https://github.com/rust-lang/rust/blob/1.34.0/src/librustc_codegen_llvm/llvm_util.rs#L64-L73 I've enabled that in the following PR, but it doesn't help this issue. https://github.com/rust-lang/rust/pull/60097 In fact, even a local build of upstream rust with its own LLVM still fails on this. I'm not sure what I'm doing differently than the official nightly builds... This affects ffsend as well, and I suppose, any other binaries built by Rust. It appears to be a problem with ThinLTO. I'll file an upstream bug with details as I investigate more. As a workaround, you can set "codegen-units = 1", either in the Cargo.toml "[profile.release]" section, or as "-Ccodegen-units=1" in env RUSTFLAGS or in .cargo/config "[build] rustflags". Note that rustflags are not combined -- env RUSTFLAGS is used first if present. FWIW, reducing codegen-units is often better for performance, at the expense of compilation time. Some crates already have this set in Cargo.toml, e.g. fd-find does. |