Created attachment 225235 [details] patch Currently the docs part of the build fails on armv7 with this: [RUSTC-SHIM] rustc lint_docs sysroot: "/wrkdirs/usr/ports/lang/rust/work/bootstrap" [RUSTC-SHIM] rustc lint_docs libdir: "/wrkdirs/usr/ports/lang/rust/work/bootstrap/lib" Finished release [optimized] target(s) in 11.61s Copy "/wrkdirs/usr/ports/lang/rust/work/rustc-1.52.1-src/build/armv7-unknown-freebsd/stage0-bootstrap-tools/armv7-unknown-freebsd/release/lint-docs" to "/wrkdirs/usr/ports/lang/rust/work/rustc-1.52.1-src/build/armv7-unknown-freebsd/stage0-tools-bin/lint-docs" < ToolBuild { compiler: Compiler { stage: 0, host: TargetSelection { triple: "armv7-unknown-freebsd", file: None } }, target: TargetSelection { triple: "armv7-unknown-freebsd", file: None }, tool: "lint-docs", path: "src/tools/lint-docs", mode: ToolBootstrap, is_optional_tool: false, source_type: InTree, extra_features: [] } < LintDocs { compiler: Compiler { stage: 0, host: TargetSelection { triple: "armv7-unknown-freebsd", file: None } }, target: TargetSelection { triple: "armv7-unknown-freebsd", file: None } } c Assemble { target_compiler: Compiler { stage: 0, host: TargetSelection { triple: "armv7-unknown-freebsd", file: None } } } c Sysroot { compiler: Compiler { stage: 2, host: TargetSelection { triple: "armv7-unknown-freebsd", file: None } } } running: "/wrkdirs/usr/ports/lang/rust/work/rustc-1.52.1-src/build/armv7-unknown-freebsd/stage0-tools-bin/lint-docs" "--src" "/wrkdirs/usr/ports/lang/rust/work/rustc-1.52.1-src/compiler" "--out" "/wrkdirs/usr/ports/lang/rust/work/rustc-1.52.1-src/build/armv7-unknown-freebsd/md-doc/rustc/src/lints" "--rustc" "/wrkdirs/usr/ports/lang/rust/work/rustc-1.52.1-src/build/armv7-unknown-freebsd/stage2/bin/rustc" "--rustc-target" "armv7-unknown-freebsd" "--verbose" compiling lint forbidden_lint_groups compiling lint ill_formed_attribute_input compiling lint conflicting_repr_hints compiling lint meta_variable_misuse compiling lint arithmetic_overflow compiling lint unconditional_panic compiling lint const_err compiling lint unused_imports compiling lint unused_extern_crates compiling lint unused_qualifications compiling lint unknown_lints compiling lint unused_variables compiling lint unused_assignments compiling lint dead_code compiling lint unused_attributes compiling lint unreachable_code compiling lint unreachable_patterns compiling lint overlapping_range_endpoints compiling lint bindings_with_variant_name thread 'main' panicked at 'capacity overflow', library/alloc/src/raw_vec.rs:536:5 stack backtrace: 0: 0x65968 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hb6824ac454dbfbe3 1: 0x95e60 - core::fmt::write::hd83e9f3b08978459 2: 0x61704 - std::io::Write::write_fmt::h496731c096b28f8a 3: 0x79ab0 - std::panicking::default_hook::{{closure}}::hf7778d53b5d4916c 4: 0x79574 - std::panicking::default_hook::h04174f0115ebff92 5: 0x7a1b8 - std::panicking::rust_panic_with_hook::h8d639d4fd78c7fa4 6: 0x65e54 - std::panicking::begin_panic_handler::{{closure}}::h3b4a5b07361a3b5c 7: 0x65afc - std::sys_common::backtrace::__rust_end_short_backtrace::h9f83fdeb132579b9 8: 0x79d64 - rust_begin_unwind 9: 0x95bf4 - core::panicking::panic_fmt::h6435a9925ba9394f 10: 0x95b48 - core::panicking::panic::hebb3c00e154df02f 11: 0x8fb48 - alloc::raw_vec::capacity_overflow::hb6ad389fbcbe8bac 12: 0x57bcc - alloc::raw_vec::RawVec<T,A>::reserve::hab2d33bc74ba3d20 13: 0x5dff8 - std::io::read_to_end::h684829613b03a264 14: 0x7c170 - std::sys::unix::pipe::read2::hf3b8d15f9aad43d4 15: 0x654e0 - std::process::Child::wait_with_output::hf93c3c0128c65170 16: 0x65448 - std::process::Command::output::h90ee81c9fa14d466 17: 0x3bf00 - lint_docs::LintExtractor::extract_lint_docs::h72cb332049c697b3 18: 0x37d14 - lint_docs::main::h659eab218dba1331 19: 0x37404 - std::sys_common::backtrace::__rust_begin_short_backtrace::h126b322e7296388f 20: 0x373d0 - std::rt::lang_start::{{closure}}::he57e7a5986ff2cc0 21: 0x7a4a4 - std::rt::lang_start_internal::he05a3c9a047ca8bc 22: 0x38154 - main command did not execute successfully: "/wrkdirs/usr/ports/lang/rust/work/rustc-1.52.1-src/build/armv7-unknown-freebsd/stage0-tools-bin/lint-docs" "--src" "/wrkdirs/usr/ports/lang/rust/work/rustc-1.52.1-src/compiler" "--out" "/wrkdirs/usr/ports/lang/rust/work/rustc-1.52.1-src/build/armv7-unknown-freebsd/md-doc/rustc/src/lints" "--rustc" "/wrkdirs/usr/ports/lang/rust/work/rustc-1.52.1-src/build/armv7-unknown-freebsd/stage2/bin/rustc" "--rustc-target" "armv7-unknown-freebsd" "--verbose" expected success, got: exit code: 101 Traceback (most recent call last): File "x.py", line 27, in <module> bootstrap.main() File "/wrkdirs/usr/ports/lang/rust/work/rustc-1.52.1-src/src/bootstrap/bootstrap.py", line 1175, in main bootstrap(help_triggered) File "/wrkdirs/usr/ports/lang/rust/work/rustc-1.52.1-src/src/bootstrap/bootstrap.py", line 1161, in bootstrap run(args, env=env, verbose=build.verbose) File "/wrkdirs/usr/ports/lang/rust/work/rustc-1.52.1-src/src/bootstrap/bootstrap.py", line 153, in run raise RuntimeError(err) RuntimeError: failed to run: /wrkdirs/usr/ports/lang/rust/work/rustc-1.52.1-src/build/bootstrap/debug/bootstrap install --jobs=16 *** Error code 1 Stop. make: stopped in /usr/ports/lang/rust build of lang/rust | rust-1.52.1 ended at Sat May 22 01:46:25 UTC 2021 build time: 00:55:35 !!! build failure encountered !!! [00:55:37] Error: Build failed in phase: stage
The those who don't want to read through the stack trace and code, the tldr; is that the build executed a command and tried to read its output into a Vec. But the output exceeded 2 GiB, overflowing the Vec. The command in question is "lint-docs", and is only executed when building API docs for the toolchain itself. So disabling the DOCS option fixes it. I don't know why the output is so large. I haven't tried checking the output on an amd64 machine, for instance. So I don't know if there's really some kind of bug on armv7, or if we can expect the build to soon begin failing on other 32-bit arches, too.
Hi, I don't have time to debug this or to do some bisecting. Can you please add armv6 to the list and commit it? Approved by: mikael Thanks!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=eea42d68b72531732a41e9f2fec0d76cff8b93a3 commit eea42d68b72531732a41e9f2fec0d76cff8b93a3 Author: Brad Davis <brd@FreeBSD.org> AuthorDate: 2021-06-10 16:28:03 +0000 Commit: Brad Davis <brd@FreeBSD.org> CommitDate: 2021-06-10 16:35:22 +0000 lang/rust: Disable DOCS to fix build on armv6/7 PR: 256135 Approved by: mikael lang/rust/Makefile | 2 ++ 1 file changed, 2 insertions(+)