Okay, I think I have all prerequisites in place. Now on to get the whole thing actually compiled. Right now it is at least failing during Stylo compilation with the following backtrace:
27:59.16 thread 'stack backtrace:27:59.32 0: 0x557146665c03 - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h28991c1d2d7fb0bc27:59.35 at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:3927:59.35 1: 0x5571466608ab - std::sys_common::backtrace::_print::hdb8f9a6bc6550c7327:59.35 at src/libstd/sys_common/backtrace.rs:7027:59.35 2: 0x557146663986 - std::panicking::default_hook::{{closure}}::hf5bd0e166d7070c227:59.35 at src/libstd/sys_common/backtrace.rs:5827:59.35 at src/libstd/panicking.rs:20027:59.35 3: 0x557146663704 - std::panicking::default_hook::h551580c4307ee3ab27:59.35 at src/libstd/panicking.rs:21527:59.35 4: 0x55714666408f - std::panicking::rust_panic_with_hook::h3b41ee611369f0b127:59.35 at src/libstd/panicking.rs:47827:59.35 5: 0x557146663c11 - std::panicking::continue_panic_fmt::h86542a6b075513dd27:59.35 at src/libstd/panicking.rs:38527:59.35 6: 0x557146663b5e - std::panicking::begin_panic_fmt::hd511eaf3357d07a627:59.35 at src/libstd/panicking.rs:34027:59.35 7: 0x557146658103 - std::io::stdio::_print::h9035f66296b9efd127:59.35 at src/libstd/io/stdio.rs:73527:59.35 at src/libstd/io/stdio.rs:74427:59.35 8: 0x557146251c08 - cargo::core::compiler::job_queue::JobQueue::drain_the_queue::hd94276b883027b4527:59.35 9: 0x55714611bc94 - std::panicking::try::do_call::h5f91376082cf7b1e27:59.35 10: 0x55714666fb79 - __rust_maybe_catch_panic27:59.35 at src/libpanic_unwind/lib.rs:8727:59.35 11: 0x5571462196c1 - cargo::core::compiler::context::Context::compile::hd97932f2c980d56c27:59.35 12: 0x5571462c5bb7 - cargo::ops::cargo_compile::compile_ws::h63581a7f0cd1f2ed27:59.35 13: 0x5571462c3a9e - cargo::ops::cargo_compile::compile::h632a606c9260ae5027:59.35 14: 0x5571460bdceb - cargo::commands::rustc::exec::h614f2a41cf15f27d27:59.35 15: 0x5571460c27d1 - cargo::main::hca1a1dbe3739f08f27:59.35 16: 0x557146085fc2 - std::rt::lang_start::{{closure}}::he6e482ffcf9ae8a627:59.35 17: 0x557146663a92 - std::panicking::try::do_call::hdb24dd18b35dbd0e27:59.35 at src/libstd/rt.rs:4927:59.35 at src/libstd/panicking.rs:29727:59.36 18: 0x55714666fb79 - __rust_maybe_catch_panic27:59.36 at src/libpanic_unwind/lib.rs:8727:59.36 19: 0x55714666465c - std::rt::lang_start_internal::hc9e10b9bd186777b27:59.36 at src/libstd/panicking.rs:27627:59.36 at src/libstd/panic.rs:38827:59.36 at src/libstd/rt.rs:4827:59.36 20: 0x5571460c5dc1 - main27:59.36 21: 0x2b2fb08e4eac - __libc_start_main27:59.36 22: 0x557146082d68 - <unknown>
There are a bunch of warnings but no errors shown besides
If you depend on software rasterization, image decoding, or color space conversion and compile Skia with GCC, MSVC or another compiler, you will see dramatically worse performance than if you use Clang.
Yeah; we switched our linux builds to clang. Sorry I didn't see this earlier. One of the factors to that was Skia becoming much slower (I never got an idea of the numbers) with gcc.
Alright, using 1.34.1 provided by the Rust folks does not change the situation and, as in the Gentoo bug, if I kick the build again via the debug shell I get past the problem and the Rust code compiles successfully.
Alright, some follow-ups: I tried a bunch of random things to no avail (using precompiled Rust versions 1.34.1, 1.35.0, just compiling Firefox with -j1, trying to make sure cargo is compiling only with -j1, resuming the build from within the VM, which surprisingly worked) and ended up with omitting --verbose to our mach build incantation which "worked". Trying to figure out the underlying problem Alex Crichton put me on the right path by linking to https://github.com/travis-ci/travis-ci/issues/4704. In particular https://github.com/travis-ci/travis-ci/issues/4704#issuecomment-348435959 has been useful:
Pretty much every commandline tool expects stdout to be in blocking mode, and does not properly retry when in nonblocking mode.
Testing the Python snippets from that bug both on the host machine and in the VM did not show any issues, thus something must change the blocking mode during compilation.
Compiling our 32bits were failing, too. The first show-stopper was a failure related to us setting host and target to i686-linux-gnu:
0:08.82 ERROR: The rust compiler host (x86_64-unknown-linux-gnu) is not suitable for the configure host (i686-pc-linux-gnu/i686-unknown-linux-gnu).
That gets solved by just keeping ac_add_options --target=i686-linux-gnu.
Then gold is breaking when linking libxul.so
41:17.86 /var/tmp/dist/binutils/bin/ld.gold.real: internal error in relocate_section, at i386.cc:368441:18.04 clang-8: error: linker command failed with exit code 1 (use -v to see invocation)
Using bfd with ac_add_options --enable-linker=bfd works and I can successfully compile and link the browser. Using lld fails, too:
41:04.50 ld.lld: error: dwarf.c:(.debug_info+0x20DE295A): has non-ABS relocation R_386_GOTOFF against symbol '.LC25'41:08.83 clang-8: error: linker command failed with exit code 1 (use -v to see invocation)
Might be worth figuring out at least why gold is not happy here.
One big drawback we still have for the 32bit builds is that mar and mbsdiff are still 64bit binaries and thus, signing on 32bit systems is not working out of the box.
The top commit from this branch is only for testing and should not be merged. It should be replaced by a commit updating the firefox version (after we pushed an esr68 branch to tor-browser.git).
The top commit from this branch is only for testing and should not be merged. It should be replaced by a commit updating the firefox version (after we pushed an esr68 branch to tor-browser.git).
Thanks. The language pack related commit looks good to me, nice find! I cherry-picked that one to master as commit 4a632f8ac10f5d01ac9ef075fc698bd7454ab6cb. I looked over the ESR 68 changes again and tweaked the commit slightly, e.g. by passing --enabled-proxy-bypass-protection to i686 as well. It's now commit c26b8196c90e908a83104c639865a2aca6598efe. Please have a look once you are back.
There are a number of XXX's and issues we still should try to address as well. For verbosity they are:
We are installing python just for mach. I guess we should use the one we built ourselves instead?
gold and lld break for 32bit and we need to resort to bfd. This needs investigation (I bet Mozilla is not affected here)
We don't get 32bit signing related binaries anymore but we need those. We need to fix that.
We need to enable the updater again once the rebases patches are available
I think we still should build the debug build with GCC enabled to catch potential issues Mozilla is not catching anymore after they switched to clang.
The top commit from this branch is only for testing and should not be merged. It should be replaced by a commit updating the firefox version (after we pushed an esr68 branch to tor-browser.git).
Thanks. The language pack related commit looks good to me, nice find! I cherry-picked that one to master as commit 4a632f8ac10f5d01ac9ef075fc698bd7454ab6cb. I looked over the ESR 68 changes again and tweaked the commit slightly, e.g. by passing --enabled-proxy-bypass-protection to i686 as well. It's now commit c26b8196c90e908a83104c639865a2aca6598efe. Please have a look once you are back.
There are a number of XXX's and issues we still should try to address as well. For verbosity they are:
We are installing python just for mach. I guess we should use the one we built ourselves instead?