LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Firefox 85+ on -current fails build (https://www.linuxquestions.org/questions/slackware-14/firefox-85-on-current-fails-build-4175690931/)

rpedrica 02-22-2021 02:10 AM

Firefox 85+ on -current fails build
 
My current slackbuild script no longer works for 85+ - compile fails at:

Quote:

15:47.05 Compiling webrender v0.61.0 (/tmp/firefox-85.0.2/gfx/wr/webrender)
16:01.10 Compiling webrender_bindings v0.1.0 (/tmp/firefox-85.0.2/gfx/webrender_bindings)
18:51.60 Compiling gkrust v0.1.0 (/tmp/firefox-85.0.2/toolkit/library/rust)
18:52.38 Finished release [optimized] target(s) in 17m 46s
18:52.60 gmake[2]: *** [/tmp/firefox-85.0.2/config/recurse.mk:34: compile] Error 2
18:52.60 gmake[1]: *** [/tmp/firefox-85.0.2/config/rules.mk:355: default] Error 2
18:52.60 gmake: *** [client.mk:89: build] Error 2
18:52.62 0 compiler warnings present.
18:52.98 Failed to parse ccache stats output: secondary config (readonly) /etc/ccache.conf
18:52.98 /usr/bin/notify-send --app-name=Mozilla Build System Mozilla Build System Build failed
Anyone have adjustments to slackbuild or patches to assist with this release? My most recent successful build is 84.0.2 - the last slackbuild patch at that time was:

Quote:

# https://bugzilla.mozilla.org/show_bug.cgi?id=1640982
sed -i "s|-Clto$||" config/makefiles/rust.mk
... for a rust-related issue.

(my system is -current 64bit updated to just before the recent mega rebuild)

Thanks in advance.

ponce 02-22-2021 04:38 AM

if you try to build the new version with gcc you may encounter these errors
Code:

3:05.08 In file included from Unified_cpp_dom_base10.cpp:20:
 3:05.08 /tmp/firefox-86.0/dom/base/nsTreeSanitizer.cpp:623:20: error: non-constant condition for static assertion
 3:05.08  623 | static_assert(AllOf(std::begin(kURLAttributesSVG), std::end(kURLAttributesSVG),
 3:05.08      |              ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 3:05.08  624 |                    [](auto aURLAttributeSVG) {
 3:05.08      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 3:05.08  625 |                      return AnyOf(std::begin(kAttributesSVG),
 3:05.08      |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 3:05.08  626 |                                    std::end(kAttributesSVG),
 3:05.08      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~
 3:05.08  627 |                                    [&](auto aAttributeSVG) {
 3:05.08      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~
 3:05.08  628 |                                      return aAttributeSVG == aURLAttributeSVG;
 3:05.09      |                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 3:05.09  629 |                                    });
 3:05.09      |                                    ~~~
 3:05.09  630 |                    }));
 3:05.09      |                    ~~
 3:05.09 /tmp/firefox-86.0/dom/base/nsTreeSanitizer.cpp:623:20:  in ‘constexpr’ expansion of ‘mozilla::AllOf<const nsStaticAtom* const*, <lambda(auto:13)> >(std::begin<const nsStaticAtom* const, 2>(kURLAttributesSVG), std::end<const nsStaticAtom* const, 2>(kURLAttributesSVG), (<lambda closure object><lambda(auto:13)>{}, <lambda(auto:13)>()))’
 3:05.09 /tmp/firefox-86.0/obj/dist/include/mozilla/Algorithm.h:24:15:  in ‘constexpr’ expansion of ‘aPred.<lambda(auto:13)>(((const nsStaticAtom*)(* aFirst)))’
 3:05.09 /tmp/firefox-86.0/dom/base/nsTreeSanitizer.cpp:625:35:  in ‘constexpr’ expansion of ‘mozilla::AnyOf<const nsStaticAtom* const*, <lambda(auto:13)> [with auto:13 = const nsStaticAtom*]::<lambda(auto:14)> >(std::begin<const nsStaticAtom* const, 182>(kAttributesSVG), std::end<const nsStaticAtom* const, 182>(kAttributesSVG), <lambda closure object><lambda(auto:13)> [with auto:13 = const nsStaticAtom*]::<lambda(auto:14)>{aURLAttributeSVG})’
 3:05.09 /tmp/firefox-86.0/dom/base/nsTreeSanitizer.cpp:628:59: error: ‘((& mozilla::detail::gGkAtoms.mozilla::detail::GkAtoms::mAtoms[1537]) == 0)’ is not a constant expression
 3:05.09  628 |                                      return aAttributeSVG == aURLAttributeSVG;
 3:05.09      |                                            ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~

what I do here is cheat a little and use llvm: I modify the mozilla-firefox.SlackBuild in current like this
Code:

--- ./mozilla-firefox.SlackBuild.orig  2021-01-25 18:14:58.511982990 +0100
+++ ./mozilla-firefox.SlackBuild        2021-02-22 11:37:19.402073000 +0100
@@ -85,8 +85,8 @@
 fi
 
 # Choose a compiler (gcc/g++ or clang/clang++):
-export CC=${CC:-gcc}
-export CXX=${CXX:-g++}
+export CC=${CC:-clang}
+export CXX=${CXX:-clang++}
 
 # Keep memory usage as low as possible when linking:
 SLKLDFLAGS=" -Wl,--as-needed -Wl,--no-keep-memory -Wl,--stats -Wl,--reduce-memory-overheads"
@@ -260,6 +260,12 @@
    browser/installer/package-manifest.in || exit 1
 fi
 
+export AR=llvm-ar
+export NM=llvm-nm
+export RANLIB=llvm-ranlib
+export MOZ_ENABLE_FULL_SYMBOLS=1
+export MOZ_NOSPAM=1
+export MACH_USE_SYSTEM_PYTHON="1"
 export MOZILLA_OFFICIAL="1"
 export BUILD_OFFICIAL="1"
 export MOZ_PHOENIX="1"
@@ -288,6 +294,9 @@
 # Tell .mozconfig about the selected compiler:
 echo "export CC=\"${CC}\"" >> .mozconfig
 echo "export CXX=\"${CXX}\"" >> .mozconfig
+echo "export AR=\"${AR}\"" >> .mozconfig
+echo "export NM=\"${NM}\"" >> .mozconfig
+echo "export RANLIB=\"${RANLIB}\"" >> .mozconfig
 
 if [ "$COMPILE_X86_UNDER_X86_64" = "true" ]; then
  # Compile for i686 under an x86_64 kernel:

and I just built the 86.0 candidate with it.

3rensho 02-22-2021 06:32 AM

Thanks for the changes Ponce. I always use clang on Mozilla stuff but added your other changes and the candidate built fine.

rpedrica 02-23-2021 03:09 AM

Thanks very much @Ponce - I think I've broken something in my slackbuild so would you mind providing the full latest slackbuild you used in the 86 build?

ponce 02-23-2021 03:53 AM

Quote:

Originally Posted by rpedrica (Post 6223516)
Thanks very much @Ponce - I think I've broken something in my slackbuild so would you mind providing the full latest slackbuild you used in the 86 build?

it's the one available in the /sources/xap/mozilla-firefox/ directory of current with just the modifications above applied...

rpedrica 02-23-2021 07:30 AM

Thanks, I've started with a fresh copy of the source folder and applied the patch. Got the following:

Quote:

In file included from ../deps/v8/src/torque/ast-generator.cc:8:
In file included from ../deps/v8/src/torque/ast-generator.h:8:
In file included from ../deps/v8/src/torque/TorqueBaseVisitor.h:11:
In file included from ../deps/v8/third_party/antlr4/runtime/Cpp/runtime/src/./antlr4-runtime.h:149:
../deps/v8/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/ParseTreePattern.h:34:21: warning: explicitly defaulted copy assignment operator is implicitly deleted [-Wdefaulted-function-deleted]
ParseTreePattern& operator=(ParseTreePattern const&) = default;
^
../deps/v8/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/ParseTreePattern.h:97:13: note: copy assignment operator of 'ParseTreePattern' is implicitly deleted because field 'patternRuleIndex' is of const-qualified type 'const int'
const int patternRuleIndex;
^
../deps/v8/src/torque/ast-generator.cc:123:32: error: type 'antlr4::tree::TerminalNode *' cannot be narrowed to 'bool' in initializer list [-Wc++11-narrowing]
ParameterList result{{}, {}, context->VARARGS(), {}};
^~~~~~~~~~~~~~~~~~
../deps/v8/src/torque/ast-generator.cc:123:32: note: insert an explicit cast to silence this issue
ParameterList result{{}, {}, context->VARARGS(), {}};
^~~~~~~~~~~~~~~~~~
static_cast<bool>()
../deps/v8/src/torque/ast-generator.cc:144:32: error: type 'antlr4::tree::TerminalNode *' cannot be narrowed to 'bool' in initializer list [-Wc++11-narrowing]
ParameterList result{{}, {}, context->VARARGS(), {}};
^~~~~~~~~~~~~~~~~~
../deps/v8/src/torque/ast-generator.cc:144:32: note: insert an explicit cast to silence this issue
ParameterList result{{}, {}, context->VARARGS(), {}};
^~~~~~~~~~~~~~~~~~
static_cast<bool>()
4 warnings and 2 errors generated.
make[1]: *** [deps/v8/gypfiles/torque.host.mk:278: /tmp/node-v10.21.0/out/Release/obj.host/torque/deps/v8/src/torque/ast-generator.o] Error 1
make: *** [Makefile:99: node] Error 2
So I've commented nodejs out in the build-deps.sh file (I have a system nodejs) and run build again. Completed this time and I have a 85.0.1 build now.

Thanks for your help

TheRealGrogan 02-23-2021 11:17 PM

If anyone wants to try a PGO+LTO build (which won't work with gcc anymore, btw), use the lld linker. Gold is pretty borked these days (can't handle this build for me anymore... barfs with internal errors on the final linking of libxul since Firefox 84) and ld.bfd would likely OOM.

ac_add_options --enable-linker=lld

elfhack doesn't fail with lld currently, so no need to --disable-elfhack at this time (I'm saying that because it used to, at times)

Definitely want to use llvm-ar, llvm-nm, llvm-ranlib for a PGO+LTO build now.


All times are GMT -5. The time now is 03:01 AM.