FS#72085 - [firefox] 92.0-1: Clean chroot rebuild throws "error: could not compile `gkrust`"

Attached to Project: Arch Linux
Opened by Pascal Ernster (hardfalcon) - Thursday, 09 September 2021, 15:03 GMT
Last edited by Antonio Rojas (arojas) - Saturday, 11 September 2021, 07:56 GMT
Task Type Support Request
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

When I try to build the firefox 92.0-1 package with an unodified PKGBUILD in a clean chroot (using extra-x86_64-build from the devtools package and an unmodified /usr/share/devtools/makepkg-x86_64.conf from the same package), I keep getting the following error:


2021-09-09_16:14:48 52:26.39 media/ffvpx/libavcodec/libmozavcodec.so
2021-09-09_16:14:57 52:35.65 Compiling webrender_bindings v0.1.0 (/build/firefox/src/firefox-92.0/gfx/webrender_bindings)
2021-09-09_16:14:58 52:36.39 Compiling gkrust-shared v0.1.0 (/build/firefox/src/firefox-92.0/toolkit/library/rust/shared)
2021-09-09_16:18:11 55:50.07 Compiling gkrust v0.1.0 (/build/firefox/src/firefox-92.0/toolkit/library/rust)
2021-09-09_16:30:02 67:41.01 error: could not compile `gkrust`
2021-09-09_16:30:02 67:41.01 Caused by:
2021-09-09_16:30:02 67:41.01 process didn't exit successfully: `/usr/bin/rustc --crate-name gkrust toolkit/library/rust/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type staticlib --emit=dep-info,link -C opt-level=2 -C panic=abort -C embed-bitcode=no -Clto --cfg 'feature="cubeb-remoting"' --cfg 'feature="cubeb_pulse_rust"' --cfg 'feature="gecko_profiler"' --cfg 'feature="gecko_profiler_parse_elf"' --cfg 'feature="glean_with_gecko"' --cfg 'feature="moz_memory"' --cfg 'feature="moz_places"' --cfg 'feature="oxidized_breakpad"' --cfg 'feature="quantum_render"' --cfg 'feature="simd-accel"' --cfg 'feature="webgpu"' --cfg 'feature="webrtc"' --cfg 'feature="with_dbus"' -C metadata=7073df184b6fca70 -C extra-filename=-7073df184b6fca70 --out-dir /build/firefox/src/firefox-92.0/obj/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -C linker=/build/firefox/src/firefox-92.0/build/cargo-linker -C incremental=/build/firefox/src/firefox-92.0/obj/x86_64-unknown-linux-gnu/release/incremental -L dependency=/build/firefox/src/firefox-92.0/obj/x86_64-unknown-linux-gnu/release/deps -L dependency=/build/firefox/src/firefox-92.0/obj/release/deps --extern gkrust_shared=/build/firefox/src/firefox-92.0/obj/x86_64-unknown-linux-gnu/release/deps/libgkrust_shared-86208b4d8165a00b.rlib --extern mozglue_static=/build/firefox/src/firefox-92.0/obj/x86_64-unknown-linux-gnu/release/deps/libmozglue_static-c7116aaac536f97c.rlib --extern mozilla_central_workspace_hack=/build/firefox/src/firefox-92.0/obj/x86_64-unknown-linux-gnu/release/deps/libmozilla_central_workspace_hack-025f0bb413ce4405.rlib --extern swgl=/build/firefox/src/firefox-92.0/obj/x86_64-unknown-linux-gnu/release/deps/libswgl-4fdb9d1a62d83901.rlib -C debuginfo=2 --cap-lints warn -Cembed-bitcode=yes -C panic=abort -C profile-generate=/build/firefox/src/firefox-92.0/obj -C codegen-units=1 -L native=/usr/lib -L native=/build/firefox/src/firefox-92.0/obj/x86_64-unknown-linux-gnu/release/build/audioipc-eed15e9531a9b6e9/out -L native=/build/firefox/src/firefox-92.0/obj/x86_64-unknown-linux-gnu/release/build/lmdb-rkv-sys-5594e99ccd292aff/out -L native=/build/firefox/src/firefox-92.0/obj/x86_64-unknown-linux-gnu/release/build/mozglue-static-af23e987e63926e3/out -L native=/build/firefox/src/firefox-92.0/obj/dist/bin -L native=/build/firefox/src/firefox-92.0/obj/security/nss/lib/nss/nss_nss3 -L native=/build/firefox/src/firefox-92.0/obj/security/nss/lib/ssl/ssl_ssl3 -L native=/build/firefox/src/firefox-92.0/obj/config/external/nspr/pr -L native=/build/firefox/src/firefox-92.0/obj/x86_64-unknown-linux-gnu/release/build/swgl-39687a05c17ec3b9/out` (signal: 9, SIGKILL: kill)
2021-09-09_16:30:02 67:41.04 make[4]: *** [/build/firefox/src/firefox-92.0/config/makefiles/rust.mk:405: force-cargo-library-build] Error 101
2021-09-09_16:30:02 67:41.04 make[3]: *** [/build/firefox/src/firefox-92.0/config/recurse.mk:72: toolkit/library/rust/target] Error 2
2021-09-09_16:30:02 67:41.05 make[2]: *** [/build/firefox/src/firefox-92.0/config/recurse.mk:34: compile] Error 2
2021-09-09_16:30:02 67:41.05 make[1]: *** [/build/firefox/src/firefox-92.0/config/rules.mk:360: default] Error 2
2021-09-09_16:30:02 67:41.05 make: *** [client.mk:65: build] Error 2
2021-09-09_16:30:02 67:41.07 132 compiler warnings present.
2021-09-09_16:30:03 Config object not found by mach.
2021-09-09_16:30:03 Configure complete!
2021-09-09_16:30:03 Be sure to run |mach build| to pick up any changes
2021-09-09_16:30:03 ==> ERROR: A failure occurred in build().
2021-09-09_16:30:03 Aborting...


I've attached logfiles of the entire package compile run, produced by running

extra-x86_64-build -c -r /mnt/archbuild > >(ts '%F_%H:%M:%S' | tee -a stdout.log) 2> >(ts '%F_%H:%M:%S' | tee -a stderr.log >&2)

I've had the exact same issue when trying to build Thunderbird 91.x for a few weeks now, even though building thunderbird 91.0.2 on 2021-08-23T13:05:06 CEST worked without issues. I've suspected LTO, but neither adding "!lto" not "lto" nor omitting it from the options array in the PKGBUILD resolved the issue.
This task depends upon

Closed by  Antonio Rojas (arojas)
Saturday, 11 September 2021, 07:56 GMT
Reason for closing:  Not a bug
Comment by loqs (loqs) - Thursday, 09 September 2021, 17:28 GMT
Does the journal show SIGKILL was sent by the kernel OOM killer? If so try reducing the number of jobs with mk_add_options MOZ_MAKE_FLAGS="-j#"
Comment by Pascal Ernster (hardfalcon) - Thursday, 09 September 2021, 18:18 GMT
Ohhh, thanks for the hint, journalctl shows OOM kills of some rustc processes indeed, and /mnt/archbuild is a tmpfs, which obviously isn't helpful in an OOM situation. I'll report back if this actually solves the issue.
Comment by Pascal Ernster (hardfalcon) - Friday, 10 September 2021, 17:12 GMT
After throwing zram and a swap partition the size of Texas at the problem, the build process finally worked without any issues. Reducing the number of make processes didn't help since the bottleneck/memory hog seems to be a single rustc process.

Thanks again for the hint, loqs! 👍

Loading...