Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 764590 - www-client/firefox-84.0.{1,2}: gcc+lto fails to compile
Summary: www-client/firefox-84.0.{1,2}: gcc+lto fails to compile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-09 12:09 UTC by Joonas Niilola
Modified: 2021-11-23 12:59 UTC (History)
2 users (show)

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


Attachments
firefox-84-gcc-lto.log (firefox-84-gcc-lto.log.xz,495.59 KB, application/x-xz)
2021-01-09 12:11 UTC, Joonas Niilola
Details
firefox-84.0.2-gcc-lto-build.log (firefox-84.0.2-gcc-lto-build.log.xz,467.13 KB, application/x-xz)
2021-01-09 13:11 UTC, Joonas Niilola
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joonas Niilola gentoo-dev 2021-01-09 12:09:23 UTC
gcc+lto fails to compile

gcc+pgo-lto works oddly enough.

clang+lto works.
Comment 1 Joonas Niilola gentoo-dev 2021-01-09 12:11:53 UTC
Created attachment 682084 [details]
firefox-84-gcc-lto.log
Comment 2 Joonas Niilola gentoo-dev 2021-01-09 12:19:07 UTC
NOCOLOR=true build.log coming later.
Comment 3 Larry the Git Cow gentoo-dev 2021-01-09 12:38:29 UTC
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(+)
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-01-09 12:53:08 UTC
(In reply to Joonas Niilola from comment #2)
> NOCOLOR=true build.log coming later.

ansifilter!
Comment 5 Joonas Niilola gentoo-dev 2021-01-09 13:11:40 UTC
Created attachment 682096 [details]
firefox-84.0.2-gcc-lto-build.log
Comment 6 Joonas Niilola gentoo-dev 2021-01-09 13:14:41 UTC
/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 :)
Comment 7 Joonas Niilola gentoo-dev 2021-01-09 13:16:26 UTC
(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.
Comment 8 Larry the Git Cow gentoo-dev 2021-01-09 14:04:06 UTC
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(-)
Comment 9 WGH 2021-08-01 13:34:50 UTC
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.
Comment 10 Joonas Niilola gentoo-dev 2021-08-01 15:37:28 UTC
(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.
Comment 11 WGH 2021-08-01 22:08:59 UTC
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
Comment 12 WGH 2021-08-01 22:32:05 UTC
Ah, yes, in my case, I use LTO and PGO.
Comment 13 Joonas Niilola gentoo-dev 2021-08-02 07:44:41 UTC
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.
Comment 14 WGH 2021-08-02 11:52:03 UTC
> 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.