buck2 icon indicating copy to clipboard operation
buck2 copied to clipboard

`bootstrap/buck2 build //app/buck2/...` fails on main

Open lf- opened this issue 1 month ago • 0 comments

This is being run on a Mac with macOS 15.6.1 and Rust from rustup (rustup from nix) and the normal binary toolchain, not using the nix shell.

What I did:

./bootstrap/reindeer --third-party-dir shim/third-party/rust buckify
bootstrap/buck2 build //app/buck2/... --keep-going

There are a couple of separate issues:

  • aws-lc is not built using buck2. This is proooobably a thing that should be resolved by using buck2 to build aws-lc from source, but it's really also up in the air as to whether it should instead be obtained from the OS environment, and how to decide where it should be obtained from. I think this might be a regression since a couple months ago.

    This could arguably also be my fault for not having e.g. cmake installed globally, not using the nix shell, not providing a system aws-lc, or similar.

  • termwiz is missing some pest grammar, it is unknown to me why that is.

  • There is a type error involving the Android rules. I am not sure why this is. It feels like a prelude bug?

Error running analysis for `gh_facebook_buck2//app/buck2:buck2-bin (prelude//platforms:default#7171795d350c5b11)`

Caused by:
    0: Error in configured node dependency, dependency chain follows (-> indicates depends on, ^ indicates same configuration as previous):
              gh_facebook_buck2//app/buck2:buck2-bin (prelude//platforms:default#7171795d350c5b11)
           -> gh_facebook_buck2//app/buck2_external_cells:buck2_external_cells (^)
           -> gh_facebook_buck2//app/buck2_external_cells_bundled:buck2_external_cells_bundled (^)
           -> gh_facebook_buck2//app/buck2_external_cells_bundled:prelude (^)
           -> prelude//:source_listing (^)
           -> prelude//toolchains/android:source_listing (^)
           -> prelude//toolchains/android/third-party:source_listing (^)

    1: looking up unconfigured target node `prelude//toolchains/android/third-party:source_listing`
    2: Error loading targets in package `prelude//toolchains/android/third-party` for target `prelude//toolchains/android/third-party:source_listing`
    3: From load at prelude/toolchains/android/third-party/BUCK:1
    4: Error evaluating module: `prelude//toolchains/android/tools/build_rules.bzl`
    5: error: The attribute `apply` is not available on the type `struct(and_ = def(val: typing.Any, *args: typing.Any) -> typing.Any, cond = def(condition: str) -> Select, if_ = def(cond: typing.Any, a: typing.Any, b: typing.Any) -> typing.Any, or_ = def(val: typing.Any, *args: typing.Any) -> typing.Any)`
         --> prelude/toolchains/android/tools/build_rules.bzl:76:30
          |
       76 |     versioned_srcs = selects.apply(
          |                              ^^^^^
          |
Full logs
$ bootstrap/buck2 build //app/buck2/... --keep-going
Action failed: gh_facebook_buck2_shims_meta//third-party/rust:aws-lc-rs-1.14.1-build-script-run (buildscript)
Local command returned non-zero exit code 101
Reproduce locally: `env -- 'BUCK_SCRATCH_PATH=buck-out/v2/tmp/gh_facebook_buck2_shims_meta/f8cc774ae3c05ee4/buildscript' ...<omitted>... uck2_shims_meta/906c379fcb560652/third-party/rust/__aws-lc-rs-1.14.1-build-script-run__/rustc_flags' (run `buck2 log what-failed` to get the full command)`
stdout:
stderr:

thread 'main' panicked at shim/third-party/rust/aws-lc-rs-1.14.1.crate/build.rs:72:5:
missing DEP_AWS_LC_ include
stack backtrace:
   0: __rustc::rust_begin_unwind
             at /rustc/adcb3d3b4cd3b7c4cde642f3ed537037f293738e/library/std/src/panicking.rs:697:5
   1: core::panicking::panic_fmt
             at /rustc/adcb3d3b4cd3b7c4cde642f3ed537037f293738e/library/core/src/panicking.rs:75:14
   2: build_script_build::export_sys_vars
   3: build_script_build::main
   4: core::ops::function::FnOnce::call_once
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Action failed: gh_facebook_buck2_shims_meta//third-party/rust:aws-lc-rs-1.14.1-build-script-run (buildscript)
Local command returned non-zero exit code 101
Reproduce locally: `env -- 'BUCK_SCRATCH_PATH=buck-out/v2/tmp/gh_facebook_buck2_shims_meta/43dd42859f5b4393/buildscript' ...<omitted>... uck2_shims_meta/7171795d350c5b11/third-party/rust/__aws-lc-rs-1.14.1-build-script-run__/rustc_flags' (run `buck2 log what-failed` to get the full command)`
stdout:
stderr:

thread 'main' panicked at shim/third-party/rust/aws-lc-rs-1.14.1.crate/build.rs:72:5:
missing DEP_AWS_LC_ include
stack backtrace:
   0: __rustc::rust_begin_unwind
             at /rustc/adcb3d3b4cd3b7c4cde642f3ed537037f293738e/library/std/src/panicking.rs:697:5
   1: core::panicking::panic_fmt
             at /rustc/adcb3d3b4cd3b7c4cde642f3ed537037f293738e/library/core/src/panicking.rs:75:14
   2: build_script_build::export_sys_vars
   3: build_script_build::main
   4: core::ops::function::FnOnce::call_once
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Action failed: gh_facebook_buck2_shims_meta//third-party/rust:aws-lc-sys-0.32.3-build-script-main-run (buildscript)
Local command returned non-zero exit code 101
Reproduce locally: `env -- 'BUCK_SCRATCH_PATH=buck-out/v2/tmp/gh_facebook_buck2_shims_meta/f3980970b663eb91/buildscript' ...<omitted>... hims_meta/7171795d350c5b11/third-party/rust/__aws-lc-sys-0.32.3-build-script-main-run__/rustc_flags' (run `buck2 log what-failed` to get the full command)`
stdout:
stderr:
Missing dependency: cmake

thread 'main' panicked at shim/third-party/rust/aws-lc-sys-0.32.3.crate/builder/main.rs:463:40:
called `Result::unwrap()` on an `Err` value: "Required build dependency is missing. Halting build."
stack backtrace:
   0: __rustc::rust_begin_unwind
             at /rustc/adcb3d3b4cd3b7c4cde642f3ed537037f293738e/library/std/src/panicking.rs:697:5
   1: core::panicking::panic_fmt
             at /rustc/adcb3d3b4cd3b7c4cde642f3ed537037f293738e/library/core/src/panicking.rs:75:14
   2: core::result::unwrap_failed
             at /rustc/adcb3d3b4cd3b7c4cde642f3ed537037f293738e/library/core/src/result.rs:1765:5
   3: build_script_main::get_builder
   4: build_script_main::main
   5: core::ops::function::FnOnce::call_once
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Action failed: gh_facebook_buck2_shims_meta//third-party/rust:aws-lc-sys-0.32.3-build-script-main-run (buildscript)
Local command returned non-zero exit code 101
Reproduce locally: `env -- 'BUCK_SCRATCH_PATH=buck-out/v2/tmp/gh_facebook_buck2_shims_meta/c579b001f036978f/buildscript' ...<omitted>... hims_meta/906c379fcb560652/third-party/rust/__aws-lc-sys-0.32.3-build-script-main-run__/rustc_flags' (run `buck2 log what-failed` to get the full command)`
stdout:
stderr:
Missing dependency: cmake

thread 'main' panicked at shim/third-party/rust/aws-lc-sys-0.32.3.crate/builder/main.rs:463:40:
called `Result::unwrap()` on an `Err` value: "Required build dependency is missing. Halting build."
stack backtrace:
   0: __rustc::rust_begin_unwind
             at /rustc/adcb3d3b4cd3b7c4cde642f3ed537037f293738e/library/std/src/panicking.rs:697:5
   1: core::panicking::panic_fmt
             at /rustc/adcb3d3b4cd3b7c4cde642f3ed537037f293738e/library/core/src/panicking.rs:75:14
   2: core::result::unwrap_failed
             at /rustc/adcb3d3b4cd3b7c4cde642f3ed537037f293738e/library/core/src/result.rs:1765:5
   3: build_script_main::get_builder
   4: build_script_main::main
   5: core::ops::function::FnOnce::call_once
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Action failed: gh_facebook_buck2_shims_meta//third-party/rust:termwiz-0.18.0 (rustc check)
Local command returned non-zero exit code 1
Reproduce locally: `env -- 'BUCK_SCRATCH_PATH=buck-out/v2/tmp/gh_facebook_buck2_shims_meta/341851491dceb159/rustc/check' ...<omitted>... shims_meta/7171795d350c5b11/third-party/rust/__termwiz-0.18.0__/LPPM/termwiz-metadata-fast-diag.args (run `buck2 log what-failed` to get the full command)`
stdout:
stderr:
error: proc-macro derive panicked
  --> shim/third-party/rust/termwiz-0.18.0.crate/src/tmux_cc/mod.rs:12:14
   |
12 |     #[derive(Parser)]
   |              ^^^^^^
   |
   = help: message: error opening "tmux.pest": No such file or directory (os error 2)


error[E0432]: unresolved import `parser::Rule`
 --> shim/third-party/rust/termwiz-0.18.0.crate/src/tmux_cc/mod.rs:2:5
  |
2 | use parser::Rule;
  |     ^^^^^^^^^^^^ no `Rule` in `tmux_cc::parser`
  |
help: consider importing this struct instead
  |
2 - use parser::Rule;
2 + use crate::hyperlink::Rule;
  |


error[E0599]: no function or associated item named `parse` found for struct `TmuxParser` in the current scope
   --> shim/third-party/rust/termwiz-0.18.0.crate/src/tmux_cc/mod.rs:186:41
    |
 14 |     pub struct TmuxParser;
    |     --------------------- function or associated item `parse` not found for this struct
...
186 |     let mut pairs = parser::TmuxParser::parse(Rule::line_entire, line)?;
    |                                         ^^^^^ function or associated item not found in `TmuxParser`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following traits define an item `parse`, perhaps you need to implement one of them:
            candidate #1: `nom::sequence::Tuple`
            candidate #2: `pest::Parser`


error: aborting due to 3 previous errors


Some errors have detailed explanations: E0432, E0599.

For more information about an error, try `rustc --explain E0432`.

Action failed: gh_facebook_buck2_shims_meta//third-party/rust:termwiz-0.18.0 (rustc metadata [pic])
Local command returned non-zero exit code 1
Reproduce locally: `env -- 'BUCK_SCRATCH_PATH=buck-out/v2/tmp/gh_facebook_buck2_shims_meta/6c606ea2fa8d9819/rustc/_buck_ ...<omitted>... shims_meta/906c379fcb560652/third-party/rust/__termwiz-0.18.0__/LPPF/termwiz-metadata-full-diag.args (run `buck2 log what-failed` to get the full command)`
stdout:
stderr:
error: proc-macro derive panicked
  --> shim/third-party/rust/termwiz-0.18.0.crate/src/tmux_cc/mod.rs:12:14
   |
12 |     #[derive(Parser)]
   |              ^^^^^^
   |
   = help: message: error opening "tmux.pest": No such file or directory (os error 2)


error[E0432]: unresolved import `parser::Rule`
 --> shim/third-party/rust/termwiz-0.18.0.crate/src/tmux_cc/mod.rs:2:5
  |
2 | use parser::Rule;
  |     ^^^^^^^^^^^^ no `Rule` in `tmux_cc::parser`
  |
help: consider importing this struct instead
  |
2 - use parser::Rule;
2 + use crate::hyperlink::Rule;
  |


error[E0599]: no function or associated item named `parse` found for struct `TmuxParser` in the current scope
   --> shim/third-party/rust/termwiz-0.18.0.crate/src/tmux_cc/mod.rs:186:41
    |
 14 |     pub struct TmuxParser;
    |     --------------------- function or associated item `parse` not found for this struct
...
186 |     let mut pairs = parser::TmuxParser::parse(Rule::line_entire, line)?;
    |                                         ^^^^^ function or associated item not found in `TmuxParser`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following traits define an item `parse`, perhaps you need to implement one of them:
            candidate #1: `nom::sequence::Tuple`
            candidate #2: `pest::Parser`


error: aborting due to 3 previous errors


Some errors have detailed explanations: E0432, E0599.

For more information about an error, try `rustc --explain E0432`.

Action failed: gh_facebook_buck2_shims_meta//third-party/rust:termwiz-0.18.0 (rustc rlib [pic])
Local command returned non-zero exit code 1
Reproduce locally: `env -- 'BUCK_SCRATCH_PATH=buck-out/v2/tmp/gh_facebook_buck2_shims_meta/b8f9b47a955503e2/rustc/_buck_ ...<omitted>... ok_buck2_shims_meta/906c379fcb560652/third-party/rust/__termwiz-0.18.0__/LPPL/termwiz-link-diag.args (run `buck2 log what-failed` to get the full command)`
stdout:
stderr:
error: proc-macro derive panicked
  --> shim/third-party/rust/termwiz-0.18.0.crate/src/tmux_cc/mod.rs:12:14
   |
12 |     #[derive(Parser)]
   |              ^^^^^^
   |
   = help: message: error opening "tmux.pest": No such file or directory (os error 2)


error[E0432]: unresolved import `parser::Rule`
 --> shim/third-party/rust/termwiz-0.18.0.crate/src/tmux_cc/mod.rs:2:5
  |
2 | use parser::Rule;
  |     ^^^^^^^^^^^^ no `Rule` in `tmux_cc::parser`
  |
help: consider importing this struct instead
  |
2 - use parser::Rule;
2 + use crate::hyperlink::Rule;
  |


error[E0599]: no function or associated item named `parse` found for struct `TmuxParser` in the current scope
   --> shim/third-party/rust/termwiz-0.18.0.crate/src/tmux_cc/mod.rs:186:41
    |
 14 |     pub struct TmuxParser;
    |     --------------------- function or associated item `parse` not found for this struct
...
186 |     let mut pairs = parser::TmuxParser::parse(Rule::line_entire, line)?;
    |                                         ^^^^^ function or associated item not found in `TmuxParser`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following traits define an item `parse`, perhaps you need to implement one of them:
            candidate #1: `nom::sequence::Tuple`
            candidate #2: `pest::Parser`


error: aborting due to 3 previous errors


Some errors have detailed explanations: E0432, E0599.

For more information about an error, try `rustc --explain E0432`.

Build ID: 3b2db2b8-47fc-429d-b052-f824ab62b14a
Network: Up: 0B  Down: 0B
Loading targets.   Remaining     0/1
Analyzing targets. Remaining     0/1
Executing actions. Remaining     0/1847                                        10:06.3s exec time total
Command: build.    Finished 909 local
Time elapsed: 1:06.7s
BUILD FAILED
Error running analysis for `gh_facebook_buck2//app/buck2:buck2-bin (prelude//platforms:default#7171795d350c5b11)`

Caused by:
    0: Error in configured node dependency, dependency chain follows (-> indicates depends on, ^ indicates same configuration as previous):
              gh_facebook_buck2//app/buck2:buck2-bin (prelude//platforms:default#7171795d350c5b11)
           -> gh_facebook_buck2//app/buck2_external_cells:buck2_external_cells (^)
           -> gh_facebook_buck2//app/buck2_external_cells_bundled:buck2_external_cells_bundled (^)
           -> gh_facebook_buck2//app/buck2_external_cells_bundled:prelude (^)
           -> prelude//:source_listing (^)
           -> prelude//toolchains/android:source_listing (^)
           -> prelude//toolchains/android/third-party:source_listing (^)

    1: looking up unconfigured target node `prelude//toolchains/android/third-party:source_listing`
    2: Error loading targets in package `prelude//toolchains/android/third-party` for target `prelude//toolchains/android/third-party:source_listing`
    3: From load at prelude/toolchains/android/third-party/BUCK:1
    4: Error evaluating module: `prelude//toolchains/android/tools/build_rules.bzl`
    5: error: The attribute `apply` is not available on the type `struct(and_ = def(val: typing.Any, *args: typing.Any) -> typing.Any, cond = def(condition: str) -> Select, if_ = def(cond: typing.Any, a: typing.Any, b: typing.Any) -> typing.Any, or_ = def(val: typing.Any, *args: typing.Any) -> typing.Any)`
         --> prelude/toolchains/android/tools/build_rules.bzl:76:30
          |
       76 |     versioned_srcs = selects.apply(
          |                              ^^^^^
          |

lf- avatar Nov 07 '25 23:11 lf-