Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 665660

Summary: dev-lang/rust-1.25.0 build fails with RuntimeError: failed to run: /var/tmp/portage/dev-lang/rust-1.25.0/work/rust-stage0/bin/cargo build --manifest-path /var/tmp/portage/dev-lang/rust-1.25.0/work/rustc-1.25.0-src/src/bootstrap/Cargo.toml --verbose --verb
Product: Gentoo Linux Reporter: David W Noon <david.w.noon>
Component: Current packagesAssignee: Gentoo Rust Project <rust>
Status: RESOLVED FIXED    
Severity: normal CC: jstein
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/rust-lang/rust/issues/54740
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Build log
emerge --info output

Description David W Noon 2018-09-10 20:22:06 UTC
Created attachment 546562 [details]
Build log

This package has become a dependency of www-client/firefox but it fails during its ebuild, thus blocking an upgrade for firefox. The specific error message is:

RuntimeError: failed to run: /var/tmp/portage/dev-lang/rust-1.25.0/work/rust-stage0/bin/cargo build --manifest-path /var/tmp/portage/dev-lang/rust-1.25.0/work/rustc-1.25.0-src/src/bootstrap/Cargo.toml --verbose --verbose --locked --frozen

Log from the ebuild is attached. Output of emerge --info will follow shortly.
Comment 1 David W Noon 2018-09-10 20:23:10 UTC
Created attachment 546564 [details]
emerge --info output
Comment 2 Dirkjan Ochtman (RETIRED) gentoo-dev 2018-09-15 18:30:17 UTC
Can you try with rust-1.28.0-r1? You might need the workaround from https://bugs.gentoo.org/663690#c27.
Comment 3 David W Noon 2018-09-15 21:32:32 UTC
I tried with 1.28.0-r1 but it crashed the same way. Note that I had to change a use flag to -cargo.
Comment 4 David W Noon 2018-10-01 21:02:43 UTC
This problem persists with 1.29.1, wth the same binary of cargo causing the crash.

How was this binary built? If it was built on an AMD64 system using -m32 then it is likely that it could use SSE2 instructions; the only IA32 processor these instructions can run on is the Pentium 4. Since I am using an AMD Athlon MP system this would cause a trap 1. [Likewise on Pentium III, Pentium II, AMD K6 and earlier.]

Is it possible to build this binary using -march=i486? That will produce object code that will run on any IA32 processor currently supported by Linux.
Comment 5 Dirkjan Ochtman (RETIRED) gentoo-dev 2018-10-02 08:12:49 UTC
Ohh, that could make sense. I've filed an upstream bug.
Comment 6 Dirkjan Ochtman (RETIRED) gentoo-dev 2018-10-03 12:51:02 UTC
Okay, so, I think this makes sense. In terms of the Rust ebuilds currently, Gentoo's x86 arch translates to i686. For i586 and older, upstream does not provide rustc and cargo binaries, and so you'd have to cross-compile.
Comment 7 Larry the Git Cow gentoo-dev 2018-10-03 14:43:18 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da77475c0d4233c4d92283a5f0f2677a02387d77

commit da77475c0d4233c4d92283a5f0f2677a02387d77
Author:     Dirkjan Ochtman <djc@gentoo.org>
AuthorDate: 2018-10-03 14:38:18 +0000
Commit:     Dirkjan Ochtman <djc@gentoo.org>
CommitDate: 2018-10-03 14:42:08 +0000

    dev-lang/rust: add cpu_flags_x86_sse2 to REQUIRED_USE
    
    Closes: https://bugs.gentoo.org/665660
    Signed-off-by: Dirkjan Ochtman <djc@gentoo.org>
    Package-Manager: Portage-2.3.49, Repoman-2.3.10

 dev-lang/rust/rust-1.29.1.ebuild | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2f81c248ffdcfa111cad3fcfdf483be13ef9eeb

commit e2f81c248ffdcfa111cad3fcfdf483be13ef9eeb
Author:     Dirkjan Ochtman <djc@gentoo.org>
AuthorDate: 2018-10-03 14:41:56 +0000
Commit:     Dirkjan Ochtman <djc@gentoo.org>
CommitDate: 2018-10-03 14:42:08 +0000

    dev-lang/rust-bin: add cpu_flags_x86_sse2 to REQUIRED_USE
    
    Bug: https://bugs.gentoo.org/665660
    Signed-off-by: Dirkjan Ochtman <djc@gentoo.org>
    Package-Manager: Portage-2.3.49, Repoman-2.3.10

 dev-lang/rust-bin/rust-bin-1.29.1.ebuild | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)