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

Bug 917621

Summary: dev-lang/rust rustc exited with signal: 6 (SIGABRT)
Product: Gentoo Linux Reporter: Wade Cline <wadecline>
Component: Current packagesAssignee: Georgy Yakovlev <gyakovlev>
Status: RESOLVED TEST-REQUEST    
Severity: normal CC: rust
Priority: Normal    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info '=dev-lang/rust-1.71.1::gentoo'
emerge -pqv '=dev-lang/rust-1.71.1::gentoo'
/var/tmp/portage/dev-lang/rust-1.71.1/temp/environment
/var/tmp/portage/dev-lang/rust-1.71.1/temp/build.log

Description Wade Cline 2023-11-20 06:00:55 UTC
Created attachment 875230 [details]
emerge --info '=dev-lang/rust-1.71.1::gentoo'

I'm having a build error specifically on my x86 (32-bit) system and not on any x86_64 systems.  I don't know what's going wrong, but it seems to happen around here:

    [RUSTC-SHIM] rustc rustc_driver sysroot: "/var/tmp/portage/dev-lang/rust-1.71.1/work/rustc-1.71.1-src/build/i686-unknown-linux-gnu/stage1"
    [RUSTC-SHIM] rustc rustc_driver libdir: "/var/tmp/portage/dev-lang/rust-1.71.1/work/rustc-1.71.1-src/build/i686-unknown-linux-gnu/stage1/lib"
    fatal runtime error: Rust cannot catch foreign exceptions

    Did not run successfully: signal: 6 (SIGABRT)
    rustc exited with signal: 6 (SIGABRT)

I don't see any indication of OOM-killer activity.
Comment 1 Wade Cline 2023-11-20 06:01:26 UTC
Created attachment 875231 [details]
emerge -pqv '=dev-lang/rust-1.71.1::gentoo'
Comment 2 Wade Cline 2023-11-20 06:02:06 UTC
Created attachment 875232 [details]
/var/tmp/portage/dev-lang/rust-1.71.1/temp/environment
Comment 3 Wade Cline 2023-11-20 06:02:47 UTC
Created attachment 875233 [details]
/var/tmp/portage/dev-lang/rust-1.71.1/temp/build.log
Comment 4 acmondor 2023-11-27 19:31:44 UTC
I encountered the exact same issue and was able to get around it by removing the new dev-lang/rust 'lto' USE flag.
Comment 5 Georgy Yakovlev archtester gentoo-dev 2023-11-28 01:05:46 UTC
It’s still likely enomem from linker.
I haven’t dealt with x86 in years, so take my pae suggestion with grain of salt.

1) disable USE=lto for rust
2) use “-j 1”. You MUST have 2gb available per linker invocation to compile modern c++ or rust.
3) (not sure) enable PAE, my memory of x86 pae is very hazy, not sure if it will help. Likely not. So try 1. Or 2. Or combination of both.
Comment 6 Wade Cline 2023-12-04 05:37:20 UTC
1) disable USE=lto for rust
This worked.
2) use “-j 1”. You MUST have 2gb available per linker invocation to compile modern c++ or rust.
I've been doing this for a while.
3) (not sure) enable PAE, my memory of x86 pae is very hazy, not sure if it will help. Likely not. So try 1. Or 2. Or combination of both.
I did not try this.

Thanks for the help!
Comment 7 Georgy Yakovlev archtester gentoo-dev 2023-12-04 12:35:41 UTC
Nice, thanks for letting us know.
Btw, lto was always enabled by default on previous versions without the useflag, that’s why it’s enabled by default as a flag.