Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 778032

Summary: =www-client/firefox-87.0 fails to compile on armv7
Product: Gentoo Linux Reporter: tt_1 <herrtimson>
Component: Current packagesAssignee: Mozilla Gentoo Team <mozilla>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugzilla.mozilla.org/show_bug.cgi?id=1700520
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: compressed build log
output from emerge --info (cross-target)

Description tt_1 2021-03-24 22:42:12 UTC
Created attachment 693366 [details]
compressed build log

I recently ran into this error: 

33:00.26   cargo:warning=In file included from src/glsl.h:7,
33:00.26   cargo:warning=                 from src/gl.cc:78:
33:00.26   cargo:warning=src/vector_type.h: In instantiation of 'static T glsl::Unaligned<T>::load(const P*) [with P = glsl::VectorType<float, 16>; T = glsl::vec4]':
33:00.26   cargo:warning=src/vector_type.h:531:28:   required from 'T glsl::unaligned_load(const P*) [with T = glsl::vec4; P = glsl::VectorType<float, 16>]'
33:00.26   cargo:warning=src/vector_type.h:542:27:   required from 'D glsl::bit_cast(const S&) [with D = glsl::vec4; S = glsl::VectorType<float, 16>]'
33:00.26   cargo:warning=src/blend.h:53:41:   required from here
33:00.26   cargo:warning=src/vector_type.h:502:11: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of type 'struct glsl::vec4' with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
33:00.26   cargo:warning=  502 |     memcpy(&v, p, sizeof(v));
33:00.27   cargo:warning=      |     ~~~~~~^~~~~~~~~~~~~~~~~~
33:00.27   cargo:warning=In file included from src/gl.cc:78:
33:00.27   cargo:warning=src/glsl.h:1772:8: note: 'struct glsl::vec4' declared here
33:00.27   cargo:warning= 1772 | struct vec4 {
33:00.27   cargo:warning=      |        ^~~~
33:00.27   cargo:warning={standard input}: Assembler messages:
33:00.27   cargo:warning={standard input}:1512249: Error: conditional branch out of range
33:00.27   cargo:warning={standard input}:1512749: Error: conditional branch out of range
33:00.27   cargo:warning={standard input}:1513019: Error: conditional branch out of range
33:00.27   cargo:warning={standard input}:1513231: Error: conditional branch out of range
33:00.27   cargo:warning={standard input}:1513678: Error: conditional branch out of range
33:00.27   cargo:warning={standard input}:1515492: Error: conditional branch out of range
33:00.27   cargo:warning={standard input}:1516138: Error: conditional branch out of range
33:00.27   cargo:warning={standard input}:1517370: Error: conditional branch out of range
33:00.27   cargo:warning={standard input}:1517666: Error: conditional branch out of range
33:00.27   cargo:warning={standard input}:1517756: Error: conditional branch out of range
33:00.27   cargo:warning={standard input}:1518055: Error: conditional branch out of range
33:00.27   cargo:warning={standard input}:1518544: Error: conditional branch out of range
33:00.27   cargo:warning={standard input}:1519781: Error: conditional branch out of range
33:00.27   cargo:warning={standard input}:1520394: Error: conditional branch out of range
33:00.27   cargo:warning={standard input}:1521607: Error: conditional branch out of range
33:00.27   cargo:warning={standard input}:1522059: Error: conditional branch out of range
33:00.27   cargo:warning={standard input}:1522559: Error: conditional branch out of range
33:00.27   cargo:warning={standard input}:1522766: Error: conditional branch out of range
33:00.27   cargo:warning={standard input}:1829837: Error: conditional branch out of range
33:00.27   cargo:warning={standard input}:1837854: Error: conditional branch out of range
33:00.27   cargo:warning={standard input}:1840340: Error: conditional branch out of range
33:00.27   cargo:warning={standard input}:1840352: Error: conditional branch out of range
33:00.27   cargo:warning={standard input}:1840400: Error: conditional branch out of range
33:00.27   cargo:warning={standard input}:1840420: Error: conditional branch out of range
33:00.27   exit code: 1
33:00.27   --- stderr
33:00.27   error occurred: Command "/usr/bin/armv7a-unknown-linux-gnueabihf-g++" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-march=armv7-a" "-mfpu=neon-vfpv4" "-mthumb" "-mfloat-abi=hard" "-std=gnu++17" "-I/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-87.0/work/firefox_build/dist/stl_wrappers" "-I/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-87.0/work/firefox_build/dist/system_wrappers" "-include" "/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-87.0/work/firefox-87.0/config/gcc_hidden.h" "-U_FORTIFY_SOURCE" "-D_FORTIFY_SOURCE=2" "-fstack-protector-strong" "-DNDEBUG=1" "-DTRIMMED=1" "-I/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-87.0/work/firefox-87.0/toolkit/library/rust" "-I/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-87.0/work/firefox_build/toolkit/library/rust" "-I/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-87.0/work/firefox_build/dist/include" "-I/usr/armv7a-unknown-linux-gnueabihf/usr/include/nspr" "-I/usr/armv7a-unknown-linux-gnueabihf/usr/include/nss" "-I/usr/armv7a-unknown-linux-gnueabihf/usr/include/nspr" "-I/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-87.0/work/firefox_build/dist/include/nss" "-I/usr/armv7a-unknown-linux-gnueabihf/usr/include/pixman-1" "-fPIC" "-DMOZILLA_CLIENT" "-include" "/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-87.0/work/firefox_build/mozilla-config.h" "-Wall" "-Wempty-body" "-Wignored-qualifiers" "-Wpointer-arith" "-Wsign-compare" "-Wtype-limits" "-Wunreachable-code" "-Wwrite-strings" "-Wno-invalid-offsetof" "-Wduplicated-cond" "-Wimplicit-fallthrough" "-Wunused-function" "-Wunused-variable" "-Wno-error=maybe-uninitialized" "-Wno-error=deprecated-declarations" "-Wno-error=array-bounds" "-Wno-error=coverage-mismatch" "-Wno-error=free-nonheap-object" "-Wno-multistatement-macros" "-Wno-error=class-memaccess" "-Wno-error=deprecated-copy" "-Wformat" "-Wformat-security" "-Wformat-overflow=2" "-Wno-psabi" "-fno-sized-deallocation" "-fno-aligned-new" "-pipe" "-fomit-frame-pointer" "-mthumb" "-mno-thumb-interwork" "-mfpu=neon" "-mfloat-abi=hard" "-fno-exceptions" "-fno-strict-aliasing" "-fno-rtti" "-ffunction-sections" "-fdata-sections" "-fno-exceptions" "-fno-math-errno" "-pthread" "-pipe" "-O2" "-fomit-frame-pointer" "-funwind-tables" "-DMOZILLA_CONFIG_H" "-I" "/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-87.0/work/firefox-87.0/gfx/wr/webrender/res" "-I" "src" "-I" "/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-87.0/work/firefox_build/thumbv7neon-unknown-linux-gnueabihf/release/build/swgl-c461939dc1cecd73/out" "-std=c++17" "-UMOZILLA_CONFIG_H" "-fno-exceptions" "-fno-rtti" "-fno-math-errno" "-D_GLIBCXX_USE_CXX11_ABI=0" "-o" "/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-87.0/work/firefox_build/thumbv7neon-unknown-linux-gnueabihf/release/build/swgl-c461939dc1cecd73/out/src/gl.o" "-c" "src/gl.cc" with args "armv7a-unknown-linux-gnueabihf-g++" did not execute successfully (status code exit code: 1).
33:00.27 warning: build failed, waiting for other jobs to finish...
33:00.27 error: build failed
33:00.27 gmake[4]: *** [/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-87.0/work/firefox-87.0/config/makefiles/rust.mk:350: force-cargo-library-build] Error 101
33:00.27 gmake[4]: Leaving directory '/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-87.0/work/firefox_build/toolkit/library/rust'
33:00.27 gmake[3]: *** [/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-87.0/work/firefox-87.0/config/recurse.mk:72: toolkit/library/rust/target] Error 2
33:00.27 gmake[3]: *** Waiting for unfinished jobs....


full and compressed build log is attached
Comment 1 tt_1 2021-03-24 22:43:26 UTC
Created attachment 693369 [details]
output from emerge --info (cross-target)

I'm cross compiling obviously, but that shouldn't make a difference.
Comment 2 tt_1 2021-03-24 22:46:50 UTC
the cross toolchain is still gcc-9 based. If I did upgrade it to a gcc-10 based there is a huge increase of compile time, where gcc or linker munches for about 15 minutes on the last command before crashing as well.
Comment 3 tt_1 2021-03-24 22:51:13 UTC
I found one bug report at fedora, where they suggest swgl has been updated and the amount of memory it needs has skyrocketed. 

The build machine hosting the cross compiler toolchain has 32gb of ram for 12 jobs. That should be enough, right?
Comment 4 tt_1 2021-03-25 09:00:34 UTC
I need some feedback please if its possible to decrease ram usage by using an env file and RUSTFLAGS

setting RUSTFLAGS="-C debuginfo=0"

doesn't seem to have any effect, as "-C opt-level=2" is debug verbosity, right? 


 2:43.96    Compiling gpu-alloc v0.2.1 (https://github.com/zakarumych/gpu-alloc?rev=d07be73f9439a37c89f5b72f2500cbf0eb4ff613#d07be73f)
 2:43.96      Running `CARGO=/usr/lib/rust/1.47.0/bin/cargo-1.47.0 CARGO_CRATE_NAME=gpu_alloc CARGO_MANIFEST_DIR=/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-87.0/work/firefox-87.0/third_party/rust/gpu-alloc CARGO_PKG_AUTHORS='Zakarum <zakarumych@ya.ru>' CARGO_PKG_DESCRIPTION='Implementation agnostic memory allocator for Vulkan like APIs' CARGO_PKG_HOMEPAGE='https://github.com/zakarumych/gpu-alloc' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=gpu-alloc CARGO_PKG_REPOSITORY='https://github.com/zakarumych/gpu-alloc' CARGO_PKG_VERSION=0.2.1 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=2 CARGO_PKG_VERSION_PATCH=1 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-87.0/work/firefox_build/release/deps:/usr/lib/rust/1.47.0/lib' /usr/bin/rustc --crate-name gpu_alloc --edition=2018 /usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-87.0/work/firefox-87.0/third_party/rust/gpu-alloc/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=2 -C panic=abort -C embed-bitcode=no --cfg 'feature="default"' --cfg 'feature="std"' -C metadata=0ad2bf2cfacfdf0b -C extra-filename=-0ad2bf2cfacfdf0b --out-dir /usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-87.0/work/firefox_build/thumbv7neon-unknown-linux-gnueabihf/release/deps --target thumbv7neon-unknown-linux-gnueabihf -C linker=/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-87.0/work/firefox-87.0/build/cargo-linker -L dependency=/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-87.0/work/firefox_build/thumbv7neon-unknown-linux-gnueabihf/release/deps -L dependency=/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-87.0/work/firefox_build/release/deps --extern bitflags=/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-87.0/work/firefox_build/thumbv7neon-unknown-linux-gnueabihf/release/deps/libbitflags-1f7301a251e24b19.rmeta --extern gpu_alloc_types=/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-87.0/work/firefox_build/thumbv7neon-unknown-linux-gnueabihf/release/deps/libgpu_alloc_types-382b04630649e966.rmeta --cap-lints warn -C opt-level=2 --cap-lints warn -C target_feature=+neon,-d16 -Cembed-bitcode=yes -C codegen-units=1`
Comment 5 tt_1 2021-03-30 17:42:49 UTC
This is fixed with the patch from the attached bug, and its most likely going to be beneficial for all gcc-10 users to cut down compile time and especially ram useage. 

for amd64:

firefox-87.0 with gcc-9.3.0 is 40 minutes
firefox-87.0 with gcc-10.2.0 is 50 minutes

with the patch: 

firefox-87.0 with gcc-9.3.0 is 33 minutes 
firefox-87.0 with gcc-10.2.0 is 34 minutes
Comment 6 Larry the Git Cow gentoo-dev 2021-03-30 18:22:40 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6448a5c45fffaa200ac28daeb05b9f096dfa40f3

commit 6448a5c45fffaa200ac28daeb05b9f096dfa40f3
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2021-03-30 18:08:09 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2021-03-30 18:22:35 +0000

    www-client/firefox: fix building on arm
    
    Closes: https://bugs.gentoo.org/778032
    Package-Manager: Portage-3.0.17, Repoman-3.0.2
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 www-client/firefox/Manifest            | 2 +-
 www-client/firefox/firefox-87.0.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Comment 7 Thomas Deutschmann (RETIRED) gentoo-dev 2021-04-02 17:43:26 UTC
*** Bug 779400 has been marked as a duplicate of this bug. ***