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

Bug 632698

Summary: Building sys-devel/gcc-5.4.0-r3 with lto and pgo fails: lto1: internal compiler error: in lto_varpool_replace_node, at lto/lto-symtab.c:143
Product: Gentoo Linux Reporter: Vladimir Kolesnichenko <kvaathome>
Component: Current packagesAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED OBSOLETE    
Severity: normal CC: slyfox, tsmksubc
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 618550    
Attachments: build.log

Description Vladimir Kolesnichenko 2017-10-02 15:10:13 UTC
Created attachment 497420 [details]
build.log

Hello!

Thanks for the pgo flag.
However, if before gcc was going to lto (flag -flto in BOOT_CFLAGS, as described in the documentation for gcc), now it gives an error. The log is attached.
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2017-10-28 15:30:46 UTC
The failure is a gcc ICE:

> lto1: internal compiler error: in lto_varpool_replace_node, at lto/lto-symtab.c:143
> Please submit a full bug report, with preprocessed source if appropriate.
> See <https://bugs.gentoo.org/> for instructions.

Do newer gcc version work for you?
Comment 2 Vladimir Kolesnichenko 2017-10-30 09:25:50 UTC
Version in the repository has not changed - sys-devel/gcc-5.4.0-r3.
Again I got an error when assembling:
lto1: internal compiler error: in lto_varpool_replace_node, at lto/lto-symtab.c:143
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2017-10-30 09:28:19 UTC
(In reply to Vladimir Kolesnichenko from comment #2)
> Version in the repository has not changed - sys-devel/gcc-5.4.0-r3.
> Again I got an error when assembling:
> lto1: internal compiler error: in lto_varpool_replace_node, at
> lto/lto-symtab.c:143

My question was if you tried newer upstream gcc versions, namely
=sys-devel/gcc-6.4.0 or =sys-devel/gcc-7.2.0
Comment 4 Vladimir Kolesnichenko 2017-10-30 09:53:18 UTC
Version 6.4 in my build is indicated as "unstable". Version 7.2 is not available (Calculate linux).
I can unmask version 6.4 and check in the evening on my home computer. To do this, please indicate which versions of which packages should also be unmasked.
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2017-10-30 22:33:57 UTC
I suggest checking =sys-devel/gcc-6.4.0 (USE='lto pgo' did not fail fo r me at build time).
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2018-01-24 23:30:09 UTC
Assuming 6.4.0 (stable on amd64) works fine.