Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 902021 - sys-devel/gcc-12.2.1 fails to compile: Bad register name
Summary: sys-devel/gcc-12.2.1 fails to compile: Bad register name
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-18 10:22 UTC by Matthias Hanft
Modified: 2023-03-23 18:46 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (info,6.64 KB, text/plain)
2023-03-18 10:22 UTC, Matthias Hanft
Details
build.log (gzip) (build.log.gz,135.19 KB, application/octet-stream)
2023-03-18 10:24 UTC, Matthias Hanft
Details
emerge -pqv output (x,396 bytes, text/plain)
2023-03-18 10:26 UTC, Matthias Hanft
Details
ebuild environment (env,136.27 KB, text/plain)
2023-03-18 10:27 UTC, Matthias Hanft
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Hanft 2023-03-18 10:22:58 UTC
Created attachment 858223 [details]
emerge --info

On a x86 system, upgrading gcc from 11 to 12 fails:

{standard input}: Assembler messages:
{standard input}:1385952: Warning: end of file not at end of a line; newline inserted
{standard input}:1386553: Error: bad register name `%ea'
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
xg++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[3]: *** [Makefile:1145: insn-emit.o] Error 1
make[3]: Leaving directory '/var/tmp/portage/sys-devel/gcc-12.2.1_p20230121-r1/work/build/gcc'
make[3]: *** Waiting for unfinished jobs....

I found bug 35043 where the lack of memory was the reason for a similar problem. My system has 1 GB memory and 2 GB swap - is it enough?
Comment 1 Matthias Hanft 2023-03-18 10:24:57 UTC
Created attachment 858225 [details]
build.log (gzip)
Comment 2 Matthias Hanft 2023-03-18 10:26:39 UTC
Created attachment 858227 [details]
emerge -pqv output
Comment 3 Matthias Hanft 2023-03-18 10:27:10 UTC
Created attachment 858229 [details]
ebuild environment
Comment 4 Matt Turner gentoo-dev 2023-03-18 23:45:56 UTC
I'd take a look at dmesg and see if there are out-of-memory errors.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-18 23:51:17 UTC
You can try dropping -pipe from *FLAGS and also consider adding -Wl,--no-keep-memory to LDFLAGS.
Comment 6 Matthias Hanft 2023-03-19 19:02:47 UTC
dmesg had said:
[26614583.403484] Out of memory: Kill process 2097 (cc1plus) score 351 or sacrifice child
[26614583.403487] Killed process 2097 (cc1plus) total-vm:1128988kB, anon-rss:483704kB, file-rss:2184kB, shmem-rss:0kB

Removing -pipe finally did the job.

Thanks a lot!

(Wish for the future: A portage error message similar to "Not enough memory" instead of "Bad register name %ea" - then I would have got it).