Created attachment 772202 [details] emerge --info + build.log, bzipped. I'm trying to compile firefox with only gcc and it fails. The build.log doesn't really gives me a clue, why. I was also told on IRC it should go there. Build log and emerge --info output attached.
8:12.95 In file included from Unified_cpp_dom_base10.cpp:74: 8:12.95 /var/tmp/portage/www-client/firefox-99.0.1/work/firefox-99.0.1/dom/base/nsTreeSanitizer.cpp:635:20: error: non-constant condition for static assertion 8:12.95 635 | static_assert(AllOf(std::begin(kURLAttributesSVG), std::end(kURLAttributesSVG), 8:12.95 | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 8:12.95 636 | [](auto aURLAttributeSVG) { 8:12.95 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 8:12.96 637 | return AnyOf(std::begin(kAttributesSVG), 8:12.96 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 8:12.96 638 | std::end(kAttributesSVG), 8:12.96 | ~~~~~~~~~~~~~~~~~~~~~~~~~ 8:12.96 639 | [&](auto aAttributeSVG) { 8:12.96 | ~~~~~~~~~~~~~~~~~~~~~~~~~ 8:12.96 640 | return aAttributeSVG == aURLAttributeSVG; 8:12.96 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 8:12.97 641 | }); 8:12.97 | ~~~ 8:12.97 642 | })); 8:12.97 | ~~ 8:12.97 /var/tmp/portage/www-client/firefox-99.0.1/work/firefox-99.0.1/dom/base/nsTreeSanitizer.cpp:635:20: in 'constexpr' expansion of 'mozilla::AllOf<const nsStaticAtom* const*, <lambda(auto:30)> >(std::begin<const nsStaticAtom* const, 2>(kURLAttributesSVG), std::end<const nsStaticAtom* const, 2>(kURLAttributesSVG), (<lambda closure object><lambda(auto:30)>{}, <lambda(auto:30)>()))' 8:12.97 /var/tmp/portage/www-client/firefox-99.0.1/work/firefox_build/dist/include/mozilla/Algorithm.h:24:15: in 'constexpr' expansion of 'aPred.<lambda(auto:30)>(((const nsStaticAtom*)(* aFirst)))' 8:12.97 /var/tmp/portage/www-client/firefox-99.0.1/work/firefox-99.0.1/dom/base/nsTreeSanitizer.cpp:637:35: in 'constexpr' expansion of 'mozilla::AnyOf<const nsStaticAtom* const*, <lambda(auto:30)>::<lambda(auto:31)> >(std::begin<const nsStaticAtom* const, 182>(kAttributesSVG), std::end<const nsStaticAtom* const, 182>(kAttributesSVG), <lambda closure object><lambda(auto:30)>::<lambda(auto:31)>{aURLAttributeSVG})' 8:12.97 /var/tmp/portage/www-client/firefox-99.0.1/work/firefox-99.0.1/dom/base/nsTreeSanitizer.cpp:640:59: error: '((& mozilla::detail::gGkAtoms.mozilla::detail::GkAtoms::mAtoms[1553]) == 0)' is not a constant expression 8:12.98 640 | return aAttributeSVG == aURLAttributeSVG; 8:12.98 | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
>CFLAGS="-march=native -O2 -pipe -fno-delete-null-pointer-checks -fno-lifetime-dse" Out of interest, and I don't think it should make a difference, what happens if you drop the latter two flags?
I see it mentioned at https://www.linuxquestions.org/questions/slackware-14/firefox-85-on-current-fails-build-4175690931/.
I can't really pinpoint the exact error either. Try again, then try with clean CFLAGs, then with -system-libvpx and/or -system-av1 as they're often causing some troubles etc. You seem to have these rather uncommon flags system-wide so I imagine some dependency might be acting weirdly.
(In reply to Sam James from comment #2) > >CFLAGS="-march=native -O2 -pipe -fno-delete-null-pointer-checks -fno-lifetime-dse" > > Out of interest, and I don't think it should make a difference, what happens > if you drop the latter two flags? I've did it and it still failing, but with different error. I can't post a link, I will try to attach new build.log.
(In reply to Joonas Niilola from comment #4) > I can't really pinpoint the exact error either. Try again, then try with > clean CFLAGs, then with -system-libvpx and/or -system-av1 as they're often > causing some troubles etc. Exact error is in my paste (took a while to find) but not sure why it's only happening for them.
Created attachment 772628 [details] build.log without -fno-delete-null-pointer-checks -fno-lifetime-dse flags
(In reply to Sam James from comment #6) > (In reply to Joonas Niilola from comment #4) > > I can't really pinpoint the exact error either. Try again, then try with > > clean CFLAGs, then with -system-libvpx and/or -system-av1 as they're often > > causing some troubles etc. > > Exact error is in my paste (took a while to find) but not sure why it's only > happening for them. I mean yes I found the error but I can't say exactly what's causing it :) sometimes it's clear (often not though) (In reply to Bartek Stalewski from comment #7) > Created attachment 772628 [details] > build.log without -fno-delete-null-pointer-checks -fno-lifetime-dse flags 12:44.21 x86_64-pc-linux-gnu-g++: fatal error: Killed signal terminated program cc1plus 12:44.21 compilation terminated. This most often means you're running out of memory, or other kind of hardware issues. Check your system log (dmesg, journalctl, /var/log/messages) Try lowering your MAKEOPTS to first 6, then maybe 4 if it still fails?
> 12:44.21 x86_64-pc-linux-gnu-g++: fatal error: Killed signal terminated > program cc1plus > 12:44.21 compilation terminated. > > This most often means you're running out of memory, or other kind of > hardware issues. Check your system log (dmesg, journalctl, /var/log/messages) > > Try lowering your MAKEOPTS to first 6, then maybe 4 if it still fails? I don't know how I missed OOM... ;-) Running with -j6 now, we will see.
I was able to build with USE="-clang" when I deleted '-fno-delete-null-pointer-checks -fno-lifetime-dse' from my CFLAGS. So, was this my fault all the time and this bug should be closed as invalid? ;-)
Well maybe we could guard against flags known to break the compilation, but... that's gonna be an endless cycle. Thanks for the update though! FYI I used to build firefox with pretty wild CFLAGS but of course it broke down each release so just sticking with the "vanilla" flags for now. $ cat /etc/portage/env/firefox.conf CFLAGS="-march=native -O3 -pipe -fno-sized-deallocation -fno-aligned-new -fno-strict-aliasing -fPIC -fno-math-errno -fno-exceptions" $ cat /etc/portage/env/firefox2.conf # these don't work with clang/lld: # -fdata-sec (configure doesn't recognize it), # -Wl,- plugin-opt=-import-instr-limit=10 (dies in linking phase). CFLAGS="-march=native -O3 -pipe -flto=thin -fexperimental-new-pass-manager -Wl,--gc-sections -Wl,-plugin-opt=new-pass-manager -Wl,-plugin-opt=-import-hot-multiplier=30 -ffunction-sections" #CFLAGS="-march=native -O3 -pipe -fno-sized-deallocation -fno-aligned-new -fno-strict-aliasing -fPIC -fno-math-errno -fno-exceptions"