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

Bug 798780

Summary: sys-devel/gcc-11.1.0-r1: ICE compiling llvm12 in rust-1.53.0 - tools/llvm-objcopy/CMakeFiles/llvm-objcopy.dir/wasm/WasmObjcopy.cpp.o
Product: Gentoo Linux Reporter: HougeLangley <hougelangley1987>
Component: Current packagesAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED WORKSFORME    
Severity: normal CC: herrtimson, rust, sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info
build_log
build_envirnoment
emerge --info
build_log
build_envirnoment

Description HougeLangley 2021-06-26 12:01:22 UTC
Reinstall rust building failed

FAILED: tools/llvm-objcopy/CMakeFiles/llvm-objcopy.dir/wasm/WasmObjcopy.cpp.o

Reproducible: Always
Comment 1 HougeLangley 2021-06-26 12:01:40 UTC
Created attachment 719403 [details]
emerge --info
Comment 2 HougeLangley 2021-06-26 12:01:56 UTC
Created attachment 719406 [details]
build_log
Comment 3 HougeLangley 2021-06-26 12:02:12 UTC
Created attachment 719409 [details]
build_envirnoment
Comment 4 Georgy Yakovlev archtester gentoo-dev 2021-06-27 06:21:59 UTC
does it segfault at random bits of code or the same one every time?
what about llvm:12, does it fail at same files with wasm target enabled?


try with -O2 instead of -O3 btw.
Comment 5 Georgy Yakovlev archtester gentoo-dev 2021-06-27 06:23:32 UTC
actually, it does not really need wasm target enabled. just llvm:12 is ok.
Comment 6 Georgy Yakovlev archtester gentoo-dev 2021-06-27 06:26:04 UTC
and it's not really a bug in rust, it's a segfault in gcc while compiling llvm.
re-assigning to toolchain, leaving rust in CC.
Comment 7 HougeLangley 2021-06-27 13:07:23 UTC
I reinstall my Gentoo System, but, still failed
Comment 8 HougeLangley 2021-06-27 13:07:43 UTC
Created attachment 719568 [details]
emerge --info
Comment 9 HougeLangley 2021-06-27 13:08:00 UTC
Created attachment 719571 [details]
build_log
Comment 10 HougeLangley 2021-06-27 13:08:10 UTC
Created attachment 719574 [details]
build_envirnoment
Comment 11 HougeLangley 2021-06-27 13:08:34 UTC
This time I using -O2
Comment 12 HougeLangley 2021-06-27 16:47:15 UTC
I changed LLVM_TARGETS in my make.conf. Origion is LLVM_TARGETS="X86 AMDGPU". Now, it's LLVM_TARGETS="X86"

rust, llvm building successed.
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-06-27 16:56:54 UTC
(In reply to HougeLangley from comment #12)
> I changed LLVM_TARGETS in my make.conf. Origion is LLVM_TARGETS="X86
> AMDGPU". Now, it's LLVM_TARGETS="X86"
> 
> rust, llvm building successed.

That doesn't mean the ICE is fixed though.
Comment 14 Georgy Yakovlev archtester gentoo-dev 2021-06-28 08:51:28 UTC
in the second log it failed at a different file.

this usually means hardware problem, not a compiler bug.

check your RAM with memtest, if you overclocked CPU or/and RAM - try to lower it a bit.

you will keep seeing random ICEs if you don't down-clock system or find faulty RAM.