Reinstall gcc build faild. xg++: internal compiler error: Aborted signal terminated program lto1 Reproducible: Always
Created attachment 719346 [details] build_log
Created attachment 719349 [details] emerge --info
Created attachment 719352 [details] build_envirnoment
Looks like a gcc bug in code generation: """ corrupted size vs. prev_size during RTL pass: gcse2 /var/tmp/portage/sys-devel/gcc-11.1.0-r1/work/gcc-11.1.0/gcc/expmed.c: In function ‘extract_bit_field’: corrupted size vs. prev_size {standard input}: Assembler messages: {standard input}:32931: Warning: end of file not at end of a line; newline inserted {standard input}:33524: Error: no such instruction: `te' {standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive xg++: internal compiler error: Aborted signal terminated program lto1 Please submit a full bug report, with preprocessed source if appropriate. See <https://bugs.gentoo.org/> for instructions. make[4]: *** [/var/tmp/portage/sys-devel/gcc-11.1.0-r1/temp/ccRnWttJ.mk:182: /var/tmp/portage/sys-devel/gcc-11.1.0-r1/temp/cciVdW6y.ltrans60.ltrans.o] Error 4 make[4]: *** Waiting for unfinished jobs.... """ Does it reliably reproduce for you? If it does and you are blocked try changing your opt flags from CFLAGS="-march=znver2 -O3 -pipe" to something less aggressive, say: CFLAGS="-march=znver2 -O2 -pipe" I'll try to reproduce locally.
(In reply to Sergei Trofimovich from comment #4) > Looks like a gcc bug in code generation: > > """ > corrupted size vs. prev_size > during RTL pass: gcse2 > /var/tmp/portage/sys-devel/gcc-11.1.0-r1/work/gcc-11.1.0/gcc/expmed.c: In > function ‘extract_bit_field’: > corrupted size vs. prev_size > {standard input}: Assembler messages: > {standard input}:32931: Warning: end of file not at end of a line; newline > inserted > {standard input}:33524: Error: no such instruction: `te' > {standard input}: Error: open CFI at the end of file; missing .cfi_endproc > directive > xg++: internal compiler error: Aborted signal terminated program lto1 > Please submit a full bug report, > with preprocessed source if appropriate. > See <https://bugs.gentoo.org/> for instructions. > make[4]: *** [/var/tmp/portage/sys-devel/gcc-11.1.0-r1/temp/ccRnWttJ.mk:182: > /var/tmp/portage/sys-devel/gcc-11.1.0-r1/temp/cciVdW6y.ltrans60.ltrans.o] > Error 4 > make[4]: *** Waiting for unfinished jobs.... > """ > > Does it reliably reproduce for you? If it does and you are blocked try > changing your opt flags from > > CFLAGS="-march=znver2 -O3 -pipe" > > to something less aggressive, say: > > CFLAGS="-march=znver2 -O2 -pipe" > > I'll try to reproduce locally. Thanks, I will try it
(In reply to Sergei Trofimovich from comment #4) > Looks like a gcc bug in code generation: > > """ > corrupted size vs. prev_size > during RTL pass: gcse2 > /var/tmp/portage/sys-devel/gcc-11.1.0-r1/work/gcc-11.1.0/gcc/expmed.c: In > function ‘extract_bit_field’: > corrupted size vs. prev_size > {standard input}: Assembler messages: > {standard input}:32931: Warning: end of file not at end of a line; newline > inserted > {standard input}:33524: Error: no such instruction: `te' > {standard input}: Error: open CFI at the end of file; missing .cfi_endproc > directive > xg++: internal compiler error: Aborted signal terminated program lto1 > Please submit a full bug report, > with preprocessed source if appropriate. > See <https://bugs.gentoo.org/> for instructions. > make[4]: *** [/var/tmp/portage/sys-devel/gcc-11.1.0-r1/temp/ccRnWttJ.mk:182: > /var/tmp/portage/sys-devel/gcc-11.1.0-r1/temp/cciVdW6y.ltrans60.ltrans.o] > Error 4 > make[4]: *** Waiting for unfinished jobs.... > """ > > Does it reliably reproduce for you? If it does and you are blocked try > changing your opt flags from > > CFLAGS="-march=znver2 -O3 -pipe" > > I'll try to reproduce locally. I was not able to reproduce it on znver3 system in a chroot built with COMMON_FLAGS="-march=znver2 -O3 -pipe". Might be due to -j12 parallelism or some other environment issue. To narrow it down I suggest a few other attempts: 1. try with MAKEOPTS=-j1 2. try with a vanilla kernel instead of 5.12.13-xanmod1
This is one of those bugs which pops up somewhat often that looks a lot like "pre-OOM" failure or even OOM.