Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 853142 - www-client/firefox-101.0.1-r11 compile fails since firefox-101.0 with GCC and clang
Summary: www-client/firefox-101.0.1-r11 compile fails since firefox-101.0 with GCC and...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
Depends on:
Blocks: systemwide-libcxx
  Show dependency tree
Reported: 2022-06-20 08:40 UTC by b2c
Modified: 2022-06-20 19:32 UTC (History)
1 user (show)

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

emerge --info (emerge_info.txt,7.92 KB, text/plain)
2022-06-20 08:43 UTC, b2c
firefox-101.0.1-r11_clang-14.0.4.log.xz (firefox-101.0.1-r11_clang-14.0.4.log.xz,267.85 KB, application/x-xz)
2022-06-20 12:13 UTC, Ionen Wolkens
firefox-101.0.1-r11_gcc-11.3.0.log.xz (firefox-101.0.1-r11_gcc-11.3.0.log.xz,484.22 KB, application/x-xz)
2022-06-20 12:14 UTC, Ionen Wolkens

Note You need to log in before you can comment on or make changes to this bug.
Description b2c 2022-06-20 08:40:43 UTC

I'm running into weird compile errors for firefox-101.0.x.

I used to compile it with clang, which fails after a couple minutes into the build after successfully building the "swgl" component. I can't really see the root cause there.

If I switch the build to gcc it continues much longer, but fails when linking "":

firefox undefined reference to mozgtk_linker_holder

The only reference to "mozgtk_linker_holder" I could find is a commit on Mozillas HG repository [1].

Build logs and emerge --info  are attached.

~# emerge -pqv '=www-client/firefox-101.0.1-r11::gentoo'

[ebuild     U ] www-client/firefox-101.0.1-r11 [101.0] USE="X%* clang dbus geckodriver gmp-autoupdate hardened hwaccel lto openh264 pulseaudio system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-webp wayland -debug -eme-free -jack -libproxy -pgo -screencast (-selinux) -sndio -system-png (-system-python-libs) -wifi" L10N="de en-GB -ach -af -an -ar -ast -az -be -bg -bn -br -bs -ca -ca-valencia -cak -cs -cy -da -dsb -el -en-CA -eo -es-AR -es-CL -es-ES -es-MX -et -eu -fa -ff -fi -fr -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 -ne -nl -nn -oc -pa -pl -pt-BR -pt-PT -rm -ro -ru -sco -si -sk -sl -son -sq -sr -sv -szl -ta -te -th -tl -tr -trs -uk -ur -uz -vi -xh -zh-CN -zh-TW"


Thanks as always for your support!
Best regards,
Comment 1 b2c 2022-06-20 08:43:06 UTC
Created attachment 786395 [details]
emerge --info
Comment 2 b2c 2022-06-20 08:48:29 UTC
Logs were too big to upload here, I pushed them to

Comment 3 Ionen Wolkens gentoo-dev 2022-06-20 12:13:19 UTC
Created attachment 786434 [details]

(In reply to b2c from comment #2)
> Logs were too big to upload here, I pushed them to
Bugzilla accepts up to 1MB, and these are below that when compressed, I'll go ahead and put them here (with .xz to be yet smaller).
Comment 4 Ionen Wolkens gentoo-dev 2022-06-20 12:14:16 UTC
Created attachment 786437 [details]
Comment 5 b2c 2022-06-20 12:24:05 UTC
Thanks - I got an internal server error when I tried to upload, I assumed it was due to filesize/type.
Comment 6 Ionen Wolkens gentoo-dev 2022-06-20 12:27:11 UTC
(In reply to b2c from comment #5)
> Thanks - I got an internal server error when I tried to upload, I assumed it
> was due to filesize/type.
Unsure if was the case, but that commonly happens when the browser doesn't have read permission to the log file and ends up sending garbage data instead that confuses bugzilla (I blame browsers' error handling here, not users).
Comment 7 Ionen Wolkens gentoo-dev 2022-06-20 12:41:32 UTC
That aside, sounds(?) related to the new making-X-optional stuff but haven't really checked (mozilla@ may know better).

Have you tried =firefox-101.0.1 (aka without -rX)?
Comment 8 b2c 2022-06-20 13:27:39 UTC
Ok, just tried to build =www-client/firefox-101.0.1:
 - clang: still fails
 - gcc: build works

firefox 101.0.1-r10 and 101.0.1-r11 fail for me with both compilers.
Comment 9 Joonas Niilola gentoo-dev 2022-06-20 13:32:00 UTC
I don't see it in your emerge --info but... are you using libcxx with clang? Firefox is known not to build with that.

Please show 'emerge -pv --nodeps clang libcxx'
Comment 10 b2c 2022-06-20 13:45:23 UTC
Here you go:

~ # emerge -pv --nodeps clang libcxx                                                                                                                  
These are the packages that would be merged, in order:

[ebuild   R    ] sys-devel/clang-14.0.4:14::gentoo  USE="default-compiler-rt default-libcxx default-lld (pie) static-analyzer xml -debug -doc -llvm-libunwind -test" ABI_X86="32 (64) (-x32)" LLVM_TARGETS="(AArch64) (AMDGPU) (ARM) (AVR) (BPF) (Hexagon) (Lanai) (MSP430) (Mips) (NVPTX) (PowerPC) (RISCV) (Sparc) (SystemZ) (VE) (WebAssembly) (X86) (XCore) (-ARC) (-CSKY) (-M68k)" PYTHON_SINGLE_TARGET="python3_9 -python3_8 -python3_10" 0 KiB

[ebuild   R    ] sys-libs/libcxx-14.0.4::gentoo  USE="(libcxxabi) libunwind -static-libs -test" ABI_X86="32 (64) (-x32)" 0 KiB
Comment 11 Joonas Niilola gentoo-dev 2022-06-20 14:01:56 UTC
Yeah. Some llvm/clang update broke libcxx in firefox (13->14 I guess?) and it _should_ already be fixed in upstream,
but apparently this hasn't made to 14.x.x release yet. And no idea if it will make it, or only for 15.

Please do try this patch,
(just use /etc/portage/patches) if the latest llvm-14.0.4 would already work for you. This patch introduces new kinds of errors so I'm not too hopeful.

If upstream hasn't, and won't, backport the fix into 14xx, we may have to wait for 15.
Comment 12 b2c 2022-06-20 14:50:28 UTC
Wow, thanks for this, it actually worked - I just compiled www-client/firefox-101.0.1-r11 and it works fine!
Comment 13 Larry the Git Cow gentoo-dev 2022-06-20 19:32:38 UTC
The bug has been closed via the following commit(s):

commit b7eabfefdf3e45a2d47c90df65e9d5973009077c
Author:     Joonas Niilola <>
AuthorDate: 2022-06-20 19:29:34 +0000
Commit:     Joonas Niilola <>
CommitDate: 2022-06-20 19:32:35 +0000

    www-client/firefox: attempt to fix libc++ issue on 101.0.1
     - probably doesn't solve all issues with libc++ and clang-14, but at
       least some!
    Signed-off-by: Joonas Niilola <>

 www-client/firefox/Manifest                   | 2 +-
 www-client/firefox/firefox-101.0.1-r11.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)