gcc+lto fails to compile gcc+pgo-lto works oddly enough. clang+lto works.
Created attachment 682084 [details] firefox-84-gcc-lto.log
NOCOLOR=true build.log coming later.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=702a672379acb4a1202015ccce32f6b798dd963f commit 702a672379acb4a1202015ccce32f6b798dd963f Author: Joonas Niilola <juippis@gentoo.org> AuthorDate: 2021-01-09 12:35:42 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2021-01-09 12:35:42 +0000 www-client/firefox: (security) bump to 84.0.2 Bug: https://bugs.gentoo.org/764161 Bug: https://bugs.gentoo.org/764590 Signed-off-by: Joonas Niilola <juippis@gentoo.org> www-client/firefox/Manifest | 97 +++ www-client/firefox/firefox-84.0.2.ebuild | 1130 ++++++++++++++++++++++++++++++ 2 files changed, 1227 insertions(+)
(In reply to Joonas Niilola from comment #2) > NOCOLOR=true build.log coming later. ansifilter!
Created attachment 682096 [details] firefox-84.0.2-gcc-lto-build.log
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld.gold: internal error in set_xindex, at /var/tmp/portage/sys-devel/binutils-2.34-r2/work/binutils-2.34/gold/object.h:1007 Made me think the problem is in binutils. The same error happens with binutils-2.35.1-r1, but I had to try downgrading first.(In reply to Sam James from comment #4) > (In reply to Joonas Niilola from comment #2) > > NOCOLOR=true build.log coming later. > > ansifilter! Heh, indeed :)
(In reply to Joonas Niilola from comment #6) > Made me think the problem is in binutils. The same error happens with > binutils-2.35.1-r1, but I had to try downgrading first. And to be precise, in the gold linker of binutils. Sorry for the spam.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3feb74e8603c7cfaed061271809d4df23fd35579 commit 3feb74e8603c7cfaed061271809d4df23fd35579 Author: Joonas Niilola <juippis@gentoo.org> AuthorDate: 2021-01-09 14:02:55 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2021-01-09 14:03:48 +0000 www-client/firefox: force bfd linker for gcc+lto on 84.0.2 Closes: https://bugs.gentoo.org/764590 Signed-off-by: Joonas Niilola <juippis@gentoo.org> www-client/firefox/firefox-84.0.2.ebuild | 10 ---------- 1 file changed, 10 deletions(-)
I'm having the same problem upgrading from 78.11.0:0/esr78 to 78.12.0:0/esr78. I don't think I changed any configuration: currently emerged Firefox is also built with lto.
(In reply to WGH from comment #9) > I'm having the same problem upgrading from 78.11.0:0/esr78 to > 78.12.0:0/esr78. > > I don't think I changed any configuration: currently emerged Firefox is also > built with lto. Would you have build.log available? I can test this earliest tomorrow. Make sure you have enough RAM too, lto takes a lot.
I have 128GB of RAM ;) The build log is too big to be attached here, even compressed, so https://chireiden.torlan.ru/bgo-764590-firefox-78.12.0-build.log.xz
Ah, yes, in my case, I use LTO and PGO.
Indeed yours seems to die at linking phase. I just tested gcc+lto+pgo on stable amd64 profile, with your USE flags. It compiled fine. It all goes back to https://bugzilla.mozilla.org/show_bug.cgi?id=1692512 One thing, is your whole system lto-enabled? Like, do you have gcc[lto]? AFAIK last time I tested bfd on 78, it didn't work. The change was made later upstream. You might have to enable clang+lto before 91 ESR hits, the binutils-gold is just so buggy.
> One thing, is your whole system lto-enabled? Like, do you have gcc[lto]? I have a handful of packages with lto enabled through CFLAGS/CXXFLAGS/LDFLAGS. gcc is not one of them, and lto USE flag is not enabled for gcc either.