Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 709654 - >=www-client/firefox-72.0: building with USE=pgo and USE=-clang fails
Summary: >=www-client/firefox-72.0: building with USE=pgo and USE=-clang fails
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Mozilla Gentoo Team
URL: https://bugzilla.mozilla.org/show_bug...
Whiteboard:
Keywords:
: 709594 717432 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-02-14 20:17 UTC by darkstalker
Modified: 2020-10-10 20:46 UTC (History)
8 users (show)

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


Attachments
build log (ff73-lto-pgo-build.log.xz,517.57 KB, application/x-xz)
2020-02-14 20:17 UTC, darkstalker
Details
emerge --info (emerge_info.txt,6.60 KB, text/plain)
2020-02-14 20:17 UTC, darkstalker
Details
emerge --info (emerge-info.txt,17.14 KB, text/plain)
2020-02-15 08:01 UTC, Valentin V. Bartenev
Details
emerge --info (emerge_info.txt,5.71 KB, text/plain)
2020-02-16 23:05 UTC, Héctor Barreras
Details
build.log (build.log.bz2,550.54 KB, application/x-bzip)
2020-02-16 23:10 UTC, Héctor Barreras
Details
Fix broken patchset, readd missing llvm/lto patches (0001-www-client-firefox-Fix-broken-patch-set.patch,3.91 KB, patch)
2020-04-08 01:46 UTC, Jory A. Pratt
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description darkstalker 2020-02-14 20:17:18 UTC
Created attachment 613854 [details]
build log

Compiling firefox 73 with gcc and USE="lto pgo" fails. Using only lto works fine.
Comment 1 darkstalker 2020-02-14 20:17:45 UTC
Created attachment 613856 [details]
emerge --info
Comment 2 Andrew Udvare 2020-02-15 06:07:28 UTC
On my system Firefox 73 failed to build with +lto so I removed that and it built. So I don't think it's just "pgo lto". It's +lto alone although I know OP said it builds with lto alone.
Comment 3 Valentin V. Bartenev 2020-02-15 08:01:06 UTC
Created attachment 613902 [details]
emerge --info

I have the same problem.
Comment 4 Luigi 'Comio' Mantellini 2020-02-15 11:21:19 UTC
In order to compile use ld.gold adding -Wl,-fuse-ld=gold to LDFLAGS
Ciao

Luigi
Comment 5 Michael Weiser 2020-02-15 19:33:01 UTC
Can confirm the problem. Adding -Wl,-fuse-ld=gold to LDFLAGS did not help - build aborted with same error. Disabling pgo and lto did make it build.
Comment 6 CaptainBlood 2020-02-15 20:27:05 UTC
(In reply to Luigi 'Comio' Mantellini from comment #4)
> In order to compile use ld.gold adding -Wl,-fuse-ld=gold to LDFLAGS
> Ciao
> 
> Luigi

Didn't help neither.
Comment 7 Héctor Barreras 2020-02-16 23:05:12 UTC
Created attachment 614088 [details]
emerge --info

Can confirm same behavior. Attaching 'emerge --info'.
Comment 8 Héctor Barreras 2020-02-16 23:10:52 UTC
Created attachment 614090 [details]
build.log
Comment 9 Jory A. Pratt gentoo-dev 2020-02-16 23:58:19 UTC
the profile server is not generating any data, this is what the failure is trying to indicate. I will look at the issue, but as I have stated multiple times I do not use pgo so someone will have to test any possible fix I might find.
Comment 10 Armitage 2020-02-17 16:29:00 UTC
(In reply to Jory A. Pratt from comment #9)
> the profile server is not generating any data, this is what the failure is
> trying to indicate. I will look at the issue, but as I have stated multiple
> times I do not use pgo so someone will have to test any possible fix I might
> find.

I can also confirm the issue and I can also check any possible fix.
Comment 11 Larry the Git Cow gentoo-dev 2020-02-24 16:53:00 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3755724da101dd492d6a2a61083945ad92933666

commit 3755724da101dd492d6a2a61083945ad92933666
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2020-02-24 16:38:40 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2020-02-24 16:52:46 +0000

    profiles: p.use.mask >=www-client/firefox-72[pgo]
    
    USE=pgo is broken since firefox-72.
    
    Bug: https://bugs.gentoo.org/709594
    Bug: https://bugs.gentoo.org/709654
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 profiles/arch/amd64/package.use.mask              | 4 ++--
 profiles/arch/powerpc/ppc64/64le/package.use.mask | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
Comment 12 Ionen Wolkens gentoo-dev 2020-02-24 19:02:42 UTC
Wait, pgo is working perfectly fine for me, on both 72 and 73, but I'm using clang (which firefox tend to test a lot more given they use it for official binaries, I didn't try 73.0.1 yet though)

Is it really necessary to mask it for both or do I have to unmask it manually now?
Comment 13 Thomas Deutschmann (RETIRED) gentoo-dev 2020-02-24 20:54:56 UTC
Sorry, I didn't test with USE=clang.

I'll check what we can do here without forcing user interaction for users without USE=clang.
Comment 14 Ionen Wolkens gentoo-dev 2020-02-24 21:06:38 UTC
Yeah I understand. Given can't do that kind of conditional mask I imagine would need ebuild changes but then users would need to remove the pgo flag instead unless let it stay "enabled" and simply not get used (but that's misleading, so I don't know).

On another note, I can report that 73.0.1 built fine with clang+lto+pgo(unmasked)
Comment 15 GrudgeMaster 2020-02-24 21:52:18 UTC
That wasn't very nice at all. builds and runs just fine with lto/pgo/clang.
Comment 16 Larry the Git Cow gentoo-dev 2020-02-24 22:35:56 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0658199715254b723aefcdea8641ccde7d316a36

commit 0658199715254b723aefcdea8641ccde7d316a36
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2020-02-24 22:33:45 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2020-02-24 22:35:19 +0000

    profiles: Revert "profiles: p.use.mask >=www-client/firefox-72[pgo]"
    
    This reverts commit 3755724da101dd492d6a2a61083945ad92933666.
    
    p.use.mask was too strict because USE=pgo works when using USE=clang.
    
    Bug: https://bugs.gentoo.org/709594
    Bug: https://bugs.gentoo.org/709654
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 profiles/arch/amd64/package.use.mask              | 4 ++--
 profiles/arch/powerpc/ppc64/64le/package.use.mask | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5059bb531cc73e428042a83fe07191b2d98d40c4

commit 5059bb531cc73e428042a83fe07191b2d98d40c4
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2020-02-24 22:31:24 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2020-02-24 22:35:18 +0000

    www-client/firefox: block USE=pgo when USE=-clang
    
    USE=pgo is currently known to be broken when using GCC.
    
    Instead of silently ignoring USE=pgo when using GCC, we are
    forcing a user decision so user has the chance to enable USE=clang
    in case PGO is important for user without wasting 2+ hours
    commpiling firefox just to find out that PGO which was requested
    was ignored.
    
    Bug: https://bugs.gentoo.org/709594
    Bug: https://bugs.gentoo.org/709654
    Package-Manager: Portage-2.3.89, Repoman-2.3.20
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 www-client/firefox/firefox-73.0.1.ebuild | 8 ++++++++
 1 file changed, 8 insertions(+)
Comment 17 Thomas Deutschmann (RETIRED) gentoo-dev 2020-02-24 23:27:15 UTC
*** Bug 709594 has been marked as a duplicate of this bug. ***
Comment 18 CaptainBlood 2020-03-01 23:52:32 UTC
I don't understand this bug report as I have a firefox-72.0 binary package, working fine too, iirc.

 eix firefox -I
[I] www-client/firefox
     Installed versions:  73.0.1^td(21:04:52 27/02/2020)(clang custom-cflags jack lto pgo startup-notification system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-sqlite system-webp wayland -bindist -custom-optimization -debug -eme-free -geckodriver -gmp-autoupdate -hardened -hwaccel -pulseaudio -screenshot -selinux -test -wifi CPU_FLAGS_ARM="-neon" CPU_FLAGS_X86="avx2" L10N="fr -ach -af -an -ar -ast -az -be -bg -bn -br -bs -ca -cak -cs -cy -da -de -dsb -el -en-CA -en-GB -eo -es-AR -es-CL -es-ES -es-MX -et -eu -fa -ff -fi -fy -ga -gd -gl -gn -gu -he -hi -hr -hsb -hu -hy -ia -id -is -it -ja -ka -kab -kk -km -kn -ko -lij -lt -lv -mk -mr -ms -my -nb -nl -nn -oc -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv -ta -te -th -tr -uk -ur -uz -vi -xh -zh-CN -zh-TW")


emerge -p -K =firefox-72.0.2
These are the packages that would be merged, in reverse order:
Calculating dependencies  ...... done!
[binary     UD~] www-client/firefox-72.0.2 [73.0.1] USE="-clang*"
Comment 19 Jory A. Pratt gentoo-dev 2020-04-08 01:31:10 UTC
*** Bug 716576 has been marked as a duplicate of this bug. ***
Comment 20 Jory A. Pratt gentoo-dev 2020-04-08 01:46:45 UTC
Created attachment 631224 [details, diff]
Fix broken patchset, readd missing llvm/lto patches
Comment 21 Maciej S. Szmigiero 2020-04-14 01:10:31 UTC
(In reply to Jory A. Pratt from comment #20)
> Created attachment 631224 [details, diff] [details, diff]
> Fix broken patchset, readd missing llvm/lto patches

This seems to do the trick for making USE=lto,-pgo,-clang firefox build successfully, as long as one restores the two patches that Thomas has removed as part of an old version security cleanup 2 days ago.
Comment 22 Jory A. Pratt gentoo-dev 2020-04-14 15:50:10 UTC
*** Bug 717432 has been marked as a duplicate of this bug. ***
Comment 23 DaggyStyle 2020-04-15 09:29:36 UTC
syncned repo to 777a84c4c5cc4240b97ec11ce431ddf704f6c534, 75.0 builds well.