See failed builds: https://koji.fedoraproject.org/koji/buildinfo?buildID=1006431 https://koji.fedoraproject.org/koji/buildinfo?buildID=1007363 I also tried a scratch build today with the same failure: From the build.log: ... note: library: util note: library: dl note: library: rt note: library: pthread note: library: gcc_s note: library: c note: library: m note: library: rt note: library: pthread note: library: util Compiling gkrust-shared v0.1.0 (file:///builddir/build/BUILD/firefox-57.0.1/toolkit/library/rust/shared) Compiling gkrust v0.1.0 (file:///builddir/build/BUILD/firefox-57.0.1/toolkit/library/rust) terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc error: Could not compile `gkrust`. To learn more, run the command again with --verbose. make[5]: *** [/builddir/build/BUILD/firefox-57.0.1/config/rules.mk:1002: force-cargo-library-build] Error 101 make[5]: Leaving directory '/builddir/build/BUILD/firefox-57.0.1/objdir/toolkit/library/rust' make[4]: Leaving directory '/builddir/build/BUILD/firefox-57.0.1/objdir' make[4]: *** [/builddir/build/BUILD/firefox-57.0.1/config/recurse.mk:73: toolkit/library/rust/target] Error 2 make[3]: Leaving directory '/builddir/build/BUILD/firefox-57.0.1/objdir' make[3]: *** [/builddir/build/BUILD/firefox-57.0.1/config/recurse.mk:33: compile] Error 2 make[2]: *** [/builddir/build/BUILD/firefox-57.0.1/config/rules.mk:452: default] Error 2 make[2]: Leaving directory '/builddir/build/BUILD/firefox-57.0.1/objdir' make[1]: Leaving directory '/builddir/build/BUILD/firefox-57.0.1' make[1]: *** [/builddir/build/BUILD/firefox-57.0.1/client.mk:424: realbuild] Error 2 make: *** [client.mk:175: build] Error 2 This is causing rawhide composes to fail (because release blocking deliverables are not composing due a broken dep for enchant when installing firefox. There's a stack of packages built already with the new enchant, so I think it may be easier to just excludearch armv7 for now to get composes working and try and fix the issue.
This looks to be a compiler issue, moving to rust.
We disabled Firefox 57 builds on all Fedoras due to this issue.
Martin, is there an upstream Firefox (or Rust) bug for this?
I'm not aware of any upstream bugreport about it.
It sounds similar to rust#45854, where I had memory issues on armv7 even building rustc itself. https://github.com/rust-lang/rust/issues/45854 My workaround so far is to disable rust debuginfo on arm. It looks like firefox/config/rules.mk supports RUSTFLAGS, so you could add -Cdebuginfo=0 to try this yourself. Rust 1.23 also claims some modest reduction of memory use in rustc, 5-10%, so I guess we can see if that helps when I rebase in the next few days...
I added the -Cdebuginfo=0 workaround to firefox-57.0.4-2 builds.
It doesn't look like that took effect. In the build log, I see your + RUSTFLAGS=-Cdebuginfo=0 But you also have to export shell variables. Later in the build you can see: make[5]: Entering directory '/builddir/build/BUILD/firefox-57.0.4/objdir/toolkit/library/rust' force-cargo-library-build env RUSTFLAGS=' -C debuginfo=2 ' [...] I tried a rawhide build with Rust 1.23, enabling arm but no RUSTFLAGS change. First, I found that `#[deny(warnings)]` in servo/components/style/lib.rs caused an unused_imports warning on AsciiExt to be an error. This change is mentioned in the release notes, but it only becomes a breaking change when you deny warnings. https://blog.rust-lang.org/2018/01/04/Rust-1.23.html There's an upstream fix that masks that warning on each import: https://github.com/servo/servo/commit/e7a654dd13f589e127193267bcb576ffd661c11d But this doesn't apply cleanly on Firefox 57. I just allowed that warning for the whole crate to get it building, adding this in firefox.spec %prep: sed -i.allow-warnings -e '/#!\[deny(warnings)\]/a #![allow(unused_imports)]' \ servo/components/style/lib.rs This scratch build succeeded! https://koji.fedoraproject.org/koji/taskinfo?taskID=24088682 I will be building Rust 1.23 for F27 and F26 today, so hopefully this solves it.
Great! Can you provide me a patch to firefox.spec for that?
I don't think you need that patch anymore with Firefox 58, as it includes the upstream fix for the AsciiExt warnings. I see in koji you also just did builds that passed with exported RUSTFLAGS to block arm debuginfo, but this was also still with Rust 1.22.1. Rust 1.23 just landed on F27 and F26 this morning, and has been on rawhide since January 8. If you could try without that RUSTFLAGS workaround, I think it's in better shape now. diff --git a/firefox.spec b/firefox.spec index f07e71cf5888..2f3299921bb6 100644 --- a/firefox.spec +++ b/firefox.spec @@ -522,9 +522,6 @@ export MOZ_DEBUG_FLAGS=" " %ifarch s390 %{arm} ppc aarch64 MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" %endif -%ifarch %{arm} -export RUSTFLAGS="-Cdebuginfo=0" -%endif export CFLAGS=$MOZ_OPT_FLAGS export CXXFLAGS=$MOZ_OPT_FLAGS export LDFLAGS=$MOZ_LINK_FLAGS
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle. Changing version to '28'.
Seems fine with firefox 59