Bug 1523912 - firefox 57.0.1 doesn't build on armv7
Summary: firefox 57.0.1 doesn't build on armv7
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: rust
Version: 28
Hardware: arm
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Josh Stone
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: ARMTracker
TreeView+ depends on / blocked
 
Reported: 2017-12-09 01:04 UTC by Kevin Fenzi
Modified: 2018-04-09 12:05 UTC (History)
20 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2018-04-09 12:05:46 UTC


Attachments (Terms of Use)

Description Kevin Fenzi 2017-12-09 01:04:28 UTC
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.

Comment 1 Paul Whalen 2018-01-04 14:03:07 UTC
This looks to be a compiler issue, moving to rust.

Comment 2 Martin Stransky 2018-01-05 08:32:41 UTC
We disabled Firefox 57 builds on all Fedoras due to this issue.

Comment 3 Matthew Miller 2018-01-08 14:10:18 UTC
Martin, is there an upstream Firefox (or Rust) bug for this?

Comment 4 Martin Stransky 2018-01-08 16:21:51 UTC
I'm not aware of any upstream bugreport about it.

Comment 5 Josh Stone 2018-01-08 17:42:09 UTC
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...

Comment 6 Martin Stransky 2018-01-09 13:12:05 UTC
I added the -Cdebuginfo=0 workaround to firefox-57.0.4-2 builds.

Comment 7 Josh Stone 2018-01-09 18:24:56 UTC
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.

Comment 8 Martin Stransky 2018-01-25 08:40:17 UTC
Great! Can you provide me a patch to firefox.spec for that?

Comment 9 Josh Stone 2018-01-25 17:28:31 UTC
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

Comment 10 Fedora End Of Life 2018-02-20 15:23:13 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.

Comment 11 Peter Robinson 2018-04-09 12:05:46 UTC
Seems fine with firefox 59


Note You need to log in before you can comment on or make changes to this bug.